Friday, August 3, 2007

Stealth Tanks Blink on Radar

By: Phasmophage
This post assumes that you have already taken out the code that blocks you from seeing stealth tanks on your radar. If you haven't already done so, follow the directions in the post titled "See STEALTH Tanks on Radar."

Here is a great way for you not to blow your cover as a cheater. If you have Super Bullet, you don't want to hit a stealthed tank behind a wall. To make sure you know which tanks are stealthed so you can approach them with caution and not blow your cover, we will make them blink.

This quick and easy edit requires that you open RadarRenderer.cxx and find these lines of code:

if (flashTank.isOn()) {
if (!toggleTank) {
float flashcolor[3];
flashcolor[0] = 0.0f;
flashcolor[1] = 0.8f;
flashcolor[2] = 0.9f;
glColor3fv(flashcolor);
}
} else {
toggleTank = !toggleTank;
flashTank.setClock(0.2f);
}
}

Now, just put this right after it:
//Start stealth flash
if ((player->getFlag() == Flags::Stealth)) {
static TimeKeeper lastTime = TimeKeeper::getCurrent();
static bool flash = false;
const float elapsed = float(TimeKeeper::getCurrent() - lastTime);
if(elapsed < 0.3f){
if(!flash)
{
float flashcolor[3];
flashcolor[0] = 0.5f; //This controls the color of the flash.
flashcolor[1] = 0.5f;
flashcolor[2] = 0.5f;
glColor3fv(flashcolor);
}
}
else
{
flash = !flash;
lastTime = TimeKeeper::getCurrent();
}
}
//End stealth flash

This will make stealthed tanks blink a gray color on your radar. If you want it to blink faster, change 0.3 to a smaller number, or a bigger number to blink more slowly. You can edit the 0.5f's to fit your tastes in color.

Don't blow your cover,
-Phaz ;)

10 comments:

Someone said...

To not be able to kill yourself or be tk'd:

In src/bzflag/playing.cxx look for:

===
myTank->checkHit(myTank, hit, minTime);

int i;
for (i = 0; i < curMaxPlayers; i++)
if (player[i])
myTank->checkHit(player[i], hit, minTime);
===

Replace it with:

===
int i;
for (i = 0; i < curMaxPlayers; i++)
if (player[i])
if (player[i]->getTeam() != myTank->getTeam() || myTank->getTeam() == RogueTeam)
myTank->checkHit(player[i], hit, minTime);
===

Notice how the first line was removed, and one line was added.

Someone said...

To not be able to pick up bad flags:

In src/bzflag/playing.cxx look for:

===
for (int i = 0; i < numFlags; i++) {
if (world->getFlag(i).type == Flags::Null || world->getFlag(i).status != FlagOnGround)
continue;
===

Replace it with:

===
for (int i = 0; i < numFlags; i++) {
if (world->getFlag(i).type == Flags::Null || world->getFlag(i).status != FlagOnGround || world->getFlag(i).type->flagQuality == FlagBad)
continue;

randomdude said...

I have run into a problem in doing these. I'm not entirely sure which one did it, but i think it may have been the one that allows you to see invisible bullets. At any rate, the bug is that i can't see opponents shots.

Is there any chance you can help me with this?

Also a couple of HOWTO requests, based on the fact ive seen the cheats before:

-Guided laser (heh, that one looked sweet)
-How to change your ip, to avoid bans
-Walk through walls without OO
-Toggling cheats

Thanks!

phasmophage said...

I'd love to help you with the not being able to see opponents bullets, but do you know around where you edited so you can show me your code?

Oh, and thanks for the requests. I actually already have guided lasers, but I was scared of releasing its power into the wild. But I'll post it soon. But changing the IP address isn't a BZFlag cheat, you have to do that yourself. You might want to check out WhatIsMyIpaddress.com.

Lord Jesus said...

randomdude,

To expand upon what phasmophage was saying, restting an IP address isn't a cheat, per se. It can be fairly easy if you have dynamic IP. Static IP (i.e., one that does not change) is necessary for people who, for example, run their own web sites. Static IP typically will cost more money. Generally speaking, if you did not specifically pay for static, you probably have dynamic.

That said, resetting your IP may be as simple as simply resetting your modem (e.g., by turning it off and then back on). That may not always work. You can also try visiting http://whatismyipaddress.com/ . At that web site, you will see a link for "How do I change my IP address FAQ". There, you will find tips for resetting your IP address. And, there's also a link to a forum at the FAQ section.

I've heard that people can use annonymizer tools such as Tor & Privoxy. I've never tried to utilize these for BZFlag; however, one person with whom I spoke who did said that he could not join servers that required UDP. That ended up being most servers, and he was only able to join about 2 or 3 servers at the time (it's been a little while).

Another consideration may be to use dial-up for BZFlag. Dial-up is certainly slower. You may end up getting lag kicked from servers. The advantage, though, is that you can use a dial-up account for use with modified clients while keeping your primary ISP for actual game playing. Another consideration may be that using dial-up can prevent associating your registered name with your mod-client gaming in case you end up using the same IP address for both. There are a number of dial-up service providers that offer accounts for about $10 a month. You may also want to look to see if there are any free ISP services in your area.

I hope that this helps.

Lord Jesus said...

You might also find this blog post to be useful:

http://technosafari.com/2006/02/cox-cable-static-ip-how-to-change-your.html

If the entire web address is not displayed from above, you can enter it in by combining the following lines into a single URL:

http://technosafari.com/
2006/02/
cox-cable-static-ip-
how-to-change-your.html

randomdude said...

Thanks for the help, in reference to the ip thing i have a static ip, but i linked it awhile ago to dyndns using the dynamic ip host function so i can change my ip. Hopefully they won't link it to my regged name :).
I was thinking more in terms of a TIP.

randomdude said...

By the way, if this isn't to much trouble one more request i would add is something i saw in the bzwiki, instant teleportation/tank drag'n'drop.
That sounds great, but does that work like a speed hack, as in will it kick you for going to fast? that annoyed me so much i took the speed hack off until i can get toggling to work :(

phasmophage said...

Oh yeah, I actually do happen to have the Drag N Drop cheat. Right now I can set two places (but I could add more) to teleport to. I can also teleport right behind selected people.
Most servers will not kick you for this, you are more likely to get kicked with the eXtreme speed hack. However, some do.
To teleport, you have to use the command move(newPos, newAzimuth) and that's pretty much it. I'll post something later because right now I have to finish an assignment for my C++ class. =P
-Phaz

eanlongjohn said...

Hey, I'm a beginner and using your tips step by step. I'm using Dev-C++. I was wondering how to change all your source code files into a real playable game. Help is appreciated very much! Thanks, Ean