mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Continue traveling if the bullet trace goes backwards
This commit is contained in:
parent
c5721f8a2c
commit
fcc4e94655
1 changed files with 9 additions and 0 deletions
|
@ -2207,6 +2207,8 @@ float BulletAttack(
|
|||
oldfrac = -1;
|
||||
|
||||
while (trace.fraction < 1.0f) {
|
||||
Vector vDeltaTrace;
|
||||
|
||||
trace = G_Trace(
|
||||
vTraceStart, vec_zero, vec_zero, vTraceEnd, newowner, MASK_SHOT_TRIG, false, "BulletAttack", true
|
||||
);
|
||||
|
@ -2452,6 +2454,13 @@ float BulletAttack(
|
|||
} else {
|
||||
trace.fraction = 1;
|
||||
}
|
||||
|
||||
vDeltaTrace = vTmpEnd - vTraceStart;
|
||||
if (!bBulletDone && DotProduct(vDeltaTrace, vDir) < 0) {
|
||||
// Fixed in OPM
|
||||
// This can happen in rare circumstances if the trace is out of the world limit
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue