From 9a2314b3ad6a83f220d59afb035a1ac6d3f85353 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 10 May 2001 20:27:33 +0000 Subject: [PATCH] --- source/enemy/npc.cpp | 1 + source/enemy/npcdata.cpp | 2 +- source/enemy/nsjback.cpp | 6 ++++++ source/hazard/hboat.cpp | 6 ++++++ source/player/player.cpp | 1 + 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index 4d2231011..58ed9cb9f 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -1284,6 +1284,7 @@ void CNpcEnemy::processCollision() CPlayer *player = GameScene.getPlayer(); player->takeDamage( m_data[m_type].damageToUserType ); + processUserCollision( (CThing *) player ); m_controlFunc = m_oldControlFunc; } diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index f86544173..287f2669f 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -1045,7 +1045,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = 2, 128, DETECT_ALL_COLLISION, - DAMAGE__SHOCK_ENEMY, + DAMAGE__NONE, 16, FRM_JELLYFISH1_SWIM1, NPC_SHOT_GENERIC, diff --git a/source/enemy/nsjback.cpp b/source/enemy/nsjback.cpp index 4f3de9b2b..62e5911c1 100644 --- a/source/enemy/nsjback.cpp +++ b/source/enemy/nsjback.cpp @@ -193,6 +193,12 @@ void CNpcSmallJellyfishBackgroundEnemy::processUserCollision( CThing *thisThing otherDelta.vy = -otherDelta.vy; } + if ( !otherDelta.vx && !otherDelta.vy ) + { + otherDelta.vx = ( 1 * xDist ) / abs( xDist ); + otherDelta.vy = ( 1 * yDist ) / abs( yDist ); + } + Pos.vx += otherDelta.vx; Pos.vy += otherDelta.vy; diff --git a/source/hazard/hboat.cpp b/source/hazard/hboat.cpp index 08fd32f42..ff7e4931b 100644 --- a/source/hazard/hboat.cpp +++ b/source/hazard/hboat.cpp @@ -27,6 +27,11 @@ #include "system\vid.h" #endif +#ifndef __PLAYER_PLAYER_H__ +#include "player\player.h" +#endif + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void CNpcBoatHazard::init() @@ -179,6 +184,7 @@ void CNpcBoatHazard::collidedWith( CThing *_thisThing ) { CPlayer *player = (CPlayer *) _thisThing; + player->takeDamage( DAMAGE__KILL_OUTRIGHT ); break; } diff --git a/source/player/player.cpp b/source/player/player.cpp index 828bcb8ed..24a36d6b7 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -1493,6 +1493,7 @@ void CPlayer::takeDamage(DAMAGE_TYPE _damage) switch(_damage) { case DAMAGE__NONE: + ouchThatHurt=false; break; case DAMAGE__ELECTROCUTION: