diff --git a/source/blood/src/actor.cpp b/source/blood/src/actor.cpp index a6041ad45..767cd9b1b 100644 --- a/source/blood/src/actor.cpp +++ b/source/blood/src/actor.cpp @@ -5694,7 +5694,7 @@ void actProcessSprites(void) if (gModernMap && (pXSprite->locked || pXSprite->isTriggered)) continue; - //if (pSprite->type == kThingDroppedLifeLeech) pXSprite->target = -1; why? + if (pSprite->type == kThingDroppedLifeLeech) pXSprite->target = -1; for (int nSprite2 = headspritestat[kStatDude]; nSprite2 >= 0; nSprite2 = nNextSprite) { @@ -5710,7 +5710,7 @@ void actProcessSprites(void) int proxyDist = 96; if (pSprite->type == kModernThingEnemyLifeLeech) proxyDist = 512; - else if (pSprite->type == kThingDroppedLifeLeech /*&& pXSprite->target == -1*/) { + else if (pSprite->type == kThingDroppedLifeLeech && pXSprite->target == -1) { int nOwner = actOwnerIdToSpriteId(pSprite->owner); spritetype *pOwner = &sprite[nOwner]; PLAYER *pPlayer = &gPlayer[pOwner->type-kDudePlayer1]; @@ -6367,6 +6367,8 @@ spritetype * actSpawnSprite(int nSector, int x, int y, int z, int nStat, char a6 int nXSprite = dbInsertXSprite(nSprite); gSpriteHit[nXSprite].florhit = 0; gSpriteHit[nXSprite].ceilhit = 0; + if (!VanillaMode()) + xsprite[nXSprite].target = -1; } return pSprite; } @@ -6455,6 +6457,8 @@ spritetype * actSpawnSprite(spritetype *pSource, int nStat) int nXSprite = dbInsertXSprite(nSprite); gSpriteHit[nXSprite].florhit = 0; gSpriteHit[nXSprite].ceilhit = 0; + if (!VanillaMode()) + xsprite[nXSprite].target = -1; return pSprite; } diff --git a/source/blood/src/trig.cpp b/source/blood/src/trig.cpp index 54913e667..0e5d6829e 100644 --- a/source/blood/src/trig.cpp +++ b/source/blood/src/trig.cpp @@ -25,6 +25,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- +#include "build.h" +#include "pragmas.h" +#include "common_game.h" #include "resource.h" #include "trig.h"