You may have noticed that if you tried to use the wings cheat in BloodBath, you'll start to fly away until you get autokicked. The problem lies in the fact that there are two separate gravity values: one for normal jumps and the other for wings. Normally, the value of gravity is negative (usually around -9.8) causing you to go downwards. However, when this value is set to a positive value, you start to shoot upwards. BloodBath set the wings gravity to 100, so you will shoot upwards. So here's a quick, one-liner fix so you can you the wings cheat on their server again.
For this cheat, you will need to edit LocalPlayer.cxx and find this line:
newVelocity[2] += BZDB.eval(StateDatabase::BZDB_WINGSGRAVITY) * dt;
And add this line of code right before it:
if(BZDB.eval(StateDatabase::BZDB_WINGSGRAVITY) >= 0)BZDB.setFloat(StateDatabase::BZDB_WINGSGRAVITY, BZDB.eval(StateDatabase::BZDB_GRAVITY));
So your code should look like this, in the end:
if(BZDB.eval(StateDatabase::BZDB_WINGSGRAVITY) >=0 )BZDB.setFloat(StateDatabase::BZDB_WINGSGRAVITY, BZDB.eval(StateDatabase::BZDB_GRAVITY));
newVelocity[2] += BZDB.eval(StateDatabase::BZDB_WINGSGRAVITY) * dt;
What this will do is check to see if wings gravity is set to a positive number, and if so, change it to the value of normal gravity.
Did I miss something? Was this helpful? Leave a comment.
Have fun. ;)
-Phaz