mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
More twalltype
git-svn-id: https://svn.eduke32.com/eduke32@4981 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b9834f9832
commit
88e0bfd7d3
2 changed files with 6 additions and 6 deletions
|
@ -12601,7 +12601,7 @@ restart_grand:
|
||||||
#endif
|
#endif
|
||||||
for (cnt=sec->wallnum,wal=&wall[sec->wallptr]; cnt>0; cnt--,wal++)
|
for (cnt=sec->wallnum,wal=&wall[sec->wallptr]; cnt>0; cnt--,wal++)
|
||||||
{
|
{
|
||||||
const walltype *const wal2 = &wall[wal->point2];
|
const twalltype *const wal2 = (twalltype *)&wall[wal->point2];
|
||||||
const int32_t x31 = wal->x-x1, x34 = wal->x-wal2->x;
|
const int32_t x31 = wal->x-x1, x34 = wal->x-wal2->x;
|
||||||
const int32_t y31 = wal->y-y1, y34 = wal->y-wal2->y;
|
const int32_t y31 = wal->y-y1, y34 = wal->y-wal2->y;
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ void G_ClearCameraView(DukePlayer_t *ps)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manhattan distance between wall-point and sprite.
|
// Manhattan distance between wall-point and sprite.
|
||||||
static int32_t G_WallSpriteDist(const walltype *wal, const spritetype *spr)
|
static inline int32_t G_WallSpriteDist(const twalltype *wal, const spritetype *spr)
|
||||||
{
|
{
|
||||||
return klabs(wal->x - spr->x) + klabs(wal->y - spr->y);
|
return klabs(wal->x - spr->x) + klabs(wal->y - spr->y);
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ void A_RadiusDamage(int32_t i, int32_t r, int32_t hp1, int32_t hp2, int32_t hp3,
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
const walltype *wal;
|
const twalltype *wal;
|
||||||
const int32_t dasect = sectorlist[sectcnt++];
|
const int32_t dasect = sectorlist[sectcnt++];
|
||||||
const int32_t startwall = sector[dasect].wallptr;
|
const int32_t startwall = sector[dasect].wallptr;
|
||||||
const int32_t endwall = startwall+sector[dasect].wallnum;
|
const int32_t endwall = startwall+sector[dasect].wallnum;
|
||||||
|
@ -149,8 +149,8 @@ void A_RadiusDamage(int32_t i, int32_t r, int32_t hp1, int32_t hp2, int32_t hp3,
|
||||||
|
|
||||||
// Check if "hit" 1st or 3rd wall-point. This mainly makes sense
|
// Check if "hit" 1st or 3rd wall-point. This mainly makes sense
|
||||||
// for rectangular "ceiling light"-style sectors.
|
// for rectangular "ceiling light"-style sectors.
|
||||||
if (G_WallSpriteDist(&wall[startwall], s) < r ||
|
if (G_WallSpriteDist((twalltype *)&wall[startwall], s) < r ||
|
||||||
G_WallSpriteDist(&wall[wall[w2].point2], s) < r)
|
G_WallSpriteDist((twalltype *)&wall[wall[w2].point2], s) < r)
|
||||||
{
|
{
|
||||||
if (((sector[dasect].ceilingz-s->z)>>8) < r)
|
if (((sector[dasect].ceilingz-s->z)>>8) < r)
|
||||||
Sect_DamageCeilingOrFloor(0, dasect);
|
Sect_DamageCeilingOrFloor(0, dasect);
|
||||||
|
@ -158,7 +158,7 @@ void A_RadiusDamage(int32_t i, int32_t r, int32_t hp1, int32_t hp2, int32_t hp3,
|
||||||
Sect_DamageCeilingOrFloor(1, dasect);
|
Sect_DamageCeilingOrFloor(1, dasect);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (w=startwall,wal=&wall[startwall]; w<endwall; w++,wal++)
|
for (w=startwall,wal=(twalltype *)&wall[startwall]; w<endwall; w++,wal++)
|
||||||
if (G_WallSpriteDist(wal, s) < r)
|
if (G_WallSpriteDist(wal, s) < r)
|
||||||
{
|
{
|
||||||
int16_t sect = -1;
|
int16_t sect = -1;
|
||||||
|
|
Loading…
Reference in a new issue