1
0

Fixed wrong knockback direction after explosion damage

This commit is contained in:
LogicParrot 2016-01-16 18:48:07 +02:00
parent bc4a6ec3ea
commit 1379b92edf

View File

@ -825,6 +825,10 @@ void cPlayer::SetFlying(bool a_IsFlying)
bool cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI) 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 ((a_TDI.DamageType != dtInVoid) && (a_TDI.DamageType != dtPlugin))
{ {
if (IsGameModeCreative() || IsGameModeSpectator()) if (IsGameModeCreative() || IsGameModeSpectator())