mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 19:02:45 +00:00
Some overflow checks. They're not proper like the other overflow checks, but they remove all the situations I've been able to discover without making stuff unnecessarily disappear.
This commit is contained in:
parent
63e58a02f8
commit
2244e9162b
1 changed files with 3 additions and 1 deletions
|
@ -1266,6 +1266,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
gyt = -FixedMul(tr_y, viewsin);
|
||||
tz = gxt-gyt;
|
||||
yscale1 = FixedDiv(projectiony, tz);
|
||||
if (yscale1 < 64) return; // Fix some funky visuals
|
||||
|
||||
offset += spritecachedinfo[lump].width;
|
||||
tr_x = thing->x + FixedMul(offset, FINECOSINE(thing->angle>>ANGLETOFINESHIFT)) - viewx;
|
||||
|
@ -1274,6 +1275,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
gyt = -FixedMul(tr_y, viewsin);
|
||||
tz = gxt-gyt;
|
||||
yscale2 = FixedDiv(projectiony, tz);
|
||||
if (yscale2 < 64) return; // Fix some funky visuals
|
||||
|
||||
if (ang >= ANGLE_180)
|
||||
{
|
||||
|
@ -1287,8 +1289,8 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
else
|
||||
range = 1;
|
||||
scalestep = (yscale2 - yscale1)/range;
|
||||
yscale = yscale1;
|
||||
//this_scale = FixedMul(this_scale, FixedDiv(yscale, yscale1));
|
||||
yscale = yscale1;
|
||||
}
|
||||
|
||||
xscale = FixedMul(xscale, ang_scale);
|
||||
|
|
Loading…
Reference in a new issue