mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Remedy some quirky rendering of hitboxes if your viewpoint is too close
It's not correct but it's better than before.
This commit is contained in:
parent
99653de134
commit
7527fdbb56
1 changed files with 7 additions and 2 deletions
|
@ -82,8 +82,13 @@ draw_bbox_col
|
||||||
{
|
{
|
||||||
struct bbox_col *col = &bb->col[p];
|
struct bbox_col *col = &bb->col[p];
|
||||||
|
|
||||||
fixed_t xscale = FixedDiv(projection, ty);
|
fixed_t xscale, yscale;
|
||||||
fixed_t yscale = FixedDiv(projectiony, ty);
|
|
||||||
|
if (ty < FRACUNIT) // projection breaks down here
|
||||||
|
ty = FRACUNIT;
|
||||||
|
|
||||||
|
xscale = FixedDiv(projection, ty);
|
||||||
|
yscale = FixedDiv(projectiony, ty);
|
||||||
|
|
||||||
col->x = (centerxfrac + FixedMul(tx, xscale)) / FRACUNIT;
|
col->x = (centerxfrac + FixedMul(tx, xscale)) / FRACUNIT;
|
||||||
col->y = (centeryfrac - FixedMul(bb->tz, yscale));
|
col->y = (centeryfrac - FixedMul(bb->tz, yscale));
|
||||||
|
|
Loading…
Reference in a new issue