From 5618f2bb4b91f4942d6936fdd18b42e354feee9c Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sat, 16 Aug 2014 22:48:06 +0300 Subject: Added goon water pounce fix. --- src/game/bg_pmove.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/game') diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 62151f4..cb215a3 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -607,6 +607,25 @@ static void PM_CheckCharge( void ) pm->ps->pm_flags &= ~PMF_CHARGE; } +/* +============= +PM_CheckWaterPounce +============= +*/ +static void PM_CheckWaterPounce( void ) +{ + if( pm->ps->weapon != WP_ALEVEL3 && + pm->ps->weapon != WP_ALEVEL3_UPG ) + return; + + // We were pouncing, but we've landed into water + if( ( pm->waterlevel > 1 ) && ( pm->ps->pm_flags & PMF_CHARGE ) ) + { + pm->ps->pm_flags &= ~PMF_CHARGE; + pm->ps->weaponTime += LEVEL3_POUNCE_REPEAT; + } +} + /* ============= PM_CheckPounce @@ -1188,7 +1207,6 @@ static void PM_WaterJumpMove( void ) /* =================== PM_WaterMove - =================== */ static void PM_WaterMove( void ) @@ -1200,6 +1218,8 @@ static void PM_WaterMove( void ) float scale; float vel; + PM_CheckWaterPounce( ); + if( PM_CheckWaterJump( ) ) { PM_WaterJumpMove(); -- cgit