Skip to content

Commit

Permalink
Merge pull request #147 from BSVino/fix-barrel-crash
Browse files Browse the repository at this point in the history
Fix a crash occurring when a prop explodes
  • Loading branch information
TomyLobo authored Dec 16, 2018
2 parents e41452b + ad70f0b commit 0efe0dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mp/src/game/server/sdk/sdk_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ int CSDKPlayer::OnTakeDamage( const CTakeDamageInfo &inputInfo )
Vector vecFacing;
AngleVectors(EyeAngles(), &vecFacing);

float flDamageMultiplier = RemapValClamped((GetAbsOrigin() - pGrenade->GetAbsOrigin()).Normalized().Dot(vecFacing), -0.7, 0.7, 1.0, 0.5);
float flDamageMultiplier = RemapValClamped((GetAbsOrigin() - pInflictor->GetAbsOrigin()).Normalized().Dot(vecFacing), -0.7, 0.7, 1.0, 0.5);
flDamage *= flDamageMultiplier;

// award style points
Expand Down

0 comments on commit 0efe0dd

Please sign in to comment.