mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 18:01:16 +00:00
change limits for tx based on fov, by multiplying by fovtan
this makes it so that higher fov values can actually let you see all the sprites that should be in the view
This commit is contained in:
parent
35e5d673e0
commit
65d6b04fd2
1 changed files with 2 additions and 2 deletions
|
@ -1407,7 +1407,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
basetx = tx = FixedMul(tr_x, viewsin) - FixedMul(tr_y, viewcos); // sideways distance
|
||||
|
||||
// too far off the side?
|
||||
if (!papersprite && abs(tx) > tz<<2) // papersprite clipping is handled later
|
||||
if (!papersprite && abs(tx) > FixedMul(tz, fovtan)<<2) // papersprite clipping is handled later
|
||||
return;
|
||||
|
||||
// aspect ratio stuff
|
||||
|
@ -1600,7 +1600,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
xscale2 = FixedDiv(projection, tz2);
|
||||
}
|
||||
|
||||
if (tx2 < -(tz2<<2) || tx > tz<<2) // too far off the side?
|
||||
if (tx2 < -(FixedMul(tz2, fovtan)<<2) || tx > FixedMul(tz, fovtan)<<2) // too far off the side?
|
||||
return;
|
||||
|
||||
// TODO: tx clamping
|
||||
|
|
Loading…
Reference in a new issue