mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-16 08:10:32 +02:00
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
// AI_monster_zombie_base.cpp
|
|
// Native state-machine replacement for ai_monster_zombie_base.script.
|
|
|
|
#include "precompiled.h"
|
|
#pragma hdrstop
|
|
#include "../Game_local.h"
|
|
|
|
|
|
|
|
stateResult_t rvmMonsterZombieBase::RunStateByName( const char* stateName, stateParms_t* parms ) {
|
|
AI_DISPATCH_STATE( "state_Killed", state_Killed );
|
|
return rvmMonsterBase::RunStateByName( stateName, parms );
|
|
}
|
|
|
|
void rvmMonsterZombieBase::archvile_minion() {
|
|
if ( owner ) {
|
|
gameLocal.Error( "'%s': Zombies cannot be minions for archviles", owner->GetName() );
|
|
}
|
|
}
|
|
|
|
bool rvmMonsterZombieBase::can_resurrect() {
|
|
return false;
|
|
}
|
|
|
|
stateResult_t rvmMonsterZombieBase::state_Killed( stateParms_t* parms ) {
|
|
enum { STAGE_START, STAGE_WAIT_DEAD_ACTION };
|
|
switch ( parms->stage ) {
|
|
case STAGE_START:
|
|
StopMove();
|
|
waitActionName = "dead";
|
|
SetAnimState( ANIMCHANNEL_TORSO, "Torso_Death", 0 );
|
|
SetAnimState( ANIMCHANNEL_LEGS, "Legs_Death", 0 );
|
|
parms->stage = STAGE_WAIT_DEAD_ACTION;
|
|
return SRESULT_WAIT;
|
|
case STAGE_WAIT_DEAD_ACTION:
|
|
if ( !ActionDone( "dead" ) ) {
|
|
return SRESULT_WAIT;
|
|
}
|
|
StopThinking();
|
|
return SRESULT_DONE;
|
|
}
|
|
return SRESULT_ERROR;
|
|
}
|