This commit is contained in:
Charles 2001-01-23 19:58:19 +00:00
parent f09523467a
commit fe1a61ba0e
5 changed files with 41 additions and 7 deletions

View File

@ -63,6 +63,7 @@ enemy_src := 2denemy \
nanemone \
neyeball \
nsstomp \
nbooger \
enemy
projectl_src := projectl

View File

@ -69,10 +69,10 @@ void CNpc::processCloseClamAttack( int _frames )
}
else
{
this->m_controlFunc = NPC_CONTROL_MOVEMENT;
this->m_timerFunc = NPC_TIMER_ATTACK_DONE;
this->m_timerTimer = GameState::getOneSecondInFrames();
this->m_sensorFunc = NPC_SENSOR_NONE;
m_controlFunc = NPC_CONTROL_MOVEMENT;
m_timerFunc = NPC_TIMER_ATTACK_DONE;
m_timerTimer = GameState::getOneSecondInFrames();
m_sensorFunc = NPC_SENSOR_NONE;
}
}
}

View File

@ -241,10 +241,10 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
{ // NPC_BOOGER_MONSTER
NPC_INIT_DEFAULT,
NPC_SENSOR_NONE,
NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE,
NPC_MOVEMENT_STATIC,
NPC_MOVEMENT_MODIFIER_NONE,
NPC_CLOSE_NONE,
NPC_CLOSE_BOOGER_MONSTER_ATTACK,
NPC_TIMER_NONE,
false,
0,
@ -387,7 +387,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
void CNpc::init()
{
m_type = NPC_SKULL_STOMPER;
m_type = NPC_BOOGER_MONSTER;
m_heading = m_fireHeading = 0;
m_movementTimer = 0;
@ -774,6 +774,21 @@ bool CNpc::processSensor()
}
}
case NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE:
{
if ( xDistSqr + yDistSqr < 400 )
{
m_controlFunc = NPC_CONTROL_CLOSE;
m_extendDir = EXTEND_UP;
return( true );
}
else
{
return( false );
}
}
default:
return( false );
}
@ -978,6 +993,13 @@ void CNpc::processClose(int _frames)
case NPC_CLOSE_SKULL_STOMPER_ATTACK:
processCloseSkullStomperAttack( _frames );
break;
case NPC_CLOSE_BOOGER_MONSTER_ATTACK:
processCloseBoogerMonsterAttack( _frames );
break;
default:
break;
}

View File

@ -100,6 +100,7 @@ protected:
NPC_SENSOR_ANEMONE_USER_CLOSE,
NPC_SENSOR_EYEBALL_USER_CLOSE,
NPC_SENSOR_SKULL_STOMPER_USER_CLOSE,
NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE,
};
enum NPC_CLOSE_FUNC
@ -115,6 +116,7 @@ protected:
NPC_CLOSE_ANEMONE_2_ATTACK,
NPC_CLOSE_EYEBALL_ATTACK,
NPC_CLOSE_SKULL_STOMPER_ATTACK,
NPC_CLOSE_BOOGER_MONSTER_ATTACK,
};
enum NPC_MOVEMENT_FUNC
@ -142,6 +144,7 @@ protected:
enum
{
NPC_JELLYFISH_RESISTANCE = 64,
NPC_BOOGER_MONSTER_MAX_EXTENSION = 20,
EXTEND_UP = true,
EXTEND_DOWN = false,
EXTEND_RIGHT = true,
@ -210,6 +213,10 @@ protected:
void processCloseSkullStomperAttack( int _frames );
// booger monster functions
void processCloseBoogerMonsterAttack( int _frames );
// data
static NPC_DATA m_data[NPC_UNIT_TYPE_MAX];

View File

@ -129,6 +129,10 @@ SOURCE=..\..\..\source\enemy\nanemone.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\enemy\nbooger.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\enemy\nclam.cpp
# End Source File
# Begin Source File