Thursday, January 3, 2008

Jump Fix for DUB Pillbox

By: Lord Jesus

Some of you may have noticed that you can no longer cheat on DUB Pillbox by jumping on the no-jumping server (see Flying Without Wings for information about jumping on no-jump servers). In addition to updating to a newer version server which prevents sending flags to teammates (or someone on the other team, for that matter) or observers, jump velocity was set to zero. The fix for that is to use a custom value if the server value is set to zero or less. Here, we use 19. You can experiment to find a value that most suits your liking.

To do that, let's go to LocalPlayer.cxx. Search for "newVelocity[2] = BZDB.eval(StateDatabase::BZDB_JUMPVELOCITY)", and you will find this section:

// add jump velocity (actually, set the vertical component since you
// can only jump if resting on something)
const float* oldVelocity = getVelocity();
float newVelocity[3];
newVelocity[0] = oldVelocity[0];
newVelocity[1] = oldVelocity[1];
if (flag == Flags::Wings) {
newVelocity[2] = BZDB.eval(StateDatabase::BZDB_WINGSJUMPVELOCITY);
} else if (flag == Flags::Bouncy) {
const float factor = 0.25f + ((float)bzfrand() * 0.75f);
newVelocity[2] = factor * BZDB.eval(StateDatabase::BZDB_JUMPVELOCITY);
} else {
newVelocity[2] = BZDB.eval(StateDatabase::BZDB_JUMPVELOCITY);
}

In particular, look at these lines:

} else {
newVelocity[2] = BZDB.eval(StateDatabase::BZDB_JUMPVELOCITY);
}

Just below "} else {", add this line:

if(BZDB.eval(StateDatabase::BZDB_JUMPVELOCITY) <=0 ) BZDB.setFloat(StateDatabase::BZDB_JUMPVELOCITY, 19);

The edited section should now read like this:

} else {
if(BZDB.eval(StateDatabase::BZDB_JUMPVELOCITY) <=0 ) BZDB.setFloat(StateDatabase::BZDB_JUMPVELOCITY, 19);
newVelocity[2] = BZDB.eval(StateDatabase::BZDB_JUMPVELOCITY);
}

Save the file, compile your client, and you're ready once more to raise hell on DUB Pillbox. Yes, now you can start dropping flags on towers again. For added laughs, be sure to check out Flying Without Wings and Guided Bullets ;) Also be sure to check out Teleport Behind Somebody (handy when someone on the other team has your flag).

I wouldn't be surprised if DUB Pillbox and/or other servers tweak various other server values in attempts to thwart cheating. We'll update here as necessary, so stay tuned ;)

Again...

dj28: "Have fun pissing people off and ruining their fun."

>:)

**********

Related posts:

Wings Gravity Fix for BloodBath
Flying Without Wings
Guided Bullets
Teleport Behind Somebody
Teleport in FRONT of your opponent.

No comments: