From 0a217abf938f1385f30651e7aa37b7289001b958 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sun, 13 Jul 2014 19:30:36 +0200 Subject: do not sink underwater --- src/game/bg_pmove.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/game') diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 894d7faa..70c69809 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -247,13 +247,8 @@ static void PM_Friction( void ) speed = VectorLength( vec ); - if( speed < 1 ) - { - vel[ 0 ] = 0; - vel[ 1 ] = 0; // allow sinking underwater - // FIXME: still have z friction underwater? + if( speed < 0.1 ) return; - } drop = 0; @@ -1050,19 +1045,11 @@ static void PM_WaterMove( void ) // // user intentions // - if( !scale ) - { - wishvel[ 0 ] = 0; - wishvel[ 1 ] = 0; - wishvel[ 2 ] = -60; // sink towards bottom - } - else - { - for( i = 0; i < 3; i++ ) - wishvel[ i ] = scale * pml.forward[ i ] * pm->cmd.forwardmove + scale * pml.right[ i ] * pm->cmd.rightmove; - wishvel[ 2 ] += scale * pm->cmd.upmove; - } + for( i = 0; i < 3; i++ ) + wishvel[ i ] = scale * pml.forward[ i ] * pm->cmd.forwardmove + scale * pml.right[ i ] * pm->cmd.rightmove; + + wishvel[ 2 ] += scale * pm->cmd.upmove; VectorCopy( wishvel, wishdir ); wishspeed = VectorNormalize( wishdir ); -- cgit