|
UFO: Alien Invasion
|
Trigger functions. More...
#include "g_local.h"

Go to the source code of this file.
Functions | |
| bool | G_TriggerIsInList (Edict *self, Edict *activator) |
| Checks whether the activator of this trigger_touch was already recognized. | |
| void | G_TriggerAddToList (Edict *self, Edict *activator) |
| Adds the activator to the list of recognized edicts for this trigger_touch edict. | |
| bool | G_TriggerRemoveFromList (Edict *self, Edict *activator) |
| Removes an activator from the list of recognized edicts. | |
| Edict * | G_TriggerSpawn (Edict *owner) |
| void | Think_NextMapTrigger (Edict *self) |
| Register this think function once you would like to end the match This think function will register the touch callback and spawns the particles for the client to see the next map trigger. | |
| void | SP_trigger_nextmap (Edict *ent) |
| bool | Touch_HurtTrigger (Edict *self, Edict *activator) |
| Hurt trigger. | |
| void | SP_trigger_hurt (Edict *ent) |
| Trigger for grid fields if they are under fire. | |
| void | SP_trigger_touch (Edict *ent) |
| Touch trigger to call the use function of the attached target. | |
| void | SP_trigger_rescue (Edict *ent) |
| Rescue trigger to mark an actor to be in the rescue zone. Aborting a game would not kill the actors inside this trigger area. | |
Trigger functions.
Definition in file g_trigger.h.
Adds the activator to the list of recognized edicts for this trigger_touch edict.
| self | The trigger self pointer |
| activator | The activating edict (might be nullptr) |
Definition at line 67 of file g_trigger.cpp.
References linkedList_t::data, G_TagMalloc, G_TriggerAddToList(), G_TriggerIsInList(), linkedList_t::next, TAG_LEVEL, and Edict::touchedList.
Referenced by G_TouchTriggers(), G_TriggerAddToList(), and Touch_Breakable().
Checks whether the activator of this trigger_touch was already recognized.
| self | The trigger self pointer |
| activator | The activating edict (might be nullptr) |
true if the activator is already in the list of recognized edicts or no activator was given, false if the activator is not yet part of the list Definition at line 47 of file g_trigger.cpp.
References linkedList_t::data, G_TriggerIsInList(), linkedList_t::next, and Edict::touchedList.
Referenced by G_ResetTriggers(), G_TriggerAddToList(), and G_TriggerIsInList().
Removes an activator from the list of recognized edicts.
| self | The trigger self pointer |
| activator | The activating edict (might be nullptr) |
true if removal was successful or not needed, false if the activator wasn't found in the list Definition at line 87 of file g_trigger.cpp.
References linkedList_t::data, G_MemFree, G_TriggerRemoveFromList(), linkedList_t::next, and Edict::touchedList.
Referenced by Destroy_Breakable(), G_ResetTriggers(), and G_TriggerRemoveFromList().
Definition at line 106 of file g_trigger.cpp.
References Edict::_owner, Edict::absBox, Edict::entBox, ET_TRIGGER, AABB::expandXY(), G_Spawn(), G_TriggerSpawn(), gi, Edict::reset, AABB::set(), Edict::solid, SOLID_TRIGGER, Edict::type, and UNIT_SIZE.
Referenced by G_TriggerSpawn(), and SP_func_door().
Trigger for grid fields if they are under fire.
Definition at line 255 of file g_trigger.cpp.
References Edict::classname, game_import_t::csi, csi_t::damFire, Edict::dmg, Edict::dmgtype, ET_TRIGGER_HURT, gi, Edict::model, Edict::reset, Edict::setChild(), Edict::setTouch(), Edict::solid, SOLID_TRIGGER, SP_trigger_hurt(), Touch_HurtTrigger(), and Edict::type.
Referenced by SP_trigger_hurt().
Definition at line 171 of file g_trigger.cpp.
References Edict::classname, ET_TRIGGER_NEXTMAP, G_FreeEdict(), G_IsMultiPlayer, gi, level, level_locals_t::mapname, Edict::model, Edict::nextmap, Edict::particle, Q_streq, Edict::reset, Edict::setChild(), Edict::solid, SOLID_TRIGGER, SP_trigger_nextmap(), and Edict::type.
Referenced by SP_trigger_nextmap().
Rescue trigger to mark an actor to be in the rescue zone. Aborting a game would not kill the actors inside this trigger area.
Definition at line 375 of file g_trigger.cpp.
References Edict::classname, ET_TRIGGER_RESCUE, G_FreeEdict(), G_IsMultiPlayer, gi, Edict::model, Edict::reset, Reset_RescueTrigger(), Edict::setChild(), Edict::setTouch(), Edict::solid, SOLID_TRIGGER, SP_trigger_rescue(), Edict::spawnflags, Touch_RescueTrigger(), and Edict::type.
Referenced by SP_trigger_rescue().
Touch trigger to call the use function of the attached target.
Definition at line 320 of file g_trigger.cpp.
References Edict::classname, ET_TRIGGER_TOUCH, G_FreeEdict(), gi, Edict::model, Edict::reset, Reset_TouchTrigger(), Edict::setChild(), Edict::setTouch(), Edict::solid, SOLID_TRIGGER, SP_trigger_touch(), Edict::target, Touch_TouchTrigger(), and Edict::type.
Referenced by SP_trigger_touch().
Register this think function once you would like to end the match This think function will register the touch callback and spawns the particles for the client to see the next map trigger.
Definition at line 153 of file g_trigger.cpp.
References _, Edict::absBox, G_EventCenterViewAt(), G_SpawnParticle(), AABB::getCenter(), gi, Edict::particle, PM_ALL, PRINT_HUD, Edict::setTouch(), Edict::spawnflags, Edict::think, Think_NextMapTrigger(), Touch_NextMapTrigger(), and VecToPos.
Referenced by G_MatchEndTrigger(), and Think_NextMapTrigger().
Hurt trigger.
Definition at line 212 of file g_trigger.cpp.
References Edict::addStun(), Edict::chr, game_import_t::csi, csi_t::damShock, csi_t::damStunElectro, csi_t::damStunGas, Edict::dmg, Edict::dmgtype, G_ApplyProtection(), G_CheckDeathOrKnockout(), G_DamageActor(), G_EventSpawnSound(), G_IsLivingActor(), G_PlayerToPM, character_t::gender, teamDef_t::getActorSound(), Edict::getPlayer(), gi, makeActor(), teamDef_t::robot, SND_HURT, character_t::teamDef, and Touch_HurtTrigger().
Referenced by SP_misc_fire(), SP_misc_smoke(), SP_misc_smokestun(), SP_trigger_hurt(), and Touch_HurtTrigger().