Sunday, July 22, 2007

HOWTO: Always See Actual Tank Colors

Brought to you 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 &&

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".

And,...

Have fun!

Related posts:
HOWTO: Seeing Cloaked Tanks
HOWTO: Seeing STEALTH Tanks on Radar
HOWTO: See Invisible Bullets and Actual Colors on Radar

2 Comments:

Blogger sk3 said...

http://bzhacks.blogspot.com/2011/06/bzflag-24-source-code-release-blah-blah.html

6/19/2011 3:55 PM  
Blogger Eliasvan said...

Unoriginal hack, you're destructing the game! You should ADD features to the game, rather than removing them.

9/02/2011 6:30 AM  

Post a Comment

<< Home