Monday, December 31, 2007

Choose your tank size

Ok this is posted in a comment by "person" but "someone" is the one who came up with this cheat I just think it should be posted so more people can see it and don't have to go looking through comments to find it so here it is.

At top of src/bzflag/CommandsImplementation.cxx:

extern float sizeCheat;
class SizeCommand : LocalCommand {
bool operator() (const char *commandLine);
static SizeCommand sizeCommand;
SizeCommand::SizeCommand() : LocalCommand("/size") {}
bool SizeCommand::operator() (const char *commandLine)
sizeCheat = atof(commandLine+6);
return true;

At top of src/bzflag/Player.cxx:

#include "LocalPlayer.h"
float sizeCheat = 1.0f;
else if (effectFlag == Flags::Narrow) {
dimensionsTarget[1] = 0.001f;

Add this after:

if (id == LocalPlayer::getMyTank()->getId())
dimensionsTarget[0] *= sizeCheat;
dimensionsTarget[1] *= sizeCheat;

And that should be it. Now just type /size .1 to /size 1. You must either be killed or pick up or drop a flag for the size to change. Sizes range from 0.0 (Can't be shot by a bullot) to 1.0 (Normal tank size). Sometimes just a /size .7 is nice to give yourself an "edge" =].


No comments: