From d7b88df6af44950b462785f5c206cd31f6ddebef Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 28 Dec 2014 20:57:13 +0000 Subject: [PATCH] actors.c: replace hard-coded list with missing check for SFLAG_NODAMAGEPUSH. In A_RadiusDamage(). The code snippet that is disabled for such actors increases the damaged actor's .xvel by (4 times the) damage amount and is responsible for the strange effect of enemies becoming faster TOWARDS the player on being hit with an RPG frontally. Thanks to Fox for a keen eye. git-svn-id: https://svn.eduke32.com/eduke32@4863 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 3 +-- polymer/eduke32/source/game.c | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index b5e81fb86..c79f62f28 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -271,8 +271,7 @@ SKIPWALLCHECK: actor[j].extra = hp1 + (krand()%(hp2-hp1)); } - if (sprite[j].picnum != TANK && sprite[j].picnum != ROTATEGUN && sprite[j].picnum != RECON && sprite[j].picnum != BOSS1 && - sprite[j].picnum != BOSS2 && sprite[j].picnum != BOSS3 && sprite[j].picnum != BOSS4) + if (!A_CheckSpriteFlags(j, SFLAG_NODAMAGEPUSH)) { if (sj->xvel < 0) sj->xvel = 0; sj->xvel += (s->extra<<2); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 67ff3c5f2..d8b85f1c5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10772,9 +10772,14 @@ static void G_LoadExtraPalettes(void) // Has to be after setting the dynamic names (e.g. SHARK). static void A_InitEnemyFlags(void) { - int32_t DukeEnemies[] = { SHARK, RECON, DRONE, LIZTROOPONTOILET, LIZTROOPJUSTSIT, LIZTROOPSTAYPUT, LIZTROOPSHOOT, LIZTROOPJETPACK, LIZTROOPSHOOT, LIZTROOPDUCKING, - LIZTROOPRUNNING, LIZTROOP, OCTABRAIN, COMMANDER, COMMANDERSTAYPUT, PIGCOP, PIGCOPSTAYPUT, PIGCOPDIVE, EGG, LIZMAN, LIZMANSPITTING, LIZMANJUMP, ORGANTIC, + int32_t DukeEnemies[] = { + SHARK, RECON, DRONE, + LIZTROOPONTOILET, LIZTROOPJUSTSIT, LIZTROOPSTAYPUT, LIZTROOPSHOOT, + LIZTROOPJETPACK, LIZTROOPSHOOT, LIZTROOPDUCKING, LIZTROOPRUNNING, LIZTROOP, + OCTABRAIN, COMMANDER, COMMANDERSTAYPUT, PIGCOP, PIGCOPSTAYPUT, PIGCOPDIVE, EGG, + LIZMAN, LIZMANSPITTING, LIZMANJUMP, ORGANTIC, BOSS1, BOSS2, BOSS3, BOSS4, RAT, ROTATEGUN }; + int32_t i, SolidEnemies[] = { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN }; for (i=GREENSLIME; i<=GREENSLIME+7; i++)