A couple of very minor code beauty tweaks.

git-svn-id: https://svn.eduke32.com/eduke32@4346 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-02-22 19:38:47 +00:00
parent caeb012843
commit 1b1cb73e1c
3 changed files with 12 additions and 9 deletions

View file

@ -8280,7 +8280,8 @@ int32_t A_CheckSwitchTile(int32_t i)
// ACCESSSWITCH and ACCESSSWITCH2 are only active in one state so deal with // ACCESSSWITCH and ACCESSSWITCH2 are only active in one state so deal with
// them separately. // them separately.
if (PN == ACCESSSWITCH || PN == ACCESSSWITCH2) return 1; if (PN == ACCESSSWITCH || PN == ACCESSSWITCH2)
return 1;
// Loop to catch both states of switches. // Loop to catch both states of switches.
for (j=1; j>=0; j--) for (j=1; j>=0; j--)

View file

@ -104,7 +104,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TILE_VIEWSCR (MAXTILES-5) #define TILE_VIEWSCR (MAXTILES-5)
EDUKE32_STATIC_ASSERT(5 <= MAXTILES-MAXUSERTILES); EDUKE32_STATIC_ASSERT(5 <= MAXTILES-MAXUSERTILES);
// sprites with these statnums should be considered for fixing (bitmap) // sprites with these statnums should be considered for fixing
#define ROTFIXSPR_STATNUMP(k) ((k)==STAT_DEFAULT || (k)==STAT_STANDABLE || (k)==STAT_FX || \ #define ROTFIXSPR_STATNUMP(k) ((k)==STAT_DEFAULT || (k)==STAT_STANDABLE || (k)==STAT_FX || \
(k)==STAT_FALLER || (k)==STAT_LIGHT) (k)==STAT_FALLER || (k)==STAT_LIGHT)
#define ROTFIXSPR_MAGIC 0x18190000 #define ROTFIXSPR_MAGIC 0x18190000

View file

@ -5033,13 +5033,15 @@ int32_t A_Spawn(int32_t j, int32_t pn)
actor[i].actorstayput = actor[i].lightId = actor[i].extra = -1; actor[i].actorstayput = actor[i].lightId = actor[i].extra = -1;
if (PN != SPEAKER && PN != LETTER && PN != DUCK && PN != TARGET && PN != TRIPBOMB && PN != VIEWSCREEN && PN != VIEWSCREEN2 && (CS&48)) if ((CS&48) && PN != SPEAKER && PN != LETTER && PN != DUCK && PN != TARGET && PN != TRIPBOMB && PN != VIEWSCREEN && PN != VIEWSCREEN2)
if (!(PN >= CRACK1 && PN <= CRACK4)) if (!(PN >= CRACK1 && PN <= CRACK4))
{ {
if (SS == 127) goto SPAWN_END; if (SS == 127)
if (A_CheckSwitchTile(i) == 1 && (CS&16)) goto SPAWN_END;
if (A_CheckSwitchTile(i) && (CS&16))
{ {
if (PN != ACCESSSWITCH && PN != ACCESSSWITCH2 && sprite[i].pal) if (sprite[i].pal && PN != ACCESSSWITCH && PN != ACCESSSWITCH2)
{ {
if (((!g_netServer && ud.multimode < 2)) || ((g_netServer || ud.multimode > 1) && !GTFLAGS(GAMETYPE_DMSWITCHES))) if (((!g_netServer && ud.multimode < 2)) || ((g_netServer || ud.multimode > 1) && !GTFLAGS(GAMETYPE_DMSWITCHES)))
{ {
@ -5049,7 +5051,9 @@ int32_t A_Spawn(int32_t j, int32_t pn)
goto SPAWN_END; goto SPAWN_END;
} }
} }
CS |= 257; CS |= 257;
if (sprite[i].pal && PN != ACCESSSWITCH && PN != ACCESSSWITCH2) if (sprite[i].pal && PN != ACCESSSWITCH && PN != ACCESSSWITCH2)
sprite[i].pal = 0; sprite[i].pal = 0;
goto SPAWN_END; goto SPAWN_END;
@ -5064,12 +5068,10 @@ int32_t A_Spawn(int32_t j, int32_t pn)
} }
} }
s = PN;
if (CS&1) if (CS&1)
CS |= 256; CS |= 256;
if (!G_InitActor(i, s, 0)) if (!G_InitActor(i, sprite[i].picnum, 0))
T2 = T5 = 0; // AC_MOVE_ID, AC_ACTION_ID T2 = T5 = 0; // AC_MOVE_ID, AC_ACTION_ID
} }