added game_playerdie and game_playerkill output to ZR as described here: https://developer.valvesoftware.com/wiki/Trigger_brush

This commit is contained in:
BotoX 2016-08-18 06:52:00 +02:00
parent f987a534f2
commit 0c0ce1adfc
1 changed files with 16 additions and 0 deletions

View File

@ -178,6 +178,22 @@ APIOnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, b
// Finish the call.
Call_Finish();
// Forward event to map.
if(!motherinfect)
{
int entity = INVALID_ENT_REFERENCE;
while((entity = FindEntityByClassname(entity, "trigger_brush")) != INVALID_ENT_REFERENCE)
{
static char sTargetname[64];
GetEntPropString(entity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname));
if(StrEqual(sTargetname, "game_playerdie"))
AcceptEntityInput(entity, "Use", client, client);
else if(StrEqual(sTargetname, "game_playerkill"))
AcceptEntityInput(entity, "Use", attacker, attacker);
}
}
}
/**