mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +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
7094a064da
commit
7719cf27fa
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[viewssnum], ty);
|
fixed_t xscale, yscale;
|
||||||
fixed_t yscale = FixedDiv(projectiony[viewssnum], ty);
|
|
||||||
|
if (ty < FRACUNIT) // projection breaks down here
|
||||||
|
ty = FRACUNIT;
|
||||||
|
|
||||||
|
xscale = FixedDiv(projection[viewssnum], ty);
|
||||||
|
yscale = FixedDiv(projectiony[viewssnum], 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…
Add table
Reference in a new issue