mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Added prototype Response System library port from the Alien Swarm SDK
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user