1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Pause in unloaded territory instead of collide

This commit is contained in:
JacobF 2011-08-23 22:10:19 -04:00 committed by Perttu Ahola
parent faf3d7902a
commit bd72091150
3 changed files with 24 additions and 4 deletions

View file

@ -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();