diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 3b8afc5b7..8a4179d62 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -4381,12 +4381,8 @@ ACTOR_STATIC void G_MoveActors(void) { for (SPRITES_OF_SECT(sect, j)) { - switch (DYNAMICTILEMAP(sprite[j].picnum)) + if (A_CheckSpriteTileFlags(sprite[j].picnum, SFLAG_GREENSLIMEFOOD)) { - case LIZTROOP__STATIC: - case LIZMAN__STATIC: - case PIGCOP__STATIC: - case NEWBEAST__STATIC: if (ldist(s,&sprite[j]) < 768 && (klabs(s->z-sprite[j].z)<8192)) //Gulp them { t[5] = j; diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 37bf9bff7..053916eab 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -257,6 +257,7 @@ enum sflags_t { SFLAG_NODAMAGEPUSH = 0x00100000, SFLAG_NOWATERDIP = 0x00200000, SFLAG_HURTSPAWNBLOOD = 0x00400000, + SFLAG_GREENSLIMEFOOD = 0x00800000, }; // Custom projectiles "workslike" flags. diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 4d8db804f..1da8a4c50 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -11039,6 +11039,7 @@ static void A_InitEnemyFlags(void) int32_t SolidEnemies[] = { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN }; int32_t NoWaterDipEnemies[] = { OCTABRAIN, COMMANDER, DRONE }; + int32_t GreenSlimeFoodEnemies[] = { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST }; for (int i=GREENSLIME; i<=GREENSLIME+7; i++) SETFLAG(i, SFLAG_HARDCODED_BADGUY); @@ -11051,6 +11052,9 @@ static void A_InitEnemyFlags(void) for (int i=ARRAY_SIZE(NoWaterDipEnemies)-1; i>=0; i--) SETFLAG(NoWaterDipEnemies[i], SFLAG_NOWATERDIP); + + for (int i=ARRAY_SIZE(GreenSlimeFoodEnemies)-1; i>=0; i--) + SETFLAG(GreenSlimeFoodEnemies[i], SFLAG_GREENSLIMEFOOD); } #undef SETFLAG