Friday, July 27, 2007

Always See Actual Tank Colors

By: Phasmophage

Here's an edit that will allow you to see the actual tank color of players even if they have Masquerade and/or if you have Colorblindness. For this, we will go to playing.cxx in /src/bzflag/ of the extracted source. Search for "const bool colorblind = (myTank->getFlag()", and you will come to this section:

const bool colorblind = (myTank->getFlag() == Flags::Colorblindness);
player[i]->addShots(scene, colorblind);

TeamColor effectiveTeam = RogueTeam;
if (!colorblind){
if ((player[i]->getFlag() == Flags::Masquerade)
&& (myTank->getFlag() != Flags::Seer)
&& (myTank->getTeam() != ObserverTeam)) {
effectiveTeam = myTank->getTeam();
}
else {
effectiveTeam = player[i]->getTeam();
}
}

const bool inCockpt = ROAM.isRoaming() && !devDriving &&

Look at the first line. Replace "(myTank->getFlag() == Flags::Colorblindness);
player[i]->addShots(scene, colorblind)" with "false" so that the edited line looks like this:

const bool colorblind = false;

Next, look at the line "TeamColor effectiveTeam = RogueTeam;". Replace "RogueTeam" with "player[i]->getTeam()" so that the edited line looks like this:

TeamColor effectiveTeam = player[i]->getTeam();

Remove the lines between the line above and "const bool inCockpt = ROAM.isRoaming() && !devDriving &&" so that the section will look like this:

TeamColor effectiveTeam = player[i]->getTeam();

const bool inCockpt = ROAM.isRoaming() && !devDriving &&

The entire edited section should now look like this:

const bool colorblind = false;
player[i]->addShots(scene, colorblind);

TeamColor effectiveTeam = player[i]->getTeam();

const bool inCockpt = ROAM.isRoaming() && !devDriving &&

As Phasmophage said it, "This should color masqueraded tanks correctly, and take out some of the effects of colorblindness."

Save the file, compile your new client, and you're done. To view Phasmophage's original instructions, read his comment to "HOWTO: Reverse While Sealed with Oscillation Overthruster" from the blog Cheating BZFlag.

And,...

Have fun!

No comments: