Sunday, June 10, 2007

HOWTO: Shoot While in a Building with Oscillation Overthruster

Imagine that you have Oscillation Overthruster (OO) and you're chasing another player with OO. The other player dodges you by hiding in a building or some other structure (for example, while playing Hide-N-Seek Hills). You can go after the player to maintain your chase; however, what if the player stops while you're both sealed? You can't shoot if you're both sealed. Moreover, you can almost imagine the other player saying something like, "Haha! You can't shoot me here!"

Now, you can have the last laugh as the other tank goes Kaboom! Thrills and laughs abound now that buildings are no longer safe havens for other players with OO. But, why stop there? Snipe other players from the safety of buildings...

To do that, we're going to visit LocalPlayer.cxx (in /src/bzflag/ of the extracted source).

Use the search feature of your favorite text editor and look for "case Exploding". You will come to a section like this:

case Exploding:
firingStatus = Deceased;
break;
case InBuilding:
firingStatus = (getFlag() == Flags::PhantomZone) ? Zoned : Sealed;
break;
default:
if (isPhantomZoned())


Let's do away with the "case InBuilding" section so that the modified file now looks like this:

case Exploding:
firingStatus = Deceased;
break;
default:
if (isPhantomZoned())


Next, search for "make sure we're allowed to shoot". You will come to a section that looks like this:

// make sure we're allowed to shoot
if (!isAlive() || isPaused() ||
((location == InBuilding) && !isPhantomZoned())) {
return false;
}

Let's do a quick edit so that it now looks like this:

// make sure we're allowed to shoot
if (!isAlive() || isPaused()) {
return false;
}


Note that the above edit will only allow you to be able to shoot while sealed in a building.

Save your new file, and you're done. In case you haven't already checked, take a look at the previous HOWTO posts for more tips. When you're finished, compile your client and...

Have fun!

Realted posts:
TIP: The Infamous BZFlag F5 Cheat
HOWTO: Flying Without Wings & Extended Jumping

0 Comments:

Post a Comment

<< Home