From bd72091150edac9d82beb8a65c25d68becd11aee Mon Sep 17 00:00:00 2001 From: JacobF Date: Tue, 23 Aug 2011 22:10:19 -0400 Subject: Pause in unloaded territory instead of collide --- src/environment.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/environment.cpp') diff --git a/src/environment.cpp b/src/environment.cpp index d6ff4d826..8103b7110 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -1512,6 +1512,11 @@ void ClientEnvironment::step(float dtime) Get the speed the player is going */ bool is_climbing = lplayer->is_climbing; + + /* + Check if the player is frozen (don't apply physics) + */ + bool is_frozen = lplayer->is_frozen; f32 player_speed = 0.001; // just some small value player_speed = lplayer->getSpeed().getLength(); @@ -1570,7 +1575,7 @@ void ClientEnvironment::step(float dtime) v3f lplayerpos = lplayer->getPosition(); // Apply physics - if(free_move == false && is_climbing == false) + if(free_move == false && is_climbing == false && is_frozen == false) { // Gravity v3f speed = lplayer->getSpeed(); -- cgit v1.2.3