PMove: Pressing jump will now make you jump off the ladder, like in HL and

some other games.
This commit is contained in:
Marco Cawthorne 2021-09-30 23:19:01 +02:00
parent a62aee6e15
commit 59ee0bd359
Signed by: eukara
GPG key ID: C196CD8BA993248A
2 changed files with 8 additions and 4 deletions

View file

@ -25,11 +25,7 @@ This entity was introduced in Half-Life (1998).
*/ */
class class
#ifdef CLIENT
func_ladder:CBaseEntity
#else
func_ladder:CBaseTrigger func_ladder:CBaseTrigger
#endif
{ {
void(void) func_ladder; void(void) func_ladder;

View file

@ -208,6 +208,14 @@ PMoveCustom_AccelLadder(float move_time, float premove, vector wish_dir, float w
} else { } else {
self.velocity = [0,0,0]; self.velocity = [0,0,0];
} }
if (input_buttons & INPUT_BUTTON2) {
makevectors([0, input_angles[1], 0]);
self.velocity = v_forward * -250;
self.velocity += v_up * 100;
self.flags &= ~FL_ONGROUND;
self.flags &= ~FL_JUMPRELEASED;
}
} }
void void