• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Simple-TUT]Set jump height by mapID

Junior Spellweaver
Joined
Jun 15, 2016
Messages
139
Reaction score
37
This is really simple code. SOmeone way find use of it!

It allows you to set different jump heights in different maps.

Search for

Code:
 JumpVelocity  = 17;

add below

Code:
 if (Keyboard->IsPressed(kbsV) && (gClientLogic().m_gameInfo.mapId==GBGameInfo::MAPID_WZ_Colorado))                {                uberAnim_->StartJump();                JumpVelocity  = 20;                }

You can change the MapID and the height of the jump. Like I said simple! Maybe good or useless. Depends on how you use it.

Enjoy

---------------UPDATED--------------

Small bug fix: The game things you are cheating when you hand in the air for too long.

Search for : m_PlayerFlyingAntiCheatTimer >

Change to m_PlayerFlyingAntiCheatTimer > 10.0f

Works fine for me.

If people are using the code and thinking it doesnt work. You have to hold V then jump using space to use the different jump height.
 
Last edited:
Junior Spellweaver
Joined
Oct 25, 2017
Messages
158
Reaction score
17
How to make that it was possible to use only on a private server?
 
Junior Spellweaver
Joined
Dec 18, 2014
Messages
108
Reaction score
25
delete this post pls
 
Last edited:
Junior Spellweaver
Joined
Oct 25, 2017
Messages
158
Reaction score
17
Fix for this not need V+Space:rolleyes:

Found : // process jump after assigning InputAcceleration, so that we can predict where player will jump

and add this code

Code:
            else if (pl->bOnGround && (Keyboard->IsPressed(kbsV) || Gamepad->WasPressed(gpA))
                && !crouching
                && !proning
                && !swimming
                && !pl->IsJumpActive()
                && prevAccel.z >= 0 /* prevent jump backward*/
                )
            {
                pl->StartJump();
            }
        }
 
Back
Top