Update p_map.cpp

Updated the comment to make it clearer what it is doing (I hope!)
This commit is contained in:
Simon 2020-05-31 22:58:48 +01:00
parent af67930294
commit 802543ab30

View file

@ -4548,10 +4548,12 @@ AActor *P_LineAttack(AActor *t1, DAngle angle, double distance,
//Include pitch delta here //Include pitch delta here
DAngle pitchDelta; DAngle pitchDelta;
pitchDelta = (t1->Angles.Pitch - pitch); pitchDelta = (t1->Angles.Pitch - pitch);
if (damage == 0 || if (damage == 0 // Laser sight or other non-damage inflicting thing
//This is the catch the scenario is vanilla Doom (or suchlike) where a.BulletSlope is calculating a completely ||
//different pitch, if we are outside a tolerance of +/- 5 degrees, then just use the pitch of the //This is to catch the scenario in vanilla Doom (or suchlike) where a.BulletSlope is calculating a completely
//controller as we did before. This still allows a nice random scattering of projectiles from a shell //different pitch, if delta is outside a tolerance of +/- 5 degrees, then just use the pitch of the
//controller as we did before.
//Otherwise, pitch can vary +/- 5 degrees for a random scatter
fabs(pitchDelta.Degrees) > 5.f) fabs(pitchDelta.Degrees) > 5.f)
{ {
pitchDelta.Degrees = 0; pitchDelta.Degrees = 0;