From 62d68e2da0af30bed0a34f4905d57031e34ce34a Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 7 Feb 2001 17:40:56 +0000 Subject: [PATCH] --- source/enemy/npc.cpp | 3 +++ source/enemy/npc.h | 1 + 2 files changed, 4 insertions(+) diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index d26b8b3b4..079e2dcd6 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -343,6 +343,7 @@ void CNpc::detectCollisionWithPlayer() { // close enough for collision + m_oldControlFunc = m_controlFunc; m_controlFunc = NPC_CONTROL_COLLISION; } } @@ -953,6 +954,8 @@ void CNpc::processCollision() CPlayer *player = GameScene.getPlayer(); //player->takeDamage( m_data[m_type].damageToUserType ); + + m_controlFunc = m_oldControlFunc; } void CNpc::processTimer(int _frames) diff --git a/source/enemy/npc.h b/source/enemy/npc.h index 3e593b474..d53f20da2 100644 --- a/source/enemy/npc.h +++ b/source/enemy/npc.h @@ -357,6 +357,7 @@ protected: NPC_UNIT_TYPE m_type; NPC_CONTROL_FUNC m_controlFunc; + NPC_CONTROL_FUNC m_oldControlFunc; NPC_TIMER_FUNC m_timerFunc; NPC_SENSOR_FUNC m_sensorFunc; CNpcPath m_npcPath;