- Reduced potential for overflow in R_ProjectSprite().

SVN r1725 (trunk)
This commit is contained in:
Randy Heit 2009-07-17 01:49:28 +00:00
parent 198ffea7ee
commit f39cde0486
2 changed files with 2 additions and 1 deletions

View file

@ -1,4 +1,5 @@
July 16, 2009
- Reduced potential for overflow in R_ProjectSprite().
- Moved the IF_ADDITIVETIME check earlier in APowerup::HandlePickup so
that additive time powerups can be activated before the existing
power has entered its blink threshold.

View file

@ -1381,7 +1381,7 @@ void R_ProjectSprite (AActor *thing, int fakeside)
vis->RenderStyle = thing->RenderStyle;
vis->FillColor = thing->fillcolor;
vis->xscale = xscale;
vis->yscale = Scale (InvZtoScale, yscale, tz)>>4;
vis->yscale = Scale (InvZtoScale, yscale, tz << 4);
vis->depth = tz;
vis->idepth = (DWORD)DivScale32 (1, tz) >> 1; // tz is 20.12, so idepth ought to be 12.20, but
vis->cx = tx2; // signed math makes it 13.19