From 6319b6fb6014eff67e4fd7f4067a7bd889528375 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 23 Jun 2017 03:58:13 +0000 Subject: [PATCH] Change hard-coded subway effect damage to generic explosive damage that can be handled by CON. Fixes subway kills not counting toward the dead monster count and allows CON scripts to handle subway damage however they like. git-svn-id: https://svn.eduke32.com/eduke32@6225 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/actors.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index 50ba1c61f..dc673ca15 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -5607,7 +5607,7 @@ static void MaybeTrainKillPlayer(const spritetype *pSprite, int setOPos) } // i: SE spritenum -static void MaybeTrainKillEnemies(int spriteNum, int numGuts) +static void MaybeTrainKillEnemies(int spriteNum) { int findSprite = headspritesect[sprite[OW(spriteNum)].sectnum]; @@ -5623,9 +5623,8 @@ static void MaybeTrainKillEnemies(int spriteNum, int numGuts) if (sectNum == sprite[spriteNum].sectnum) { - A_DoGutsDir(findSprite, JIBS6, numGuts); - A_PlaySound(SQUISHED, findSprite); - A_DeleteSprite(findSprite); + actor[findSprite].picnum = RADIUSEXPLOSION; + actor[findSprite].extra = g_impactDamage << 10; } } @@ -6049,7 +6048,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 if (ud.noclip == 0 && pSprite->xvel >= 192) MaybeTrainKillPlayer(pSprite, 1); - MaybeTrainKillEnemies(spriteNum, 72); + MaybeTrainKillEnemies(spriteNum); } } else @@ -6190,7 +6189,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 if (ud.noclip == 0) MaybeTrainKillPlayer(pSprite, 1); - MaybeTrainKillEnemies(spriteNum, 24); + MaybeTrainKillEnemies(spriteNum); } }