mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-17 11:00:38 +02:00
Missing file from previous checkin.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
// AI_monster_zombie_base.cpp
|
||||
// Native state-machine replacement for ai_monster_zombie_base.script.
|
||||
|
||||
#include "precompiled.h"
|
||||
#pragma hdrstop
|
||||
#include "../Game_local.h"
|
||||
|
||||
|
||||
CLASS_DECLARATION( rvmMonsterBase, rvmMonsterZombieBase )
|
||||
END_CLASS
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user