1
0

Improvements to knockback (#4504)

* Improvements to knockback
* SetSpeed for explosions
* Improve code consistency
This commit is contained in:
Mat
2020-03-19 19:13:41 +02:00
committed by GitHub
parent 683d24faad
commit 0e07e231a2
5 changed files with 28 additions and 14 deletions

View File

@@ -1000,10 +1000,6 @@ void cPlayer::ApplyArmorDamage(int a_DamageBlocked)
bool cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
{
SetSpeed(0, 0, 0);
// Prevents knocking the player in the wrong direction due to
// the speed vector problems, see #2865
// In the future, the speed vector should be fixed
if ((a_TDI.DamageType != dtInVoid) && (a_TDI.DamageType != dtPlugin))
{
if (IsGameModeCreative() || IsGameModeSpectator())