mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Make getceilzofslopeptr/getflorzofslopeptr/getzsofslopeptr not invoke the structure trackers
git-svn-id: https://svn.eduke32.com/eduke32@7583 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b46bc73322
commit
5a814eb261
1 changed files with 10 additions and 8 deletions
|
@ -11723,10 +11723,10 @@ int32_t getceilzofslopeptr(const usectortype *sec, int32_t dax, int32_t day)
|
||||||
return sec->ceilingz;
|
return sec->ceilingz;
|
||||||
|
|
||||||
uwalltype const *wal = (uwalltype *)&wall[sec->wallptr];
|
uwalltype const *wal = (uwalltype *)&wall[sec->wallptr];
|
||||||
|
uwalltype const *wal2 = (uwalltype *)&wall[wal->point2];
|
||||||
|
|
||||||
// floor(sqrt(2**31-1)) == 46340
|
|
||||||
vec2_t const w = *(vec2_t const *)wal;
|
vec2_t const w = *(vec2_t const *)wal;
|
||||||
vec2_t const d = { wall[wal->point2].x-w.x , wall[wal->point2].y-w.y };
|
vec2_t const d = { wal2->x - w.x, wal2->y - w.y };
|
||||||
|
|
||||||
int const i = nsqrtasm(uhypsq(d.x,d.y))<<5;
|
int const i = nsqrtasm(uhypsq(d.x,d.y))<<5;
|
||||||
if (i == 0) return sec->ceilingz;
|
if (i == 0) return sec->ceilingz;
|
||||||
|
@ -11741,9 +11741,10 @@ int32_t getflorzofslopeptr(const usectortype *sec, int32_t dax, int32_t day)
|
||||||
return sec->floorz;
|
return sec->floorz;
|
||||||
|
|
||||||
uwalltype const *wal = (uwalltype *)&wall[sec->wallptr];
|
uwalltype const *wal = (uwalltype *)&wall[sec->wallptr];
|
||||||
|
uwalltype const *wal2 = (uwalltype *)&wall[wal->point2];
|
||||||
|
|
||||||
vec2_t const w = *(vec2_t const *)wal;
|
vec2_t const w = *(vec2_t const *)wal;
|
||||||
vec2_t const d = { wall[wal->point2].x-w.x , wall[wal->point2].y-w.y };
|
vec2_t const d = { wal2->x - w.x, wal2->y - w.y };
|
||||||
|
|
||||||
int const i = nsqrtasm(uhypsq(d.x,d.y))<<5;
|
int const i = nsqrtasm(uhypsq(d.x,d.y))<<5;
|
||||||
if (i == 0) return sec->floorz;
|
if (i == 0) return sec->floorz;
|
||||||
|
@ -11761,6 +11762,7 @@ void getzsofslopeptr(const usectortype *sec, int32_t dax, int32_t day, int32_t *
|
||||||
|
|
||||||
uwalltype const *wal = (uwalltype *)&wall[sec->wallptr];
|
uwalltype const *wal = (uwalltype *)&wall[sec->wallptr];
|
||||||
uwalltype const *wal2 = (uwalltype *)&wall[wal->point2];
|
uwalltype const *wal2 = (uwalltype *)&wall[wal->point2];
|
||||||
|
|
||||||
vec2_t const d = { wal2->x - wal->x, wal2->y - wal->y };
|
vec2_t const d = { wal2->x - wal->x, wal2->y - wal->y };
|
||||||
|
|
||||||
int const i = nsqrtasm(uhypsq(d.x,d.y))<<5;
|
int const i = nsqrtasm(uhypsq(d.x,d.y))<<5;
|
||||||
|
|
Loading…
Reference in a new issue