From 8464a1ce99d46cce86e51424453590c61c6006ae Mon Sep 17 00:00:00 2001 From: wootguy Date: Wed, 6 Nov 2024 06:33:01 -0800 Subject: [PATCH] update monster ai descriptions use a common schedule naming scheme, and add the missing task name methods. Also added IsNormalMonster() to narrow down monsters to the ones that think using the base ai. --- cl_dll/hl/hl_baseentity.cpp | 1 + dlls/CBasePlayer.h | 1 + dlls/cbase.h | 1 + dlls/monster/CAGrunt.cpp | 28 +++++++--- dlls/monster/CAGrunt.h | 1 + dlls/monster/CBarney.cpp | 8 +-- dlls/monster/CBaseGrunt.cpp | 48 ++++++++-------- dlls/monster/CBaseMonster.cpp | 6 ++ dlls/monster/CBaseMonster.h | 2 + dlls/monster/CBigMomma.cpp | 18 +++++- dlls/monster/CBullsquid.cpp | 23 +++++--- dlls/monster/CChumtoad.cpp | 12 +++- dlls/monster/CController.cpp | 8 +-- dlls/monster/CGargantua.cpp | 13 ++++- dlls/monster/CGargantua.h | 1 + dlls/monster/CGonome.cpp | 2 +- dlls/monster/CHAssassin.cpp | 29 ++++++---- dlls/monster/CHGruntOp4Medic.cpp | 8 +-- dlls/monster/CHWGrunt.cpp | 11 +++- dlls/monster/CHeadCrab.cpp | 4 +- dlls/monster/CHoundeye.cpp | 36 ++++++++---- dlls/monster/CISlave.cpp | 2 +- dlls/monster/CIchthyosaur.cpp | 19 +++++-- dlls/monster/CMonsterMaker.h | 1 + dlls/monster/COtis.cpp | 8 +-- dlls/monster/CPitdrone.cpp | 25 ++++++--- dlls/monster/CScientist.cpp | 37 ++++++++---- dlls/monster/CShockRoach.cpp | 4 +- dlls/monster/CShockTrooper.cpp | 84 ++++++++++++++-------------- dlls/monster/CTalkSquadMonster.cpp | 16 +++--- dlls/monster/CTor.cpp | 2 +- dlls/monster/defaultai.cpp | 90 +++++++++++++++--------------- dlls/monster/monsters.h | 7 +++ dlls/scripted.h | 1 + dlls/weapon/CGrenade.h | 1 + 35 files changed, 351 insertions(+), 207 deletions(-) diff --git a/cl_dll/hl/hl_baseentity.cpp b/cl_dll/hl/hl_baseentity.cpp index 3e7611dd..86d525e3 100644 --- a/cl_dll/hl/hl_baseentity.cpp +++ b/cl_dll/hl/hl_baseentity.cpp @@ -253,6 +253,7 @@ const char* CBaseMonster::GetTaskName(int taskIdx) {return "";} const char* CBaseMonster::DisplayName() {return "";} BOOL CBaseMonster::IsMachine() {return 0;} void CBaseMonster::Precache() {} +void CBaseMonster::GetAllSchedules(std::unordered_set& schedulesOut) {} int TrainSpeed(int iSpeed, int iMax) { return 0; } void CBasePlayer :: DeathSound( void ) { } diff --git a/dlls/CBasePlayer.h b/dlls/CBasePlayer.h index 0eabd1ed..beb46d31 100644 --- a/dlls/CBasePlayer.h +++ b/dlls/CBasePlayer.h @@ -128,6 +128,7 @@ class EXPORT CBasePlayer : public CBaseMonster int IsObserver() { return m_isObserver; }; BOOL IsFirstPerson() { return m_hViewEntity.GetEdict() == edict(); } BOOL IsBot() { return pev->flags & FL_FAKECLIENT; } + virtual BOOL IsNormalMonster(void) { return FALSE; } virtual int GetEntindexPriority() { return ENTIDX_PRIORITY_HIGH; } int random_seed; // See that is shared between client & server for shared weapons code diff --git a/dlls/cbase.h b/dlls/cbase.h index d9099483..0229b676 100644 --- a/dlls/cbase.h +++ b/dlls/cbase.h @@ -229,6 +229,7 @@ class EXPORT CBaseEntity virtual BOOL HasTarget( string_t targetname ) { return FStrEq(STRING(targetname), STRING(pev->target) ); } virtual BOOL IsInWorld( void ); virtual BOOL IsMonster( void ) { return FALSE; } + virtual BOOL IsNormalMonster(void) { return FALSE; } // is this what you'd expect to be a monster? (not a monstermaker/grenade/etc.) virtual BOOL IsPlayer( void ) { return FALSE; } virtual BOOL IsPlayerCorpse( void ) { return FALSE; } virtual BOOL IsNetClient( void ) { return FALSE; } diff --git a/dlls/monster/CAGrunt.cpp b/dlls/monster/CAGrunt.cpp index efaabbf3..d68b2913 100644 --- a/dlls/monster/CAGrunt.cpp +++ b/dlls/monster/CAGrunt.cpp @@ -609,7 +609,7 @@ Schedule_t slAGruntFail[] = bits_COND_CAN_RANGE_ATTACK1 | bits_COND_CAN_MELEE_ATTACK1, 0, - "AGrunt Fail" + "AGRUNT_FAIL" }, }; @@ -632,7 +632,7 @@ Schedule_t slAGruntCombatFail[] = bits_COND_CAN_RANGE_ATTACK1 | bits_COND_CAN_MELEE_ATTACK1, 0, - "AGrunt Combat Fail" + "AGRUNT_COMBAT_FAIL" }, }; @@ -660,7 +660,7 @@ Schedule_t slAGruntStandoff[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Agrunt Standoff" + "AGRUNT_STANDOFF" } }; @@ -680,7 +680,7 @@ Schedule_t slAGruntSuppress[] = ARRAYSIZE ( tlAGruntSuppressHornet ), 0, 0, - "AGrunt Suppress Hornet", + "AGRUNT_SUPPRESS_HORNET", }, }; @@ -704,7 +704,7 @@ Schedule_t slAGruntRangeAttack1[] = bits_COND_HEAVY_DAMAGE, 0, - "AGrunt Range Attack1" + "AGRUNT_RANGE_ATTACK1" }, }; @@ -718,6 +718,7 @@ Task_t tlAGruntHiddenRangeAttack1[] = { TASK_RANGE_ATTACK1_NOTURN, (float)0 }, }; + Schedule_t slAGruntHiddenRangeAttack[] = { { @@ -728,7 +729,7 @@ Schedule_t slAGruntHiddenRangeAttack[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "AGrunt Hidden Range Attack1" + "AGRUNT_HIDDEN_RANGE_ATTACK" }, }; @@ -754,7 +755,7 @@ Schedule_t slAGruntTakeCoverFromEnemy[] = ARRAYSIZE ( tlAGruntTakeCoverFromEnemy ), bits_COND_NEW_ENEMY, 0, - "AGruntTakeCoverFromEnemy" + "AGRUNT_TAKE_COVER_FROM_ENEMY" }, }; @@ -793,7 +794,7 @@ Schedule_t slAGruntVictoryDance[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "AGruntVictoryDance" + "AGRUNT_VICTORY_DANCE" }, }; @@ -818,7 +819,7 @@ Schedule_t slAGruntThreatDisplay[] = bits_SOUND_PLAYER | bits_SOUND_COMBAT | bits_SOUND_WORLD, - "AGruntThreatDisplay" + "AGRUNT_THREAT_DISPLAY" }, }; @@ -1142,6 +1143,15 @@ Schedule_t* CAGrunt :: GetScheduleOfType ( int Type ) return CTalkSquadMonster :: GetScheduleOfType( Type ); } +const char* CAGrunt::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_AGRUNT_SETUP_HIDE_ATTACK: return "TASK_AGRUNT_SETUP_HIDE_ATTACK"; + case TASK_AGRUNT_GET_PATH_TO_ENEMY_CORPSE: return "TASK_AGRUNT_GET_PATH_TO_ENEMY_CORPSE"; + default: + return CTalkSquadMonster::GetTaskName(taskIdx); + } +} + void CAGrunt::StartFollowingSound() { StopTalking(); EMIT_SOUND(ENT(pev), CHAN_VOICE, RANDOM_SOUND_ARRAY(pAlertSounds), 1.0, ATTN_NORM); diff --git a/dlls/monster/CAGrunt.h b/dlls/monster/CAGrunt.h index a652d828..814d7491 100644 --- a/dlls/monster/CAGrunt.h +++ b/dlls/monster/CAGrunt.h @@ -60,6 +60,7 @@ class CAGrunt : public CTalkSquadMonster Schedule_t* GetSchedule(void); Schedule_t* GetScheduleOfType(int Type); + const char* GetTaskName(int taskIdx); BOOL FCanCheckAttacks(void); BOOL CheckMeleeAttack1(float flDot, float flDist); BOOL CheckRangeAttack1(float flDot, float flDist); diff --git a/dlls/monster/CBarney.cpp b/dlls/monster/CBarney.cpp index 2b5a3ca1..2f80f745 100644 --- a/dlls/monster/CBarney.cpp +++ b/dlls/monster/CBarney.cpp @@ -140,7 +140,7 @@ Schedule_t slBaFollow[] = bits_COND_HEAR_SOUND | bits_COND_PROVOKED, bits_SOUND_DANGER, - "Follow" + "BARNEY_FOLLOW" }, }; @@ -162,7 +162,7 @@ Schedule_t slBarneyEnemyDraw[] = ARRAYSIZE ( tlBarneyEnemyDraw ), 0, 0, - "Barney Enemy Draw" + "BARNEY_ENEMY_DRAW" } }; @@ -186,7 +186,7 @@ Schedule_t slBaFaceTarget[] = bits_COND_HEAR_SOUND | bits_COND_PROVOKED, bits_SOUND_DANGER, - "FaceTarget" + "BARNEY_FACE_TARGET" }, }; @@ -219,7 +219,7 @@ Schedule_t slIdleBaStand[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "IdleStand" + "BARNEY_IDLE_STAND" }, }; diff --git a/dlls/monster/CBaseGrunt.cpp b/dlls/monster/CBaseGrunt.cpp index b973fe87..06acba7a 100644 --- a/dlls/monster/CBaseGrunt.cpp +++ b/dlls/monster/CBaseGrunt.cpp @@ -1185,7 +1185,7 @@ Schedule_t slGruntFail[] = bits_COND_CAN_MELEE_ATTACK1 | bits_COND_CAN_MELEE_ATTACK2, 0, - "Grunt Fail" + "GRUNT_FAIL" }, }; @@ -1219,7 +1219,7 @@ Schedule_t slGruntCombatFail[] = bits_SOUND_COMBAT |// sound flags bits_SOUND_PLAYER | bits_SOUND_DANGER, - "Grunt Combat Fail" + "GRUNT_COMBAT_FAIL" }, }; @@ -1247,7 +1247,7 @@ Schedule_t slGruntVictoryDance[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "GruntVictoryDance" + "GRUNT_VICTORY_DANCE" }, }; @@ -1278,7 +1278,7 @@ Schedule_t slGruntEstablishLineOfFire[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "GruntEstablishLineOfFire" + "GRUNT_ESTABLISH_LINE_OF_FIRE" }, }; @@ -1301,7 +1301,7 @@ Schedule_t slGruntFoundEnemy[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "GruntFoundEnemy" + "GRUNT_FOUND_ENEMY" }, }; @@ -1327,7 +1327,7 @@ Schedule_t slGruntCombatFace[] = bits_COND_CAN_RANGE_ATTACK1 | bits_COND_CAN_RANGE_ATTACK2, 0, - "Combat Face" + "GRUNT_COMBAT_FACE" }, }; @@ -1370,7 +1370,7 @@ Schedule_t slGruntSignalSuppress[] = bits_COND_NO_AMMO_LOADED, bits_SOUND_DANGER, - "SignalSuppress" + "GRUNT_SIGNAL_SUPPRESS" }, }; @@ -1407,7 +1407,7 @@ Schedule_t slGruntSuppress[] = bits_COND_NO_AMMO_LOADED, bits_SOUND_DANGER, - "Suppress" + "GRUNT_SUPPRESS" }, }; @@ -1437,7 +1437,7 @@ Schedule_t slGruntWaitInCover[] = bits_COND_CAN_MELEE_ATTACK2, bits_SOUND_DANGER, - "GruntWaitInCover" + "GRUNT_WAIT_IN_COVER" }, }; @@ -1465,7 +1465,7 @@ Schedule_t slGruntTakeCover[] = ARRAYSIZE ( tlGruntTakeCover1 ), 0, 0, - "TakeCover" + "GRUNT_TAKE_COVER" }, }; @@ -1491,7 +1491,7 @@ Schedule_t slGruntGrenadeCover[] = ARRAYSIZE ( tlGruntGrenadeCover1 ), 0, 0, - "GrenadeCover" + "GRUNT_GRENADE_COVER" }, }; @@ -1513,7 +1513,7 @@ Schedule_t slGruntTossGrenadeCover[] = ARRAYSIZE ( tlGruntTossGrenadeCover1 ), 0, 0, - "TossGrenadeCover" + "GRUNT_TOSS_GRENADE_COVER" }, }; @@ -1538,7 +1538,7 @@ Schedule_t slGruntTakeCoverFromBestSound[] = ARRAYSIZE ( tlGruntTakeCoverFromBestSound ), 0, 0, - "GruntTakeCoverFromBestSound" + "GRUNT_TAKE_COVER_FROM_BEST_SOUND" }, }; @@ -1566,7 +1566,7 @@ Schedule_t slGruntHideReload[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "GruntHideReload" + "GRUNT_HIDE_RELOAD" } }; @@ -1598,7 +1598,7 @@ Schedule_t slGruntSweep[] = bits_SOUND_DANGER | bits_SOUND_PLAYER, - "Grunt Sweep" + "GRUNT_SWEEP" }, }; @@ -1637,7 +1637,7 @@ Schedule_t slGruntRangeAttack1A[] = bits_COND_NO_AMMO_LOADED, bits_SOUND_DANGER, - "Range Attack1A" + "GRUNT_RANGE_ATTACK_1A" }, }; @@ -1674,7 +1674,7 @@ Schedule_t slGruntRangeAttack1B[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Range Attack1B" + "GRUNT_RANGE_ATTACK_1B" }, }; @@ -1710,7 +1710,7 @@ Schedule_t slGruntRangeAttack1C[] = bits_COND_NO_AMMO_LOADED, bits_SOUND_DANGER, - "Range Attack" + "GRUNT_RANGE_ATTACK_1C" }, }; @@ -1733,7 +1733,7 @@ Schedule_t slGruntRangeAttack2[] = ARRAYSIZE ( tlGruntRangeAttack2 ), 0, 0, - "RangeAttack2" + "GRUNT_RANGE_ATTACK2" }, }; @@ -1762,7 +1762,7 @@ Schedule_t slGruntRepel[] = bits_SOUND_DANGER | bits_SOUND_COMBAT | bits_SOUND_PLAYER, - "Repel" + "GRUNT_REPEL" }, }; @@ -1784,7 +1784,7 @@ Schedule_t slGruntRepelAttack[] = ARRAYSIZE ( tlGruntRepelAttack ), bits_COND_ENEMY_OCCLUDED, 0, - "Repel Attack" + "GRUNT_REPEL_ATTACK" }, }; @@ -1815,7 +1815,7 @@ Schedule_t slGruntRepelLand[] = bits_SOUND_DANGER | bits_SOUND_COMBAT | bits_SOUND_PLAYER, - "Repel Land" + "GRUNT_REPEL_LAND" }, }; @@ -1838,7 +1838,7 @@ Schedule_t slMinigunSpinup[] = bits_COND_GRUNT_NOFIRE, 0, - "Minigun spinup" + "GRUNT_MINIGUN_SPINUP" }, }; @@ -1855,7 +1855,7 @@ Schedule_t slMinigunSpindown[] = 0, 0, - "Minigun spindown" + "GRUNT_MINIGUN_SPINDOWN" }, }; diff --git a/dlls/monster/CBaseMonster.cpp b/dlls/monster/CBaseMonster.cpp index d98cfb06..ce8559d5 100644 --- a/dlls/monster/CBaseMonster.cpp +++ b/dlls/monster/CBaseMonster.cpp @@ -6974,6 +6974,12 @@ void CBaseMonster::ScheduleChange(void) #endif } +void CBaseMonster::GetAllSchedules(std::unordered_set& schedulesOut) { + for (int i = 0; i < ARRAYSIZE(m_scheduleList); i++) { + schedulesOut.insert(m_scheduleList[i]); + } +} + Schedule_t* CBaseMonster::ScheduleFromName(const char* pName) { return ScheduleInList(pName, m_scheduleList, ARRAYSIZE(m_scheduleList)); diff --git a/dlls/monster/CBaseMonster.h b/dlls/monster/CBaseMonster.h index 829b2b4f..37cb5abc 100644 --- a/dlls/monster/CBaseMonster.h +++ b/dlls/monster/CBaseMonster.h @@ -183,6 +183,7 @@ class EXPORT CBaseMonster : public CBaseToggle virtual BOOL IsAlive( void ) { return (pev->deadflag == DEAD_NO) && pev->health > 0; } virtual BOOL IsMonster(void) { return TRUE; } + virtual BOOL IsNormalMonster(void) { return TRUE; } virtual BOOL ShouldFadeOnDeath( void ); virtual bool ShouldRoam( void ); @@ -239,6 +240,7 @@ class EXPORT CBaseMonster : public CBaseToggle void NextScheduledTask ( void ); Schedule_t *ScheduleInList( const char *pName, Schedule_t **pList, int listCount ); + virtual void GetAllSchedules(std::unordered_set& schedulesOut); virtual Schedule_t *ScheduleFromName( const char *pName ); static Schedule_t *m_scheduleList[]; diff --git a/dlls/monster/CBigMomma.cpp b/dlls/monster/CBigMomma.cpp index 846d2f04..4cdd69e3 100644 --- a/dlls/monster/CBigMomma.cpp +++ b/dlls/monster/CBigMomma.cpp @@ -190,6 +190,7 @@ class CBigMomma : public CBaseMonster Schedule_t *GetSchedule( void ); Schedule_t *GetScheduleOfType( int Type ); void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType ); + virtual const char* GetTaskName(int taskIdx); void NodeStart( int iszNextNode ); void NodeReach( void ); @@ -910,7 +911,7 @@ Schedule_t slBigNode[] = ARRAYSIZE ( tlBigNode ), 0, 0, - "Big Node" + "MOM_BIG_NODE" }, }; @@ -928,7 +929,7 @@ Schedule_t slNodeFail[] = ARRAYSIZE ( tlNodeFail ), 0, 0, - "NodeFail" + "MOM_NODE_FAIL" }, }; @@ -959,6 +960,19 @@ Schedule_t *CBigMomma::GetScheduleOfType( int Type ) return CBaseMonster::GetScheduleOfType( Type ); } +const char* CBigMomma::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_MOVE_TO_NODE_RANGE: return "TASK_MOVE_TO_NODE_RANGE"; + case TASK_FIND_NODE: return "TASK_FIND_NODE"; + case TASK_PLAY_NODE_PRESEQUENCE: return "TASK_PLAY_NODE_PRESEQUENCE"; + case TASK_PLAY_NODE_SEQUENCE: return "TASK_PLAY_NODE_SEQUENCE"; + case TASK_PROCESS_NODE: return "TASK_PROCESS_NODE"; + case TASK_NODE_DELAY: return "TASK_NODE_DELAY"; + case TASK_NODE_YAW: return "TASK_NODE_YAW"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} BOOL CBigMomma::ShouldGoToNode( void ) { diff --git a/dlls/monster/CBullsquid.cpp b/dlls/monster/CBullsquid.cpp index 27ec10c0..87bcd839 100644 --- a/dlls/monster/CBullsquid.cpp +++ b/dlls/monster/CBullsquid.cpp @@ -211,6 +211,7 @@ class CBullsquid : public CBaseMonster BOOL FValidateHintType ( short sHint ); Schedule_t *GetSchedule( void ); Schedule_t *GetScheduleOfType ( int Type ); + const char* GetTaskName(int taskIdx); int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ); int IRelationship ( CBaseEntity *pTarget ); int IgnoreConditions ( void ); @@ -825,7 +826,7 @@ Schedule_t slSquidRangeAttack1[] = bits_COND_ENEMY_OCCLUDED | bits_COND_NO_AMMO_LOADED, 0, - "Squid Range Attack1" + "SQUID_RANGE_ATTACK1" }, }; @@ -854,7 +855,7 @@ Schedule_t slSquidChaseEnemy[] = bits_SOUND_DANGER | bits_SOUND_MEAT, - "Squid Chase Enemy" + "SQUID_CHASE_ENEMY" }, }; @@ -873,7 +874,7 @@ Schedule_t slSquidHurtHop[] = ARRAYSIZE ( tlSquidHurtHop ), 0, 0, - "SquidHurtHop" + "SQUID_HURT_HOP" } }; @@ -893,7 +894,7 @@ Schedule_t slSquidSeeCrab[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "SquidSeeCrab" + "SQUID_SEE_CRAB" } }; @@ -929,7 +930,7 @@ Schedule_t slSquidEat[] = // here or the monster won't detect these sounds at ALL while running this schedule. bits_SOUND_MEAT | bits_SOUND_CARCASS, - "SquidEat" + "SQUID_EAT" } }; @@ -967,7 +968,7 @@ Schedule_t slSquidSniffAndEat[] = // here or the monster won't detect these sounds at ALL while running this schedule. bits_SOUND_MEAT | bits_SOUND_CARCASS, - "SquidSniffAndEat" + "SQUID_SNIFF_AND_EAT" } }; @@ -1001,7 +1002,7 @@ Schedule_t slSquidWallow[] = // here or the monster won't detect these sounds at ALL while running this schedule. bits_SOUND_GARBAGE, - "SquidWallow" + "SQUID_WALLOW" } }; @@ -1151,6 +1152,14 @@ Schedule_t* CBullsquid :: GetScheduleOfType ( int Type ) } } +const char* CBullsquid::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_SQUID_HOPTURN: return "TASK_SQUID_HOPTURN"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} + //========================================================= // Start task - selects the correct activity and performs // any necessary calculations to start the next task on the diff --git a/dlls/monster/CChumtoad.cpp b/dlls/monster/CChumtoad.cpp index 2dbad344..b722f73d 100644 --- a/dlls/monster/CChumtoad.cpp +++ b/dlls/monster/CChumtoad.cpp @@ -38,6 +38,7 @@ class CChumtoad : public CBaseMonster void PrescheduleThink(); void StartTask(Task_t* pTask); Schedule_t* GetScheduleOfType(int Type); + const char* GetTaskName(int taskIdx); const char* GetDeathNoticeWeapon() { return "weapon_crowbar"; } BOOL CheckRangeAttack1(float flDot, float flDist) { return FALSE; } @@ -154,7 +155,7 @@ Schedule_t slToxicCloud[] = 0, 0, - "Toxic cloud" + "CHUM_TOXIC_CLOUD" }, }; @@ -259,6 +260,15 @@ Schedule_t* CChumtoad::GetScheduleOfType(int Type) { } } +const char* CChumtoad::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_START_CLOUD: return "TASK_START_CLOUD"; + case TASK_STOP_CLOUD: return "TASK_STOP_CLOUD"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} + BOOL CChumtoad::CheckMeleeAttack1(float flDot, float flDist) { if (flDist < TOXIC_START_DISTANCE) { return TRUE; diff --git a/dlls/monster/CController.cpp b/dlls/monster/CController.cpp index 96afaa38..43c6bdda 100644 --- a/dlls/monster/CController.cpp +++ b/dlls/monster/CController.cpp @@ -433,7 +433,7 @@ Schedule_t slControllerChaseEnemy[] = bits_COND_NEW_ENEMY | bits_COND_TASK_FAILED, 0, - "ControllerChaseEnemy" + "CONTROLLER_CHASE_ENEMY" }, }; @@ -454,7 +454,7 @@ Schedule_t slControllerStrafe[] = ARRAYSIZE ( tlControllerStrafe ), bits_COND_NEW_ENEMY, 0, - "ControllerStrafe" + "CONTROLLER_STRAFE" }, }; @@ -474,7 +474,7 @@ Schedule_t slControllerTakeCover[] = ARRAYSIZE ( tlControllerTakeCover ), bits_COND_NEW_ENEMY, 0, - "ControllerTakeCover" + "CONTROLLER_TAKE_COVER" }, }; @@ -494,7 +494,7 @@ Schedule_t slControllerFail[] = ARRAYSIZE ( tlControllerFail ), 0, 0, - "ControllerFail" + "CONTROLLER_FAIL" }, }; diff --git a/dlls/monster/CGargantua.cpp b/dlls/monster/CGargantua.cpp index 46b2f7ad..9ac55783 100644 --- a/dlls/monster/CGargantua.cpp +++ b/dlls/monster/CGargantua.cpp @@ -181,7 +181,7 @@ Schedule_t slGargFlame[] = ARRAYSIZE ( tlGargFlame ), 0, 0, - "GargFlame" + "GARG_FLAME" }, }; @@ -201,7 +201,7 @@ Schedule_t slGargSwipe[] = ARRAYSIZE ( tlGargSwipe ), bits_COND_CAN_MELEE_ATTACK2, 0, - "GargSwipe" + "GARG_SWIPE" }, }; @@ -876,6 +876,15 @@ Schedule_t *CGargantua::GetScheduleOfType( int Type ) return CBaseMonster::GetScheduleOfType( Type ); } +const char* CGargantua::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_SOUND_ATTACK: return "TASK_SOUND_ATTACK"; + case TASK_FLAME_SWEEP: return "TASK_FLAME_SWEEP"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} + void CGargantua::StartTask( Task_t *pTask ) { diff --git a/dlls/monster/CGargantua.h b/dlls/monster/CGargantua.h index 85af5ab1..da8fa9db 100644 --- a/dlls/monster/CGargantua.h +++ b/dlls/monster/CGargantua.h @@ -89,6 +89,7 @@ class CGargantua : public CBaseMonster } Schedule_t* GetScheduleOfType(int Type); + const char* GetTaskName(int taskIdx); void StartTask(Task_t* pTask); void RunTask(Task_t* pTask); diff --git a/dlls/monster/CGonome.cpp b/dlls/monster/CGonome.cpp index 4b860a6b..f37cfa41 100644 --- a/dlls/monster/CGonome.cpp +++ b/dlls/monster/CGonome.cpp @@ -172,7 +172,7 @@ Schedule_t slGonomeChaseEnemy[] = bits_SOUND_DANGER | bits_SOUND_MEAT, - "Gonome Chase Enemy" + "GONOME_CHASE_ENEMY" }, }; diff --git a/dlls/monster/CHAssassin.cpp b/dlls/monster/CHAssassin.cpp index 0522575d..7a9d7b58 100644 --- a/dlls/monster/CHAssassin.cpp +++ b/dlls/monster/CHAssassin.cpp @@ -77,6 +77,7 @@ class CHAssassin : public CBaseMonster void HandleAnimEvent( MonsterEvent_t *pEvent ); Schedule_t* GetSchedule ( void ); Schedule_t* GetScheduleOfType ( int Type ); + const char* GetTaskName(int taskIdx); BOOL CheckMeleeAttack1 ( float flDot, float flDist ); // jump // BOOL CheckMeleeAttack2 ( float flDot, float flDist ); BOOL CheckRangeAttack1 ( float flDot, float flDist ); // shoot @@ -380,7 +381,7 @@ Schedule_t slAssassinFail[] = bits_SOUND_DANGER | bits_SOUND_PLAYER, - "AssassinFail" + "FASSN_FAIL" }, }; @@ -403,7 +404,7 @@ Schedule_t slAssassinExposed[] = ARRAYSIZE ( tlAssassinExposed ), bits_COND_CAN_MELEE_ATTACK1, 0, - "AssassinExposed", + "FASSN_EXPOSED", }, }; @@ -434,7 +435,7 @@ Schedule_t slAssassinTakeCoverFromEnemy[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "AssassinTakeCoverFromEnemy" + "FASSN_TAKE_COVER_FROM_ENEMY" }, }; @@ -467,7 +468,7 @@ Schedule_t slAssassinTakeCoverFromEnemy2[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "AssassinTakeCoverFromEnemy2" + "FASSN_TAKE_COVER_FROM_ENEMY2" }, }; @@ -493,7 +494,7 @@ Schedule_t slAssassinTakeCoverFromBestSound[] = ARRAYSIZE ( tlAssassinTakeCoverFromBestSound ), bits_COND_NEW_ENEMY, 0, - "AssassinTakeCoverFromBestSound" + "FASSN_TAKE_COVER_FROM_BEST_SOUND" }, }; @@ -526,7 +527,7 @@ Schedule_t slAssassinHide[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "AssassinHide" + "FASSN_HIDE" }, }; @@ -553,7 +554,7 @@ Schedule_t slAssassinHunt[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "AssassinHunt" + "FASSN_HUNT" }, }; @@ -575,7 +576,7 @@ Schedule_t slAssassinJump[] = ARRAYSIZE ( tlAssassinJump ), 0, 0, - "AssassinJump" + "FASSN_JUMP" }, }; @@ -598,7 +599,7 @@ Schedule_t slAssassinJumpAttack[] = ARRAYSIZE ( tlAssassinJumpAttack ), 0, 0, - "AssassinJumpAttack" + "FASSN_JUMP_ATTACK" }, }; @@ -628,7 +629,7 @@ Schedule_t slAssassinJumpLand[] = ARRAYSIZE ( tlAssassinJumpLand ), 0, 0, - "AssassinJumpLand" + "FASSN_JUMP_LAND" }, }; @@ -1043,4 +1044,12 @@ Schedule_t* CHAssassin :: GetScheduleOfType ( int Type ) return CBaseMonster :: GetScheduleOfType( Type ); } +const char* CHAssassin::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_ASSASSIN_FALL_TO_GROUND: return "TASK_ASSASSIN_FALL_TO_GROUND"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} + #endif diff --git a/dlls/monster/CHGruntOp4Medic.cpp b/dlls/monster/CHGruntOp4Medic.cpp index 40d60442..99806cd3 100644 --- a/dlls/monster/CHGruntOp4Medic.cpp +++ b/dlls/monster/CHGruntOp4Medic.cpp @@ -475,7 +475,7 @@ Schedule_t slMedicAllyNewHealTarget[] = ARRAYSIZE( tlMedicAllyNewHealTarget ), 0, 0, - "Draw Needle" + "MEDIC_NEW_HEAL_TARGET" }, }; @@ -496,7 +496,7 @@ Schedule_t slMedicAllyDrawNeedle[] = ARRAYSIZE( tlMedicAllyDrawNeedle ), 0, 0, - "Draw Needle" + "MEDIC_DRAW_NEEDLE" }, }; @@ -513,7 +513,7 @@ Schedule_t slMedicAllyDrawGun[] = ARRAYSIZE( tlMedicAllyDrawGun ), 0, 0, - "Draw Gun" + "MEDIC_DRAW_GUN" }, }; @@ -531,7 +531,7 @@ Schedule_t slMedicAllyHealTarget[] = ARRAYSIZE( tlMedicAllyHealTarget ), 0, 0, - "Medic Ally Heal Target" + "MEDIC_HEAL_TARGET" }, }; diff --git a/dlls/monster/CHWGrunt.cpp b/dlls/monster/CHWGrunt.cpp index 2d7a86e0..bf22ee8f 100644 --- a/dlls/monster/CHWGrunt.cpp +++ b/dlls/monster/CHWGrunt.cpp @@ -71,6 +71,7 @@ class CHWGrunt : public CBaseGrunt void PlaySentenceSound(int sentenceType); void TraceAttack(entvars_t* pevAttacker, float flDamage, Vector vecDir, TraceResult* ptr, int bitsDamageType); Schedule_t* GetScheduleOfType(int Type); + const char* GetTaskName(int taskIdx); void SetActivity(Activity NewActivity); int GetActivitySequence(Activity NewActivity); void HandleAnimEvent(MonsterEvent_t* pEvent); @@ -345,7 +346,7 @@ Schedule_t slFindMinigun[] = bits_COND_HEAVY_DAMAGE, 0, - "Find minigun" + "HWGRUNT_FIND_MINIGUN" }, }; @@ -401,6 +402,14 @@ Schedule_t* CHWGrunt::GetScheduleOfType(int Type) } } +const char* CHWGrunt::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_GET_PATH_TO_BEST_MINIGUN: return "TASK_GET_PATH_TO_BEST_MINIGUN"; + default: + return CBaseGrunt::GetTaskName(taskIdx); + } +} + void CHWGrunt::SetActivity(Activity NewActivity) { CBaseGrunt::SetActivity(NewActivity); diff --git a/dlls/monster/CHeadCrab.cpp b/dlls/monster/CHeadCrab.cpp index c43c72eb..1cdb64e8 100644 --- a/dlls/monster/CHeadCrab.cpp +++ b/dlls/monster/CHeadCrab.cpp @@ -46,7 +46,7 @@ Schedule_t slHCRangeAttack1[] = bits_COND_ENEMY_OCCLUDED | bits_COND_NO_AMMO_LOADED, 0, - "HCRangeAttack1" + "CRAB_RANGE_ATTACK" }, }; @@ -66,7 +66,7 @@ Schedule_t slHCRangeAttack1Fast[] = bits_COND_ENEMY_OCCLUDED | bits_COND_NO_AMMO_LOADED, 0, - "HCRAFast" + "CRAB_FAST" }, }; diff --git a/dlls/monster/CHoundeye.cpp b/dlls/monster/CHoundeye.cpp index 900f42a0..c9118885 100644 --- a/dlls/monster/CHoundeye.cpp +++ b/dlls/monster/CHoundeye.cpp @@ -102,6 +102,7 @@ class CHoundeye : public CTalkSquadMonster BOOL FCanActiveIdle ( void ); Schedule_t *GetScheduleOfType ( int Type ); Schedule_t *GetSchedule( void ); + const char* GetTaskName(int taskIdx); const char* GetDeathNoticeWeapon() { return "weapon_crowbar"; } int Save( CSave &save ); @@ -908,7 +909,7 @@ Schedule_t slHoundGuardPack[] = bits_SOUND_WORLD | bits_SOUND_MEAT | bits_SOUND_PLAYER, - "GuardPack" + "HOUND_GUARD_PACK" }, }; @@ -936,7 +937,7 @@ Schedule_t slHoundRangeAttack[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "HoundRangeAttack1" + "HOUND_RANGE_ATTACK1" }, { tlHoundYell2, @@ -944,7 +945,7 @@ Schedule_t slHoundRangeAttack[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "HoundRangeAttack2" + "HOUND_RANGE_ATTACK2" }, }; @@ -976,7 +977,7 @@ Schedule_t slHoundSleep[] = bits_SOUND_COMBAT | bits_SOUND_PLAYER | bits_SOUND_WORLD, - "Hound Sleep" + "HOUND_SLEEP" }, }; @@ -997,7 +998,7 @@ Schedule_t slHoundWakeLazy[] = ARRAYSIZE ( tlHoundWakeLazy ), 0, 0, - "WakeLazy" + "HOUND_WAKE_LAZY" }, }; @@ -1017,7 +1018,7 @@ Schedule_t slHoundWakeUrgent[] = ARRAYSIZE ( tlHoundWakeUrgent ), 0, 0, - "WakeUrgent" + "HOUND_WAKE_URGENT" }, }; @@ -1041,7 +1042,7 @@ Schedule_t slHoundSpecialAttack1[] = bits_COND_ENEMY_OCCLUDED, 0, - "Hound Special Attack1" + "HOUND_SPECIAL_ATTACK1" }, }; @@ -1060,7 +1061,7 @@ Schedule_t slHoundAgitated[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "Hound Agitated" + "HOUND_AGITATED" }, }; @@ -1078,7 +1079,7 @@ Schedule_t slHoundHopRetreat[] = ARRAYSIZE ( tlHoundHopRetreat ), 0, 0, - "Hound Hop Retreat" + "HOUND_HOP_RETREAT" }, }; @@ -1099,7 +1100,7 @@ Schedule_t slHoundCombatFailPVS[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "HoundCombatFailPVS" + "HOUND_COMBAT_FAIL_PVS" }, }; @@ -1122,7 +1123,7 @@ Schedule_t slHoundCombatFailNoPVS[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "HoundCombatFailNoPVS" + "HOUND_COMBAT_FAIL_NO_PVS" }, }; @@ -1302,3 +1303,16 @@ Schedule_t *CHoundeye :: GetSchedule( void ) return CTalkSquadMonster :: GetSchedule(); } + +const char* CHoundeye::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_HOUND_CLOSE_EYE: return "TASK_HOUND_CLOSE_EYE"; + case TASK_HOUND_OPEN_EYE: return "TASK_HOUND_OPEN_EYE"; + case TASK_HOUND_THREAT_DISPLAY: return "TASK_HOUND_THREAT_DISPLAY"; + case TASK_HOUND_FALL_ASLEEP: return "TASK_HOUND_FALL_ASLEEP"; + case TASK_HOUND_WAKE_UP: return "TASK_HOUND_WAKE_UP"; + case TASK_HOUND_HOP_BACK: return "TASK_HOUND_HOP_BACK"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} \ No newline at end of file diff --git a/dlls/monster/CISlave.cpp b/dlls/monster/CISlave.cpp index 67cf73b2..f37b7a27 100644 --- a/dlls/monster/CISlave.cpp +++ b/dlls/monster/CISlave.cpp @@ -669,7 +669,7 @@ Schedule_t slSlaveAttack1[] = bits_COND_HEAVY_DAMAGE, bits_SOUND_DANGER, - "Slave Range Attack1" + "SLAVE_RANGE_ATTACK1" }, }; diff --git a/dlls/monster/CIchthyosaur.cpp b/dlls/monster/CIchthyosaur.cpp index 4ffbd061..bd73d4b7 100644 --- a/dlls/monster/CIchthyosaur.cpp +++ b/dlls/monster/CIchthyosaur.cpp @@ -66,6 +66,7 @@ class CIchthyosaur : public CFlyingMonster Schedule_t *GetSchedule( void ); Schedule_t *GetScheduleOfType ( int Type ); + const char* GetTaskName(int taskIdx); void Killed( entvars_t *pevAttacker, int iGib ); void BecomeDead( void ); @@ -264,7 +265,7 @@ static Schedule_t slSwimAround[] = bits_COND_HEAR_SOUND, bits_SOUND_PLAYER | bits_SOUND_COMBAT, - "SwimAround" + "ICKY_SWIM_AROUND" }, }; @@ -282,7 +283,7 @@ static Schedule_t slSwimAgitated[] = ARRAYSIZE(tlSwimAgitated), 0, 0, - "SwimAgitated" + "ICKY_SWIM_AGITATED" }, }; @@ -304,7 +305,7 @@ static Schedule_t slCircleEnemy[] = bits_COND_CAN_MELEE_ATTACK1 | bits_COND_CAN_RANGE_ATTACK1, 0, - "CircleEnemy" + "ICKY_CIRCLE_ENEMY" }, }; @@ -324,7 +325,7 @@ Schedule_t slTwitchDie[] = ARRAYSIZE( tlTwitchDie ), 0, 0, - "Die" + "ICKY_TWITCH_DIE" }, }; @@ -632,6 +633,16 @@ Schedule_t* CIchthyosaur :: GetScheduleOfType ( int Type ) } +const char* CIchthyosaur::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_ICHTHYOSAUR_CIRCLE_ENEMY: return "TASK_ICHTHYOSAUR_CIRCLE_ENEMY"; + case TASK_ICHTHYOSAUR_SWIM: return "TASK_ICHTHYOSAUR_SWIM"; + case TASK_ICHTHYOSAUR_FLOAT: return "TASK_ICHTHYOSAUR_FLOAT"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} + //========================================================= // Start task - selects the correct activity and performs diff --git a/dlls/monster/CMonsterMaker.h b/dlls/monster/CMonsterMaker.h index 105b5f12..e7ef4d10 100644 --- a/dlls/monster/CMonsterMaker.h +++ b/dlls/monster/CMonsterMaker.h @@ -24,6 +24,7 @@ class EXPORT CMonsterMaker : public CBaseMonster public: virtual int GetEntindexPriority() { return ENTIDX_PRIORITY_NORMAL; } virtual int ObjectCaps(void) { return CBaseMonster::ObjectCaps() & ~FCAP_IMPULSE_USE; } + virtual BOOL IsNormalMonster(void) { return FALSE; } void Spawn(void); void Precache(void); void KeyValue(KeyValueData* pkvd); diff --git a/dlls/monster/COtis.cpp b/dlls/monster/COtis.cpp index 680f64ba..5b31850b 100644 --- a/dlls/monster/COtis.cpp +++ b/dlls/monster/COtis.cpp @@ -324,7 +324,7 @@ Schedule_t slOtFollow[] = bits_COND_HEAR_SOUND | bits_COND_PROVOKED, bits_SOUND_DANGER, - "Follow" + "OTIS_FOLLOW" }, }; @@ -346,7 +346,7 @@ Schedule_t slOtisEnemyDraw[] = ARRAYSIZE ( tlOtisEnemyDraw ), 0, 0, - "Otis Enemy Draw" + "OTIS_ENEMY_DRAW" } }; @@ -370,7 +370,7 @@ Schedule_t slOtFaceTarget[] = bits_COND_HEAR_SOUND | bits_COND_PROVOKED, bits_SOUND_DANGER, - "FaceTarget" + "OTIS_FACE_TARGET" }, }; @@ -403,7 +403,7 @@ Schedule_t slIdleOtStand[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "IdleStand" + "OTIS_IDLE_STAND" }, }; diff --git a/dlls/monster/CPitdrone.cpp b/dlls/monster/CPitdrone.cpp index ae6a9ec3..b6763788 100644 --- a/dlls/monster/CPitdrone.cpp +++ b/dlls/monster/CPitdrone.cpp @@ -241,6 +241,7 @@ class CPitdrone : public CBaseMonster BOOL FValidateHintType ( short sHint ); Schedule_t *GetSchedule( void ); Schedule_t *GetScheduleOfType ( int Type ); + const char* GetTaskName(int taskIdx); int IRelationship ( CBaseEntity *pTarget ); int IgnoreConditions ( void ); const char* GetDeathNoticeWeapon() { return "weapon_crowbar"; } @@ -814,7 +815,7 @@ Schedule_t slPitdroneRangeAttack1[] = bits_COND_ENEMY_OCCLUDED | bits_COND_NO_AMMO_LOADED, 0, - "Pitdrone Range Attack1" + "PIT_RANGE_ATTACK" }, }; @@ -843,7 +844,7 @@ Schedule_t slPitdroneChaseEnemy[] = bits_SOUND_DANGER | bits_SOUND_MEAT, - "Pitdrone Chase Enemy" + "PIT_CHASE_ENEMY" }, }; @@ -862,7 +863,7 @@ Schedule_t slPitdroneHurtHop[] = ARRAYSIZE ( tlPitdroneHurtHop ), 0, 0, - "PitdroneHurtHop" + "PIT_HURT_HOP" } }; @@ -898,7 +899,7 @@ Schedule_t slPitdroneEat[] = // here or the monster won't detect these sounds at ALL while running this schedule. bits_SOUND_MEAT | bits_SOUND_CARCASS, - "PitdroneEat" + "PIT_EAT" } }; @@ -936,7 +937,7 @@ Schedule_t slPitdroneSniffAndEat[] = // here or the monster won't detect these sounds at ALL while running this schedule. bits_SOUND_MEAT | bits_SOUND_CARCASS, - "PitdroneSniffAndEat" + "PIT_SNIFF_AND_EAT" } }; @@ -970,7 +971,7 @@ Schedule_t slPitdroneWallow[] = // here or the monster won't detect these sounds at ALL while running this schedule. bits_SOUND_GARBAGE, - "PitdroneWallow" + "PIT_WALLOW" } }; @@ -995,7 +996,7 @@ Schedule_t slPitdroneHideReload[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "PitdroneHideReload" + "PIT_HIDE_RELOAD" } }; @@ -1019,7 +1020,7 @@ Schedule_t slPitdroneWaitInCover[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "PitdroneWaitInCover" + "PIT_WAIT_IN_COVER" } }; @@ -1179,6 +1180,14 @@ Schedule_t* CPitdrone :: GetScheduleOfType ( int Type ) return CBaseMonster :: GetScheduleOfType ( Type ); } +const char* CPitdrone::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_PITDRONE_HOPTURN: return "TASK_PITDRONE_HOPTURN"; + default: + return CBaseMonster::GetTaskName(taskIdx); + } +} + //========================================================= // Start task - selects the correct activity and performs // any necessary calculations to start the next task on the diff --git a/dlls/monster/CScientist.cpp b/dlls/monster/CScientist.cpp index 6b3c6f0a..58ec3f8d 100644 --- a/dlls/monster/CScientist.cpp +++ b/dlls/monster/CScientist.cpp @@ -92,6 +92,7 @@ class CScientist : public CTalkSquadMonster // Override these to set behavior Schedule_t *GetScheduleOfType ( int Type ); Schedule_t *GetSchedule ( void ); + const char* GetTaskName(int taskIdx); MONSTERSTATE GetIdealState ( void ); void DeathSound( void ); @@ -158,7 +159,7 @@ Schedule_t slSciFollow[] = bits_COND_HEAR_SOUND, bits_SOUND_COMBAT | bits_SOUND_DANGER, - "Follow" + "SCI_FOLLOW" }, }; @@ -179,7 +180,7 @@ Schedule_t slFollowScared[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, bits_SOUND_DANGER, - "FollowScared" + "SCI_FOLLOW_SCARED" }, }; @@ -198,7 +199,7 @@ Schedule_t slFaceTargetScared[] = bits_COND_HEAR_SOUND | bits_COND_NEW_ENEMY, bits_SOUND_DANGER, - "FaceTargetScared" + "SCI_FACE_TARGET_SCARED" }, }; @@ -220,7 +221,7 @@ Schedule_t slHeal[] = ARRAYSIZE ( tlHeal ), 0, // Don't interrupt or he'll end up running around with a needle all the time 0, - "Heal" + "SCI_HEAL" }, }; @@ -243,7 +244,7 @@ Schedule_t slSciFaceTarget[] = bits_COND_HEAR_SOUND, bits_SOUND_COMBAT | bits_SOUND_DANGER, - "FaceTarget" + "SCI_FACE_TARGET" }, }; @@ -264,7 +265,7 @@ Schedule_t slSciPanic[] = ARRAYSIZE ( tlSciPanic ), 0, 0, - "SciPanic" + "SCI_PANIC" }, }; @@ -297,7 +298,7 @@ Schedule_t slIdleSciStand[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "IdleSciStand" + "SCI_IDLE_STAND" }, }; @@ -320,7 +321,7 @@ Schedule_t slScientistCover[] = ARRAYSIZE ( tlScientistCover ), bits_COND_NEW_ENEMY, 0, - "ScientistCover" + "SCI_COVER" }, }; @@ -347,7 +348,7 @@ Schedule_t slScientistHide[] = bits_COND_SEE_FEAR | bits_COND_SEE_DISLIKE, bits_SOUND_DANGER, - "ScientistHide" + "SCI_HIDE" }, }; @@ -374,7 +375,7 @@ Schedule_t slScientistStartle[] = bits_COND_SEE_FEAR | bits_COND_SEE_DISLIKE, 0, - "ScientistStartle" + "SCI_STARTLE" }, }; @@ -395,7 +396,7 @@ Schedule_t slFear[] = ARRAYSIZE ( tlFear ), bits_COND_NEW_ENEMY, 0, - "Fear" + "SCI_FEAR" }, }; @@ -998,6 +999,20 @@ Schedule_t *CScientist :: GetSchedule ( void ) return CTalkSquadMonster::GetSchedule(); } +const char* CScientist::GetTaskName(int taskIdx) { + switch (taskIdx) { + case TASK_SAY_HEAL: return "TASK_SAY_HEAL"; + case TASK_HEAL: return "TASK_HEAL"; + case TASK_SAY_FEAR: return "TASK_SAY_FEAR"; + case TASK_RUN_PATH_SCARED: return "TASK_RUN_PATH_SCARED"; + case TASK_SCREAM: return "TASK_SCREAM"; + case TASK_RANDOM_SCREAM: return "TASK_RANDOM_SCREAM"; + case TASK_MOVE_TO_TARGET_RANGE_SCARED: return "TASK_MOVE_TO_TARGET_RANGE_SCARED"; + default: + return CTalkSquadMonster::GetTaskName(taskIdx); + } +} + MONSTERSTATE CScientist :: GetIdealState ( void ) { switch ( m_MonsterState ) diff --git a/dlls/monster/CShockRoach.cpp b/dlls/monster/CShockRoach.cpp index ca34cb3d..dfacb7e5 100644 --- a/dlls/monster/CShockRoach.cpp +++ b/dlls/monster/CShockRoach.cpp @@ -47,7 +47,7 @@ Schedule_t slRCRangeAttack1[] = bits_COND_ENEMY_OCCLUDED | bits_COND_NO_AMMO_LOADED, 0, - "HCRangeAttack1" + "SROACH_RANGE_ATTACK1" }, }; @@ -67,7 +67,7 @@ Schedule_t slRCRangeAttack1Fast[] = bits_COND_ENEMY_OCCLUDED | bits_COND_NO_AMMO_LOADED, 0, - "HCRAFast" + "SROACH_ATTACK1_FAST" }, }; diff --git a/dlls/monster/CShockTrooper.cpp b/dlls/monster/CShockTrooper.cpp index d7b225e2..a8c0fc55 100644 --- a/dlls/monster/CShockTrooper.cpp +++ b/dlls/monster/CShockTrooper.cpp @@ -1230,7 +1230,7 @@ Schedule_t slShockTrooperFail[] = bits_COND_CAN_MELEE_ATTACK1 | bits_COND_CAN_MELEE_ATTACK2, 0, - "Grunt Fail"}, + "SHOCK_FAIL"}, }; //========================================================= @@ -1251,7 +1251,7 @@ Schedule_t slShockTrooperCombatFail[] = bits_COND_CAN_RANGE_ATTACK1 | bits_COND_CAN_RANGE_ATTACK2, 0, - "Grunt Combat Fail"}, + "SHOCK_COMBAT_FAIL"}, }; //========================================================= @@ -1278,7 +1278,7 @@ Schedule_t slShockTrooperVictoryDance[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "GruntVictoryDance"}, + "SHOCK_VICTORY_DANCE"}, }; //========================================================= @@ -1307,7 +1307,7 @@ Schedule_t slShockTrooperEstablishLineOfFire[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "GruntEstablishLineOfFire"}, + "SHOCK_ESTABLISH_LINE_OF_FIRE"}, }; //========================================================= @@ -1328,7 +1328,7 @@ Schedule_t slShockTrooperFoundEnemy[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "GruntFoundEnemy"}, + "SHOCK_FOUND_ENEMY"}, }; //========================================================= @@ -1352,7 +1352,7 @@ Schedule_t slShockTrooperCombatFace[] = bits_COND_CAN_RANGE_ATTACK1 | bits_COND_CAN_RANGE_ATTACK2, 0, - "Combat Face"}, + "SHOCK_COMBAT_FACE"}, }; //========================================================= @@ -1393,7 +1393,7 @@ Schedule_t slShockTrooperSignalSuppress[] = bits_COND_NO_AMMO_LOADED, bits_SOUND_DANGER, - "SignalSuppress"}, + "SHOCK_SIGNAL_SUPPRESS"}, }; Task_t tlShockTrooperSuppress[] = @@ -1428,7 +1428,7 @@ Schedule_t slShockTrooperSuppress[] = bits_COND_NO_AMMO_LOADED, bits_SOUND_DANGER, - "Suppress"}, + "SHOCK_SUPPRESS"}, }; @@ -1456,7 +1456,7 @@ Schedule_t slShockTrooperWaitInCover[] = bits_COND_CAN_MELEE_ATTACK2, bits_SOUND_DANGER, - "GruntWaitInCover"}, + "SHOCK_WAIT_IN_COVER"}, }; //========================================================= @@ -1482,7 +1482,7 @@ Schedule_t slShockTrooperTakeCover[] = ARRAYSIZE(tlShockTrooperTakeCover1), 0, 0, - "TakeCover"}, + "SHOCK_TAKE_COVER"}, }; //========================================================= @@ -1506,7 +1506,7 @@ Schedule_t slShockTrooperGrenadeCover[] = ARRAYSIZE(tlShockTrooperGrenadeCover1), 0, 0, - "GrenadeCover"}, + "SHOCK_GRENADE_COVER"}, }; @@ -1526,7 +1526,7 @@ Schedule_t slShockTrooperTossGrenadeCover[] = ARRAYSIZE(tlShockTrooperTossGrenadeCover1), 0, 0, - "TossGrenadeCover"}, + "SHOCK_TOSS_GRENADE_COVER"}, }; //========================================================= @@ -1549,7 +1549,7 @@ Schedule_t slShockTrooperTakeCoverFromBestSound[] = ARRAYSIZE(tlShockTrooperTakeCoverFromBestSound), 0, 0, - "GruntTakeCoverFromBestSound"}, + "SHOCK_TAKE_COVER_FROM_BEST_SOUND"}, }; //========================================================= @@ -1575,7 +1575,7 @@ Schedule_t slShockTrooperHideReload[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "GruntHideReload"} }; + "SHOCK_HIDE_RELOAD"} }; //========================================================= // Do a turning sweep of the area @@ -1604,7 +1604,8 @@ Schedule_t slShockTrooperSweep[] = bits_SOUND_DANGER | bits_SOUND_PLAYER, - "Grunt Sweep"}, + "SHOCK_SWEEP" + }, }; //========================================================= @@ -1641,7 +1642,7 @@ Schedule_t slShockTrooperRangeAttack1A[] = bits_COND_NO_AMMO_LOADED, bits_SOUND_DANGER, - "Range Attack1A"}, + "SHOCK_RANGE_ATTACK1A"}, }; @@ -1679,7 +1680,7 @@ Schedule_t slShockTrooperRangeAttack1B[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Range Attack1B"}, + "SHOCK_RANGE_ATTACK1B"}, }; //========================================================= @@ -1700,7 +1701,7 @@ Schedule_t slShockTrooperRangeAttack2[] = ARRAYSIZE(tlShockTrooperRangeAttack2), 0, 0, - "RangeAttack2"}, + "SHOCK_RANGE_ATTACK"}, }; @@ -1727,7 +1728,7 @@ Schedule_t slShockTrooperRepel[] = bits_SOUND_DANGER | bits_SOUND_COMBAT | bits_SOUND_PLAYER, - "Repel"}, + "SHOCK_REPEL"}, }; @@ -1747,7 +1748,7 @@ Schedule_t slShockTrooperRepelAttack[] = ARRAYSIZE(tlShockTrooperRepelAttack), bits_COND_ENEMY_OCCLUDED, 0, - "Repel Attack"}, + "SHOCK_REPEL_ATTACK"}, }; //========================================================= @@ -1776,32 +1777,33 @@ Schedule_t slShockTrooperRepelLand[] = bits_SOUND_DANGER | bits_SOUND_COMBAT | bits_SOUND_PLAYER, - "Repel Land"}, + "SHOCK_REPEL_LAND" + }, }; DEFINE_CUSTOM_SCHEDULES(CShockTrooper) { slShockTrooperFail, - slShockTrooperCombatFail, - slShockTrooperVictoryDance, - slShockTrooperEstablishLineOfFire, - slShockTrooperFoundEnemy, - slShockTrooperCombatFace, - slShockTrooperSignalSuppress, - slShockTrooperSuppress, - slShockTrooperWaitInCover, - slShockTrooperTakeCover, - slShockTrooperGrenadeCover, - slShockTrooperTossGrenadeCover, - slShockTrooperTakeCoverFromBestSound, - slShockTrooperHideReload, - slShockTrooperSweep, - slShockTrooperRangeAttack1A, - slShockTrooperRangeAttack1B, - slShockTrooperRangeAttack2, - slShockTrooperRepel, - slShockTrooperRepelAttack, - slShockTrooperRepelLand, + slShockTrooperCombatFail, + slShockTrooperVictoryDance, + slShockTrooperEstablishLineOfFire, + slShockTrooperFoundEnemy, + slShockTrooperCombatFace, + slShockTrooperSignalSuppress, + slShockTrooperSuppress, + slShockTrooperWaitInCover, + slShockTrooperTakeCover, + slShockTrooperGrenadeCover, + slShockTrooperTossGrenadeCover, + slShockTrooperTakeCoverFromBestSound, + slShockTrooperHideReload, + slShockTrooperSweep, + slShockTrooperRangeAttack1A, + slShockTrooperRangeAttack1B, + slShockTrooperRangeAttack2, + slShockTrooperRepel, + slShockTrooperRepelAttack, + slShockTrooperRepelLand, }; IMPLEMENT_CUSTOM_SCHEDULES(CShockTrooper, CTalkSquadMonster) diff --git a/dlls/monster/CTalkSquadMonster.cpp b/dlls/monster/CTalkSquadMonster.cpp index 5556c735..25407d7a 100644 --- a/dlls/monster/CTalkSquadMonster.cpp +++ b/dlls/monster/CTalkSquadMonster.cpp @@ -96,7 +96,7 @@ Schedule_t slIdleResponse[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "Idle Response" + "TALK_IDLE_RESPONSE" }, }; @@ -121,7 +121,7 @@ Schedule_t slIdleSpeak[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "Idle Speak" + "TALK_IDLE_SPEAK" }, }; @@ -143,7 +143,7 @@ Schedule_t slIdleSpeakWait[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "Idle Speak Wait" + "TALK_IDLE_SPEAK_WAIT" }, }; @@ -178,7 +178,7 @@ Schedule_t slIdleHello[] = bits_COND_PROVOKED, bits_SOUND_COMBAT, - "Idle Hello" + "TALK_IDLE_HELLO" }, }; @@ -198,7 +198,7 @@ Schedule_t slIdleStopShooting[] = bits_COND_HEAVY_DAMAGE | bits_COND_HEAR_SOUND, 0, - "Idle Stop Shooting" + "TALK_IDLE_STOP_SHOOTING" }, }; @@ -243,7 +243,7 @@ Schedule_t slTlkIdleWatchClient[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "TlkIdleWatchClient" + "TALK_IDLE_WATCH_CLIENT1" }, { @@ -266,7 +266,7 @@ Schedule_t slTlkIdleWatchClient[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "TlkIdleWatchClientStare" + "TALK_IDLE_WATCH_CLIENT2" }, }; @@ -289,7 +289,7 @@ Schedule_t slTlkIdleEyecontact[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "TlkIdleEyecontact" + "TALK_EYE_CONTACT" }, }; diff --git a/dlls/monster/CTor.cpp b/dlls/monster/CTor.cpp index 89d33780..d4954aeb 100644 --- a/dlls/monster/CTor.cpp +++ b/dlls/monster/CTor.cpp @@ -187,7 +187,7 @@ Schedule_t slSummonAttack[] = 0, 0, - "Summon Attack" + "TOR_SUMMON_ATTACK" }, }; diff --git a/dlls/monster/defaultai.cpp b/dlls/monster/defaultai.cpp index 555a7806..e0cc0286 100644 --- a/dlls/monster/defaultai.cpp +++ b/dlls/monster/defaultai.cpp @@ -55,7 +55,7 @@ Schedule_t slFail[] = bits_SOUND_WORLD | bits_SOUND_PLAYER | bits_SOUND_DANGER, - "Fail" + "FAIL" }, }; @@ -91,7 +91,7 @@ Schedule_t slIdleStand[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "IdleStand" + "IDLE_STAND" }, }; @@ -104,7 +104,7 @@ Schedule_t slIdleTrigger[] = bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE, 0, - "Idle Trigger" + "IDLE_TRIGGER" }, }; @@ -133,7 +133,7 @@ Schedule_t slIdleWalk[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "Idle Walk" + "IDLE_WALK" }, }; @@ -159,7 +159,7 @@ Schedule_t slAmbush[] = bits_COND_PROVOKED, 0, - "Ambush" + "AMBUSH" }, }; @@ -202,7 +202,7 @@ Schedule_t slActiveIdle[] = bits_SOUND_WORLD | bits_SOUND_PLAYER | bits_SOUND_DANGER, - "Active Idle" + "ACTIVE_IDLE" } }; @@ -224,7 +224,7 @@ Schedule_t slWakeAngry[] = ARRAYSIZE ( tlWakeAngry1 ), bits_COND_NEW_ENEMY, 0, - "Wake Angry" + "WAKE_ANGRY" } }; @@ -249,7 +249,7 @@ Schedule_t slAlertFace[] = bits_COND_HEAVY_DAMAGE | bits_COND_PROVOKED, 0, - "Alert Face" + "ALERT_FACE" }, }; @@ -272,7 +272,7 @@ Schedule_t slAlertSmallFlinch[] = ARRAYSIZE ( tlAlertSmallFlinch ), 0, 0, - "Alert Small Flinch" + "ALERT_SMALL_FLINCH" }, }; @@ -310,7 +310,7 @@ Schedule_t slAlertStand[] = bits_SOUND_MEAT |// scent flags bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "Alert Stand" + "ALERT_SOUND" }, }; @@ -346,7 +346,7 @@ Schedule_t slInvestigateSound[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "InvestigateSound" + "INVESTIGATE_SOUND" }, }; @@ -371,7 +371,7 @@ Schedule_t slCombatStand[] = bits_COND_HEAVY_DAMAGE | bits_COND_CAN_ATTACK, 0, - "Combat Stand" + "COMBAT_STAND" }, }; @@ -394,7 +394,7 @@ Schedule_t slCombatFace[] = bits_COND_NEW_ENEMY | bits_COND_ENEMY_DEAD, 0, - "Combat Face" + "COMBAT_FACE" }, }; @@ -422,7 +422,7 @@ Schedule_t slStandoff[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Standoff" + "STANDOFF" } }; @@ -442,7 +442,7 @@ Schedule_t slArmWeapon[] = ARRAYSIZE ( tlArmWeapon ), 0, 0, - "Arm Weapon" + "ARM_WEAPON" } }; @@ -462,7 +462,7 @@ Schedule_t slReload[] = ARRAYSIZE ( tlReload ), bits_COND_HEAVY_DAMAGE, 0, - "Reload" + "RELOAD" } }; @@ -492,7 +492,7 @@ Schedule_t slRangeAttack1[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Range Attack1" + "RANGE_ATTACK1" }, }; @@ -517,7 +517,7 @@ Schedule_t slRangeAttack2[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Range Attack2" + "RANGE_ATTACK2" }, }; @@ -540,7 +540,7 @@ Schedule_t slPrimaryMeleeAttack[] = bits_COND_HEAVY_DAMAGE | bits_COND_ENEMY_OCCLUDED, 0, - "Primary Melee Attack" + "MELEE_ATTACK1" }, }; @@ -563,7 +563,7 @@ Schedule_t slSecondaryMeleeAttack[] = bits_COND_HEAVY_DAMAGE | bits_COND_ENEMY_OCCLUDED, 0, - "Secondary Melee Attack" + "MELEE_ATTACK2" }, }; @@ -589,7 +589,7 @@ Schedule_t slSpecialAttack1[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Special Attack1" + "SPECIAL_ATTACK1" }, }; @@ -615,7 +615,7 @@ Schedule_t slSpecialAttack2[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Special Attack2" + "SPECIAL_ATTACK2" }, }; @@ -642,7 +642,7 @@ Schedule_t slChaseEnemy[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "Chase Enemy" + "CHASE_ENEMY" }, }; @@ -674,7 +674,7 @@ Schedule_t slChaseEnemyFailed[] = bits_COND_HEAR_SOUND, bits_SOUND_DANGER, - "tlChaseEnemyFailed" + "CHASE_ENEMY_FAILED" }, }; @@ -696,7 +696,7 @@ Schedule_t slSmallFlinch[] = ARRAYSIZE ( tlSmallFlinch ), 0, 0, - "Small Flinch" + "SMALL_FLINCH" }, }; @@ -717,7 +717,7 @@ Schedule_t slDie[] = ARRAYSIZE( tlDie1 ), 0, 0, - "Die" + "DIE" }, }; @@ -738,7 +738,7 @@ Schedule_t slVictoryDance[] = ARRAYSIZE( tlVictoryDance ), 0, 0, - "Victory Dance" + "VICTORY_DANCE" }, }; @@ -762,7 +762,7 @@ Schedule_t slBarnacleVictimGrab[] = ARRAYSIZE ( tlBarnacleVictimGrab ), 0, 0, - "Barnacle Victim" + "BARNACLE_VICTIM" } }; @@ -786,7 +786,7 @@ Schedule_t slBarnacleVictimChomp[] = ARRAYSIZE ( tlBarnacleVictimChomp ), 0, 0, - "Barnacle Chomp" + "BARNACLE_CHOMP" } }; @@ -805,7 +805,7 @@ Schedule_t slError[] = ARRAYSIZE ( tlError ), 0, 0, - "Error" + "ERROR" }, }; @@ -828,7 +828,7 @@ Schedule_t slWalkToScript[] = ARRAYSIZE ( tlScriptedWalk ), SCRIPT_BREAK_CONDITIONS, 0, - "WalkToScript" + "WALK_TO_SCRIPT" }, }; @@ -852,7 +852,7 @@ Schedule_t slRunToScript[] = ARRAYSIZE ( tlScriptedRun ), SCRIPT_BREAK_CONDITIONS, 0, - "RunToScript" + "RUN_TO_SCRIPT" }, }; @@ -870,7 +870,7 @@ Schedule_t slWaitScript[] = ARRAYSIZE ( tlScriptedWait ), SCRIPT_BREAK_CONDITIONS, 0, - "WaitForScript" + "WAIT_FOR_SCRIPT" }, }; @@ -890,7 +890,7 @@ Schedule_t slFaceScript[] = ARRAYSIZE ( tlScriptedFace ), SCRIPT_BREAK_CONDITIONS, 0, - "FaceScript" + "FACE_SCRIPT" }, }; @@ -911,7 +911,7 @@ Schedule_t slCower[] = ARRAYSIZE ( tlCower ), 0, 0, - "Cower" + "COWER" }, }; @@ -935,7 +935,7 @@ Schedule_t slTakeCoverFromOrigin[] = ARRAYSIZE ( tlTakeCoverFromOrigin ), bits_COND_NEW_ENEMY, 0, - "TakeCoverFromOrigin" + "TAKE_COVER_FROM_ORIGIN" }, }; @@ -959,7 +959,7 @@ Schedule_t slTakeCoverFromBestSound[] = ARRAYSIZE ( tlTakeCoverFromBestSound ), bits_COND_NEW_ENEMY, 0, - "TakeCoverFromBestSound" + "TAKE_COVER_FROM_BEST_SOUND" }, }; @@ -987,7 +987,7 @@ Schedule_t slTakeCoverFromEnemy[] = ARRAYSIZE ( tlTakeCoverFromEnemy ), bits_COND_NEW_ENEMY, 0, - "tlTakeCoverFromEnemy" + "TAKE_COVER_FROM_ENEMY" }, }; @@ -1010,7 +1010,7 @@ Schedule_t slFollow[] = bits_COND_HEAR_SOUND | bits_COND_PROVOKED, bits_SOUND_DANGER, - "Follow" + "FOLLOW" }, }; @@ -1035,7 +1035,7 @@ Schedule_t slFaceTarget[] = bits_COND_HEAR_SOUND | bits_COND_PROVOKED, bits_SOUND_DANGER, - "FaceTarget" + "FACE_TARGET" }, }; @@ -1051,7 +1051,7 @@ Schedule_t slStopFollowing[] = ARRAYSIZE(tlStopFollowing), 0, 0, - "StopFollowing" + "STOP_FOLLOWING" }, }; @@ -1072,7 +1072,7 @@ Schedule_t slMoveAway[] = ARRAYSIZE(tlMoveAway), 0, 0, - "MoveAway" + "MOVE_AWAY" }, }; @@ -1090,7 +1090,7 @@ Schedule_t slMoveAwayFail[] = ARRAYSIZE(tlMoveAwayFail), 0, 0, - "MoveAwayFail" + "MOVE_AWAY_FAIL" }, }; @@ -1113,7 +1113,7 @@ Schedule_t slMoveAwayFollow[] = ARRAYSIZE(tlMoveAwayFollow), 0, 0, - "MoveAwayFollow" + "MOVE_AWAY_FOLLOW" }, }; @@ -1146,6 +1146,6 @@ Schedule_t slRoam[] = bits_SOUND_MEAT |// scents bits_SOUND_CARCASS | bits_SOUND_GARBAGE, - "Roam" + "ROAM" }, }; diff --git a/dlls/monster/monsters.h b/dlls/monster/monsters.h index 76254ca9..b4cc05a4 100644 --- a/dlls/monster/monsters.h +++ b/dlls/monster/monsters.h @@ -167,6 +167,7 @@ class EXPORT CGib : public CBaseEntity #define CUSTOM_SCHEDULES\ virtual Schedule_t *ScheduleFromName( const char *pName );\ + virtual void GetAllSchedules( std::unordered_set& schedulesOut );\ static Schedule_t *m_scheduleList[] #define DEFINE_CUSTOM_SCHEDULES(derivedClass)\ @@ -179,6 +180,12 @@ class EXPORT CGib : public CBaseEntity if ( !pSchedule )\ return baseClass::ScheduleFromName(pName);\ return pSchedule;\ + } \ + void derivedClass::GetAllSchedules(std::unordered_set& schedulesOut) { \ + baseClass::GetAllSchedules(schedulesOut); \ + for (int i = 0; i < ARRAYSIZE(m_scheduleList); i++) { \ + schedulesOut.insert(m_scheduleList[i]); \ + } \ } diff --git a/dlls/scripted.h b/dlls/scripted.h index bff4b071..b45c3fb9 100644 --- a/dlls/scripted.h +++ b/dlls/scripted.h @@ -72,6 +72,7 @@ class CCineMonster : public CBaseMonster void CancelScript( void ); virtual BOOL StartSequence( CBaseMonster *pTarget, int iszSeq, BOOL completeOnEmpty ); virtual BOOL FCanOverrideState ( void ); + virtual BOOL IsNormalMonster(void) { return FALSE; } void SequenceDone ( CBaseMonster *pMonster ); virtual void FixScriptMonsterSchedule( CBaseMonster *pMonster ); BOOL CanInterrupt( void ); diff --git a/dlls/weapon/CGrenade.h b/dlls/weapon/CGrenade.h index 04e8231a..74d7c74f 100644 --- a/dlls/weapon/CGrenade.h +++ b/dlls/weapon/CGrenade.h @@ -37,6 +37,7 @@ class CGrenade : public CBaseMonster const char* GetModel(); void SetGrenadeModel(); virtual int MergedModelBody() { return -1; } + virtual BOOL IsNormalMonster(void) { return FALSE; } BOOL m_fRegisteredSound;// whether or not this grenade has issued its DANGER sound to the world sound list yet. };