Added basic support for vortigaunts using the grenade AI from CNPC_PlayerCompanion

This commit is contained in:
Blixibon 2021-11-11 19:05:09 -06:00
parent 3d3ef7e587
commit 4fbb9bc602
2 changed files with 11 additions and 1 deletions

View File

@ -1070,9 +1070,17 @@ Activity CNPC_Vortigaunt::NPC_TranslateActivity( Activity eNewActivity )
if ( GetReadinessLevel() >= AIRL_STIMULATED )
return ACT_IDLE_STIMULATED;
}
if ( eNewActivity == ACT_RANGE_ATTACK2 )
{
#ifdef MAPBASE
// If we're capable of using grenades, use ACT_COMBINE_THROW_GRENADE
if (IsGrenadeCapable())
return ACT_COMBINE_THROW_GRENADE;
else
#endif
return (Activity) ACT_VORTIGAUNT_DISPEL;
}
return BaseClass::NPC_TranslateActivity( eNewActivity );
}

View File

@ -141,6 +141,8 @@ public:
#ifdef MAPBASE
// Use the vortigaunts' default subtitle color (188,241,174)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 188; params.g1 = 241; params.b1 = 174; return BaseClass::GetGameTextSpeechParams( params ); }
const char* GetGrenadeAttachment() { return "rightclaw"; }
#endif
private: