mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Players stay in environment even when dead, damage flash and fall damage fixes
Don't set m_removed on dead players (dead players are indicated by hp == 0). Local damage flash is shown whatever the cause was (even from Lua set_hp). PlayerCAO damage flash matches duration of local damage flash. Fall damage is dealt much more consistently (this is done by disallowing jumping when speed.Y is very negative, up to now jumping could sometimes negate fall damage)
This commit is contained in:
@@ -713,14 +713,17 @@ void LocalPlayer::applyControl(float dtime)
|
||||
}
|
||||
else if(touching_ground)
|
||||
{
|
||||
v3f speed = getSpeed();
|
||||
/*
|
||||
NOTE: The d value in move() affects jump height by
|
||||
raising the height at which the jump speed is kept
|
||||
at its starting value
|
||||
*/
|
||||
speed.Y = 6.5*BS;
|
||||
setSpeed(speed);
|
||||
v3f speed = getSpeed();
|
||||
if(speed.Y >= -0.5*BS)
|
||||
{
|
||||
speed.Y = 6.5*BS;
|
||||
setSpeed(speed);
|
||||
}
|
||||
}
|
||||
// Use the oscillating value for getting out of water
|
||||
// (so that the player doesn't fly on the surface)
|
||||
|
Reference in New Issue
Block a user