Exemplo n.º 1
0
/*
================
G_Script_ScriptEvent

  An event has occured, for which a script may exist
================
*/
void G_Script_ScriptEvent(gentity_t *ent, char *eventStr, char *params) {
	int i = G_Script_GetEventIndex(ent, eventStr, params);

	if (i >= 0) {
		G_Script_ScriptChange(ent, i);
	}
}
Exemplo n.º 2
0
void G_Script_ScriptEvent( gentity_t *ent, char *eventStr, char *params )
{
    int i = G_Script_GetEventIndex(ent, eventStr, params);

    if (i>=0)
        G_Script_ScriptChange( ent, i );

    // omnibot
    //////////////////////////////////////////////////////////////////////////
    // skip these
    if(!Q_stricmp(eventStr, "trigger") ||
            !Q_stricmp(eventStr, "activate") ||
            !Q_stricmp(eventStr, "spawn") ||
            !Q_stricmp(eventStr, "death") ||
            !Q_stricmp(eventStr, "pain") ||
            !Q_stricmp(eventStr, "playerstart"))
        return;

    if(!Q_stricmp(eventStr, "defused"))
    {
        Bot_Util_SendTrigger(ent, NULL,
                             va("Defused at %s.", ent->parent ? ent->parent->track : ent->track),
                             eventStr);
    }
    else if(!Q_stricmp(eventStr, "dynamited"))
    {
        Bot_Util_SendTrigger(ent, NULL,
                             va("Planted at %s.", ent->parent ? ent->parent->track : ent->track),
                             eventStr);
    }
    else if(!Q_stricmp(eventStr, "destroyed"))
    {
        Bot_Util_SendTrigger(ent, NULL,
                             va("%s Destroyed.", ent->parent ? ent->parent->track : ent->track),
                             eventStr);
    }
    else if(!Q_stricmp(eventStr, "exploded"))
    {
        Bot_Util_SendTrigger(ent, NULL,
                             va("Explode_%s Exploded.", _GetEntityName(ent) ),eventStr);
    }
    // end omnibot
}