mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 19:02:45 +00:00
Fixed the between-objects sorting problem previously mentioned in the merge request. Now they're sorted by whichever sprite has an end closest to the camera, instead of the middle point previously used.
http://i.imgur.com/UyOKX5u.png <-- this common glitch with crawlas given MF_PAPER (THEY'RE NOT GOOD AT TURNING NEAR EDGES) used to show the behind-crawlas in front of the front-crawlas. Unfortunately, I've just discovered this issue (which happens with the old version of the sorting code too): http://i.imgur.com/QNjbATB.png but to be fair these crawlas have gotten stuck inside the edges of this platform, so I'm not sure I can do anything about this without cutting off Sonic's feet when he stands on the ground? shrug
This commit is contained in:
parent
66a845a33a
commit
fbff05bd17
1 changed files with 4 additions and 2 deletions
|
@ -1152,7 +1152,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
|
||||
// aspect ratio stuff
|
||||
xscale = FixedDiv(projection, tz);
|
||||
sortscale = FixedDiv(projectiony, tz);
|
||||
yscale = FixedDiv(projectiony, tz);
|
||||
|
||||
// decide which patch to use for sprite relative to player
|
||||
#ifdef RANGECHECK
|
||||
|
@ -1292,11 +1292,13 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
range = 1;
|
||||
|
||||
scalestep = (yscale2 - yscale)/range;
|
||||
|
||||
sortscale = max(yscale, yscale2);
|
||||
}
|
||||
else
|
||||
{
|
||||
yscale = sortscale;
|
||||
scalestep = 0;
|
||||
sortscale = yscale;
|
||||
}
|
||||
|
||||
xscale = FixedMul(xscale, ang_scale);
|
||||
|
|
Loading…
Reference in a new issue