ProdigySim / complite-mutation

A Competitive Left 4 Dead 2 Mutation
3 stars 2 forks source link

Prevent bunnyhopping for suvivors and tank? #2

Open Icy-Inferno opened 4 years ago

Icy-Inferno commented 4 years ago

If this is even something we want to port in, could we hook OnGameEvent_player_jump and use CBaseEntity.GetVelocity() and CBaseEntity.SetVelocity() to implement this behavior?

Icy-Inferno commented 4 years ago

Some other potentially useful odds and ends:

int GetButtonMask() - We can use this to determine if IN_JUMP is pressed. local playerIsMidAir = NetProps.GetPropInt(player, "m_hGroundEntity") & 1 - (From rocketdude.nut) We can check this CTerrorPlayer netprop to see if the player has a ground entity (and is therefore midair).