mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
added sneaking/crouching and changelog
This commit is contained in:
parent
0947c4cc48
commit
14fafc7217
8 changed files with 318 additions and 113 deletions
|
@ -67,10 +67,15 @@ void Environment::step(float dtime)
|
|||
}
|
||||
//playerspeed.stop();
|
||||
|
||||
/*
|
||||
Maximum position increment
|
||||
*/
|
||||
//f32 position_max_increment = 0.05*BS;
|
||||
f32 position_max_increment = 0.1*BS;
|
||||
|
||||
// Maximum time increment (for collision detection etc)
|
||||
// Allow 0.1 blocks per increment
|
||||
// time = distance / speed
|
||||
f32 dtime_max_increment = 0.1*BS / maximum_player_speed;
|
||||
f32 dtime_max_increment = position_max_increment / maximum_player_speed;
|
||||
// Maximum time increment is 10ms or lower
|
||||
if(dtime_max_increment > 0.01)
|
||||
dtime_max_increment = 0.01;
|
||||
|
@ -137,7 +142,7 @@ void Environment::step(float dtime)
|
|||
Move the player.
|
||||
For local player, this also calculates collision detection.
|
||||
*/
|
||||
player->move(dtime_part, *m_map);
|
||||
player->move(dtime_part, *m_map, position_max_increment);
|
||||
|
||||
/*
|
||||
Update lighting on remote players on client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue