Skip to content

Commit

Permalink
Fix a crash occurring when a prop explodes
Browse files Browse the repository at this point in the history
Example: Vanilla HL2 barrel
  • Loading branch information
TomyLobo committed Nov 18, 2018
1 parent 6022e03 commit ad70f0b
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 ad70f0b

Please sign in to comment.