Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 4980 → Rev 4981

/polymer/eduke32/build/src/engine.c
12601,7 → 12601,7
#endif
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 y31 = wal->y-y1, y34 = wal->y-wal2->y;
 
/polymer/eduke32/source/actors.c
108,7 → 108,7
}
 
// 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);
}
139,7 → 139,7
 
do
{
const walltype *wal;
const twalltype *wal;
const int32_t dasect = sectorlist[sectcnt++];
const int32_t startwall = sector[dasect].wallptr;
const int32_t endwall = startwall+sector[dasect].wallnum;
149,8 → 149,8
 
// Check if "hit" 1st or 3rd wall-point. This mainly makes sense
// for rectangular "ceiling light"-style sectors.
if (G_WallSpriteDist(&wall[startwall], s) < r ||
G_WallSpriteDist(&wall[wall[w2].point2], s) < r)
if (G_WallSpriteDist((twalltype *)&wall[startwall], s) < r ||
G_WallSpriteDist((twalltype *)&wall[wall[w2].point2], s) < r)
{
if (((sector[dasect].ceilingz-s->z)>>8) < r)
Sect_DamageCeilingOrFloor(0, dasect);
158,7 → 158,7
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)
{
int16_t sect = -1;