Fix the bullet stopping after the first entity

This commit is contained in:
smallmodel 2024-11-16 21:57:12 +01:00
parent a7dc8b3493
commit ffdfbc3c7d
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -2455,9 +2455,10 @@ float BulletAttack(
trace.fraction = 1;
}
vDeltaTrace = vTmpEnd - vTraceStart;
vDeltaTrace = vTraceStart - vTmpEnd;
if (!bBulletDone && DotProduct(vDeltaTrace, vDir) < 0) {
// Fixed in OPM
// Make sure the new trace doesn't start behind the end
// This can happen in rare circumstances if the trace is out of the world limit
break;
}