Added prototype Response System library port from the Alien Swarm SDK

This commit is contained in:
Blixibon
2021-03-08 02:11:13 -06:00
parent 251725c987
commit d081a0cee3
61 changed files with 11056 additions and 63 deletions
+13 -1
View File
@@ -1210,16 +1210,28 @@ const char *CZombieCustom::GetMoanSound( int nSound )
// We could probably do this through the response system alone now, but whatever.
modifiers.AppendCriteria( "moansound", UTIL_VarArgs("%i", nSound & 4) );
#ifdef NEW_RESPONSE_SYSTEM
AI_Response response;
CAI_Concept concept = "TLK_ZOMBIE_MOAN";
concept.SetSpeaker( this );
if (!FindResponse( response, concept, &modifiers ))
return "NPC_BaseZombie.Moan1";
#else
AI_Response *response = SpeakFindResponse(TLK_ZOMBIE_MOAN, modifiers);
if ( !response )
return "NPC_BaseZombie.Moan1";
#endif
// Must be static so it could be returned
static char szSound[128];
#ifdef NEW_RESPONSE_SYSTEM
response.GetName(szSound, sizeof(szSound));
#else
response->GetName(szSound, sizeof(szSound));
delete response;
#endif
return szSound;
}