From f33844b2820ec694ca9d74da02269eef5fdb2690 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Aug 2001 14:53:35 +0000 Subject: [PATCH] --- source/enemy/nmjfish.cpp | 16 ++++++++++++++++ source/enemy/nmjfish.h | 1 + 2 files changed, 17 insertions(+) diff --git a/source/enemy/nmjfish.cpp b/source/enemy/nmjfish.cpp index fd2da4033..9e153e0f5 100644 --- a/source/enemy/nmjfish.cpp +++ b/source/enemy/nmjfish.cpp @@ -929,3 +929,19 @@ void CNpcMotherJellyfishEnemy::collidedWith(CThing *_thisThing) } } } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +u8 CNpcMotherJellyfishEnemy::hasBeenAttacked() +{ + if ( !alwaysThink() ) + { + if ( m_controlFunc != NPC_CONTROL_SHOT ) + { + m_controlFunc = NPC_CONTROL_SHOT; + m_state = NPC_GENERIC_HIT_CHECK_HEALTH; + } + } + + return( true ); +} diff --git a/source/enemy/nmjfish.h b/source/enemy/nmjfish.h index d8fac8e86..e546d1b09 100644 --- a/source/enemy/nmjfish.h +++ b/source/enemy/nmjfish.h @@ -33,6 +33,7 @@ public: void shutdown(); void setupWaypoints( sThingActor *ThisActor ); bool alwaysThink(); + u8 hasBeenAttacked(); protected: void processClose( int _frames );