1
0

Merge pull request #2881 from LogicParrot/knockback

Fixed wrong knockback direction after explosion damage
This commit is contained in:
LogicParrot 2016-01-17 10:16:47 +02:00
commit c177a528e5

View File

@ -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())