diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-01-16 17:48:07 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-01-16 17:48:07 +0100 |
commit | 1379b92edf78e81254a1b88d5ac3f5a5aa706842 (patch) | |
tree | c7b1d225f8537f36ad71f38f53245b9e91e35f06 | |
parent | Merge pull request #2877 from LogicParrot/spawn2 (diff) | |
download | cuberite-1379b92edf78e81254a1b88d5ac3f5a5aa706842.tar cuberite-1379b92edf78e81254a1b88d5ac3f5a5aa706842.tar.gz cuberite-1379b92edf78e81254a1b88d5ac3f5a5aa706842.tar.bz2 cuberite-1379b92edf78e81254a1b88d5ac3f5a5aa706842.tar.lz cuberite-1379b92edf78e81254a1b88d5ac3f5a5aa706842.tar.xz cuberite-1379b92edf78e81254a1b88d5ac3f5a5aa706842.tar.zst cuberite-1379b92edf78e81254a1b88d5ac3f5a5aa706842.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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()) |