mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
The Abyss crash fix.
git-svn-id: https://svn.eduke32.com/eduke32@533 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a5388fc0a4
commit
2440ab75b9
1 changed files with 7 additions and 0 deletions
|
@ -8316,8 +8316,15 @@ long hitscan(long xs, long ys, long zs, short sectnum, long vx, long vy, long vz
|
|||
if ((cstat&64) != 0)
|
||||
if ((zs > intz) == ((cstat&8)==0)) continue;
|
||||
|
||||
#if 1 // Abyss crash prevention code ((intz-zs)*zx overflowing a 8-bit word)
|
||||
zz=(long)((intz-zs)*vx);
|
||||
intx = xs+scale(zz,1,vz);
|
||||
zz=(long)((intz-zs)*vy);
|
||||
inty = ys+scale(zz,1,vz);
|
||||
#else
|
||||
intx = xs+scale(intz-zs,vx,vz);
|
||||
inty = ys+scale(intz-zs,vy,vz);
|
||||
#endif
|
||||
|
||||
if (klabs(intx-xs)+klabs(inty-ys) > klabs((*hitx)-xs)+klabs((*hity)-ys)) continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue