From 1379b92edf78e81254a1b88d5ac3f5a5aa706842 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Sat, 16 Jan 2016 18:48:07 +0200 Subject: [PATCH] Fixed wrong knockback direction after explosion damage --- src/Entities/Player.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index c5e6ef626..dd26f1491 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -825,6 +825,10 @@ void cPlayer::SetFlying(bool a_IsFlying) 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())