HOWTO: See Invisible Bullets and Actual Colors on Radar
You may recall our previous post about being able to see Stealth tanks on radar. That's useful, we can do more to make ouur radar even more powerful. With this tip from Phasmophage, we can add the ability to see Invisible Bullets and see the actual tank colors of tanks when we have the Colorblindness flag.
For this, we're revisiting RadarRenderer.cxx in /src/bzflag/ of the extracted source. Search for " if (shot && (shot->getFlag() !=" and you will find this line:
if (shot && (shot->getFlag() != Flags::InvisibleBullet || iSeeAll)) {
Remove "&& (shot->getFlag() != Flags::InvisibleBullet || iSeeAll)" so that the edited line looks like this:
if (shot) {
Look at this entire section now (includes edited line from above):
if (shot) {
const float *shotcolor;
if (coloredShot) {
if (myTank->getFlag() == Flags::Colorblindness)
shotcolor = Team::getRadarColor(RogueTeam,rabbitMode);
else
shotcolor = Team::getRadarColor(player->getTeam(),rabbitMode);
const float cs = colorScale(shot->getPosition()[2], muzzleHeight);
Notice the fourth line in particular:
if (myTank->getFlag() == Flags::Colorblindness)
Let's remove the "== Flags::Colorblindness" so that the line now reads like this:
if (myTank->getFlag())
Next, remove this line:
shotcolor = Team::getRadarColor(RogueTeam,rabbitMode);
... and this:
else
... so that the modified section should now read like this:
if (shot) {
const float *shotcolor;
if (coloredShot) {
if (myTank->getFlag())
shotcolor = Team::getRadarColor(player->getTeam(),rabbitMode);
const float cs = colorScale(shot->getPosition()[2], muzzleHeight);
Save the file, compile your client, and you're done! To view Phasmophage's original instructions, take a look at his comment to "HOWTO: Reverse While Sealed with Oscillation Overthruster" as well as the update comment to this post, "HOWTO: See Invisible Bullets and Actual Colors on Radar".
As always...
Have fun!
Related posts:
HOWTO: Seeing STEALTH Tanks on Radar
HOWTO: Always See Actual Tank Colors