mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
A few stylistic tweaks, like substituting missed SE_* enum constants.
BUILD_LUNATIC. git-svn-id: https://svn.eduke32.com/eduke32@4353 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f077d57547
commit
f346e46ed8
2 changed files with 23 additions and 18 deletions
|
@ -6702,8 +6702,8 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
break;
|
||||
|
||||
case SE_11_SWINGING_DOOR://Pivitor rotater
|
||||
if (sp->ang>1024) T4 = 2;
|
||||
else T4 = -2;
|
||||
T4 = (sp->ang > 1024) ? 2 : -2;
|
||||
/* fall-through */
|
||||
case SE_0_ROTATING_SECTOR:
|
||||
case SE_2_EARTHQUAKE://Earthquakemakers
|
||||
case SE_5://Boss Creature
|
||||
|
@ -6713,12 +6713,11 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
case SE_16_REACTOR://That rotating blocker reactor thing
|
||||
case SE_26://ESCELATOR
|
||||
case SE_30_TWO_WAY_TRAIN://No rotational subways
|
||||
if (sp->lotag == 0)
|
||||
if (sp->lotag == SE_0_ROTATING_SECTOR)
|
||||
{
|
||||
if (sector[sect].lotag == ST_30_ROTATE_RISE_BRIDGE)
|
||||
{
|
||||
if (sp->pal) sprite[i].clipdist = 1;
|
||||
else sprite[i].clipdist = 0;
|
||||
sprite[i].clipdist = (sp->pal) ? 1 : 0;
|
||||
T4 = sector[sect].floorz;
|
||||
sector[sect].hitag = i;
|
||||
}
|
||||
|
@ -6727,7 +6726,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
{
|
||||
if (sprite[j].statnum < MAXSTATUS)
|
||||
if (sprite[j].picnum == SECTOREFFECTOR &&
|
||||
sprite[j].lotag == 1 &&
|
||||
sprite[j].lotag == SE_1_PIVOT &&
|
||||
sprite[j].hitag == sp->hitag)
|
||||
{
|
||||
if (sp->ang == 512)
|
||||
|
@ -6759,12 +6758,14 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
tempwallptr++;
|
||||
if (tempwallptr > 2047)
|
||||
{
|
||||
Bsprintf_nowarn(tempbuf,"Too many moving sectors at (%d,%d).\n",TrackerCast(wall[s].x),TrackerCast(wall[s].y));
|
||||
Bsprintf_nowarn(tempbuf, "Too many moving sectors at (%d,%d).\n",
|
||||
TrackerCast(wall[s].x),TrackerCast(wall[s].y));
|
||||
G_GameExit(tempbuf);
|
||||
}
|
||||
}
|
||||
|
||||
if (sp->lotag == SE_30_TWO_WAY_TRAIN || sp->lotag == SE_6_SUBWAY || sp->lotag == SE_14_SUBWAY_CAR || sp->lotag == SE_5)
|
||||
if (sp->lotag == SE_5 || sp->lotag == SE_30_TWO_WAY_TRAIN ||
|
||||
sp->lotag == SE_6_SUBWAY || sp->lotag == SE_14_SUBWAY_CAR)
|
||||
{
|
||||
#ifdef YAX_ENABLE
|
||||
int32_t outerwall=-1;
|
||||
|
@ -6772,9 +6773,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
startwall = sector[sect].wallptr;
|
||||
endwall = startwall+sector[sect].wallnum;
|
||||
|
||||
if (sector[sect].hitag == UINT16_MAX)
|
||||
sp->extra = 0;
|
||||
else sp->extra = 1;
|
||||
sp->extra = (sector[sect].hitag != UINT16_MAX);
|
||||
|
||||
// TRAIN_SECTOR_TO_SE_INDEX
|
||||
sector[sect].hitag = i;
|
||||
|
|
|
@ -953,8 +953,11 @@ static void resetprestat(int32_t snum,int32_t g)
|
|||
|
||||
}
|
||||
|
||||
// tweak moving sectors with these SE lotags
|
||||
#define FIXSPR_SELOTAGP(k) ((k==0) || (k==6) || (k==14))
|
||||
// Tweak sprites contained in moving sectors with these SE lotags.
|
||||
#define FIXSPR_SELOTAGP(k) \
|
||||
((k)==SE_0_ROTATING_SECTOR \
|
||||
|| (k)==SE_6_SUBWAY \
|
||||
|| (k)==SE_14_SUBWAY_CAR)
|
||||
|
||||
// Set up sprites in moving sectors that are to be fixed wrt a certain pivot
|
||||
// position and should not diverge from it due to roundoff error in the future.
|
||||
|
@ -971,13 +974,16 @@ static void G_SetupRotfixedSprites(void)
|
|||
int32_t firstrun = 1;
|
||||
#endif
|
||||
int32_t j = headspritesect[sprite[i].sectnum];
|
||||
|
||||
while (j>=0)
|
||||
{
|
||||
const spritetype *const spr = &sprite[j];
|
||||
|
||||
// TRIPBOMB uses t_data[7] for its own purposes. Wouldn't be
|
||||
// too useful with moving sectors anyway
|
||||
if ((ROTFIXSPR_STATNUMP(sprite[j].statnum) && sprite[j].picnum!=TRIPBOMB) ||
|
||||
((sprite[j].statnum==STAT_ACTOR || sprite[j].statnum==STAT_ZOMBIEACTOR) &&
|
||||
A_CheckSpriteTileFlags(sprite[j].picnum, SFLAG_ROTFIXED)))
|
||||
if ((ROTFIXSPR_STATNUMP(spr->statnum) && spr->picnum!=TRIPBOMB) ||
|
||||
((spr->statnum==STAT_ACTOR || spr->statnum==STAT_ZOMBIEACTOR) &&
|
||||
A_CheckSpriteTileFlags(spr->picnum, SFLAG_ROTFIXED)))
|
||||
{
|
||||
int32_t pivot = i;
|
||||
|
||||
|
@ -987,8 +993,8 @@ static void G_SetupRotfixedSprites(void)
|
|||
{
|
||||
// let's hope we don't step on anyone's toes here
|
||||
actor[j].t_data[7] = ROTFIXSPR_MAGIC | pivot; // 'rs' magic + pivot SE sprite index
|
||||
actor[j].t_data[8] = sprite[j].x - sprite[pivot].x;
|
||||
actor[j].t_data[9] = sprite[j].y - sprite[pivot].y;
|
||||
actor[j].t_data[8] = spr->x - sprite[pivot].x;
|
||||
actor[j].t_data[9] = spr->y - sprite[pivot].y;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue