summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-13 19:30:36 +0200
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:14 +0100
commit0a217abf938f1385f30651e7aa37b7289001b958 (patch)
tree4799b701ce577ba3576701d34a2f8ccb8d4ea8c9 /src/game
parent070a12bff30c69b104edb0e9586df4eff9a75fc1 (diff)
do not sink underwater
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_pmove.c23
1 files changed, 5 insertions, 18 deletions
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 );