diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index c223c94b9..757f5ed4a 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -8280,7 +8280,8 @@ int32_t A_CheckSwitchTile(int32_t i) // ACCESSSWITCH and ACCESSSWITCH2 are only active in one state so deal with // them separately. - if (PN == ACCESSSWITCH || PN == ACCESSSWITCH2) return 1; + if (PN == ACCESSSWITCH || PN == ACCESSSWITCH2) + return 1; // Loop to catch both states of switches. for (j=1; j>=0; j--) diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index b3cb5f22a..da2faf0bc 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -104,7 +104,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TILE_VIEWSCR (MAXTILES-5) 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 || \ (k)==STAT_FALLER || (k)==STAT_LIGHT) #define ROTFIXSPR_MAGIC 0x18190000 diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 04324c06b..8f7b58c06 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5033,13 +5033,15 @@ int32_t A_Spawn(int32_t j, int32_t pn) 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 (SS == 127) goto SPAWN_END; - if (A_CheckSwitchTile(i) == 1 && (CS&16)) + if (SS == 127) + 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))) { @@ -5049,7 +5051,9 @@ int32_t A_Spawn(int32_t j, int32_t pn) goto SPAWN_END; } } + CS |= 257; + if (sprite[i].pal && PN != ACCESSSWITCH && PN != ACCESSSWITCH2) sprite[i].pal = 0; goto SPAWN_END; @@ -5064,12 +5068,10 @@ int32_t A_Spawn(int32_t j, int32_t pn) } } - s = PN; - if (CS&1) 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 }