From ef88523ceb802c22fea0f5ac3744702429dfe650 Mon Sep 17 00:00:00 2001 From: Roman Tetelman Date: Sat, 3 Oct 2009 11:56:34 +0000 Subject: * marauder has a timeout after jumping before being able to walljump again * make SnapVector definition more msvc friendly --- src/game/bg_pmove.c | 7 +++++++ src/qcommon/q_shared.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 79ede29a..3ede67f0 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -765,6 +765,13 @@ static qboolean PM_CheckJump( void ) pm->ps->stats[ STAT_MISC ] > 0 ) return qfalse; + //don't allow walljump for a short while after jumping from the ground + if( BG_ClassHasAbility( pm->ps->stats[ STAT_CLASS ], SCA_WALLJUMPER ) ) + { + pm->ps->pm_flags |= PMF_TIME_WALLJUMP; + pm->ps->pm_time = 200; + } + //can't jump and charge at the same time if( ( pm->ps->weapon == WP_ALEVEL4 ) && pm->ps->stats[ STAT_MISC ] > 0 ) diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 82b4f87e..84408371 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -468,7 +468,7 @@ typedef struct { // Snaps the vector to the floor value always, ignoring any weirdness from // snapping negative versus positive numbers -#define Floor(f) ((f) >= 0.f ? (int)(f) : -(int)(-(f))) +#define Floor(fl) ((fl) >= 0.0f ? (int)(fl) : -(int)(-(fl))) #define SnapVector(v) ((v)[0]=Floor((v)[0]),(v)[1]=Floor((v)[1]),(v)[2]=Floor((v)[2])) // just in case you do't want to use the macros -- cgit