diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-01-17 09:16:47 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-01-17 09:16:47 +0100 |
commit | c177a528e59ea33719f58f63980321023bcb0198 (patch) | |
tree | bd98f33dcf4b728eb817ee0cad18a1d13be7a4af /src | |
parent | Merge pull request #2883 from jammet/patch-8 (diff) | |
parent | Fixed wrong knockback direction after explosion damage (diff) | |
download | cuberite-c177a528e59ea33719f58f63980321023bcb0198.tar cuberite-c177a528e59ea33719f58f63980321023bcb0198.tar.gz cuberite-c177a528e59ea33719f58f63980321023bcb0198.tar.bz2 cuberite-c177a528e59ea33719f58f63980321023bcb0198.tar.lz cuberite-c177a528e59ea33719f58f63980321023bcb0198.tar.xz cuberite-c177a528e59ea33719f58f63980321023bcb0198.tar.zst cuberite-c177a528e59ea33719f58f63980321023bcb0198.zip |
Diffstat (limited to 'src')
-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()) |