Thursday, June 21, 2007

HOWTO: Flying Without Wings & Extended Jumping (UPDATED)

This gem comes to us courtesy of blogger, Felipe :)

Scenario: You and another tank are jumping and shooting at one another. Wouldn't it be nice to be able to slide in one more jump in mid air? Now you can! You can 1-up those annoying players who keep coming at you with Wings. What's cool is that you are not limited to any number of jumps, and this can be especially useful on servers with Wings flap limits ;) But, this tip doesn't stop there...

You can jump no matter what -- regardless of whether or not the server allows jumping (the good folks at Hepcat will love you for it, hehehe...), or if you have the Burrow flag, or even if you have the No Jumping flag! When Burrowed, the jump isn't instantaneous, so you will need to press and hold jump to get airborne. And, it doesn't matter if you are sealed in a building with Oscillation Overthruster. Now, you can jump from inside a building to pick off players who think that they are safe by staying top of your building . Muwahahahaha! >:)

Not only all of that, but you can also control your tank in the air while jumping. The one shortcoming, though, is that you you can only control your tank in mid air you don't have a flag. With any flag (including Wings), you will not be able to control your direction.

UPDATE: Now, you can fly regardless of what flag you have! Imagine being able to fly high to target a Winged tank with your guided missile... or shockwave in air. Or, on a CTF server with no jumping allowed, you can place your team's flag on top of a pillar since the other team won't be able to jump up to get it >:) The possibilities are practically endless... See the comments to this post to see how this was updated.

We're going back to LocalPlayer.cxx for this. You can find it in /src/bzflag/ after you have extracted the source. Use your favorite text editor's search function to locate "can't jump while burrowed". You will come across this section:

FlagType* flag = getFlag();

// can't jump while burrowed
if (getPosition()[2] <>
return;
}

if (flag == Flags::Wings) {
if (wingsFlapCount <= 0) { return; } wingsFlapCount--; } else if ((location != OnGround) && (location != OnBuilding)) { // can't jump unless on the ground or a building if (flag != Flags::Wings) return; if (wingsFlapCount <= 0) return; wingsFlapCount--; } else if ((flag != Flags::Bouncy) && ((flag != Flags::Jumping && !World::getWorld()->allowJumping()) ||
(flag == Flags::NoJumping))) {
return;
}

// add jump velocity (actually, set the vertical component since you


Let's do away with most of this section so that it reads like this:

FlagType* flag = getFlag();

// add jump velocity (actually, set the vertical component since you

The above allows us to jump whenever we want. Now, let's add some ability steer in air. Search for "can't control motion in air unless have wings", and you will come to a section that looks like this:

// can't control motion in air unless have wings
if (getFlag() == Flags::Wings) {
float speed = desiredSpeed;


Specifically, let's look at the second line of the above:

if (getFlag() == Flags::Wings) {

Let's remove "== Flags::Wings" so that the line reads like this:

if (getFlag()) {

Save the file, compile your new client, and you're done. Many thanks to Felipe for sharing this one with us ;) You can view the original instructions in the comments of the previous post, The Infamous BZFlag F5 Cheat. Please take a look at the previous HOWTO posts if you haven't already done so. And, let's keep those tips rolling in >:) As always...

Have fun!

3 Comments:

Blogger Unknown said...

Hi, i fix the wings thing.

in this line
instead of change the
"== Flags::Wings" for "== Flags::Null"


Just delete it
So it reads like this


// can't control motion in air unless have wings
if (getFlag()) {
float speed = desiredSpeed


Now you can fly and control the tank on air with any flag...

6/21/2007 7:42 AM  
Blogger Unknown said...

Another one
How to : SPEED HACK

THIS WILL GIVE YOU HIGHSPEED AND QUICTURN ALWAYS, WITH ANY FLAG.

OPEN YOU LOCAPLAYER.CXX

FIND THIS LINE



// boost speed for certain flags
if (flag == Flags::Velocity) {
fracOfMaxSpeed *= BZDB.eval(StateDatabase::BZDB_VELOCITYAD);




NOW DELETE "== Flags::Velocity)"
SO IT READS LIKE THIS


// boost speed for certain flags
if (flag) {
fracOfMaxSpeed *= BZDB.eval(StateDatabase::BZDB_VELOCITYAD);


THIS WILL GIVE MAX SPEED.

NOW, QUICK TURN...

FIND THIS LINE



// boost turn speed for other flags
if (flag == Flags::QuickTurn) {
fracOfMaxAngVel *= BZDB.eval(StateDatabase::BZDB_ANGULARAD);


DELETE THE "== Flags::QuickTurn"
SO IT READS LIKE THIS


// boost turn speed for other flags
if (flag) {
fracOfMaxAngVel *= BZDB.eval(StateDatabase::BZDB_ANGULARAD);


THIS WILL GIVE U QUICTURN WITH ANY FLAG.

6/21/2007 8:25 AM  
Blogger Unknown said...

HOW TO: EXTREEEEEEEME SPEED HACK.
SOME SERVERS MAY KICK U.

AGAIN OPEN YOUR LOCALPLAYER.CXX

FIND THIS LINE

// can't go faster forward than at top speed, and backward at half speed
if (fracOfMaxSpeed > 1.0f) fracOfMaxSpeed = 1.0f;
else if (fracOfMaxSpeed < -0.5f) fracOfMaxSpeed = -0.5f;




NOW JUST CHANGE THE NUMBERS
SO IT READS LIKE THIS


// can't go faster forward than at top speed, and backward at half speed
if (fracOfMaxSpeed > 0.0f) fracOfMaxSpeed = 9.0f;
else if (fracOfMaxSpeed < 0.0f) fracOfMaxSpeed = -9.0f;

HAVE FUN :D

6/21/2007 9:00 AM  

Post a Comment

<< Home