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. More... | |
void | G_TriggerAddToList (Edict *self, Edict *activator) |
Adds the activator to the list of recognized edicts for this trigger_touch edict. More... | |
bool | G_TriggerRemoveFromList (Edict *self, Edict *activator) |
Removes an activator from the list of recognized edicts. More... | |
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. More... | |
void | SP_trigger_nextmap (Edict *ent) |
bool | Touch_HurtTrigger (Edict *self, Edict *activator) |
Hurt trigger. More... | |
void | SP_trigger_hurt (Edict *ent) |
Trigger for grid fields if they are under fire. More... | |
void | SP_trigger_touch (Edict *ent) |
Touch trigger to call the use function of the attached target. More... | |
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. More... | |
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_TriggerIsInList(), linkedList_t::next, and TAG_LEVEL.
Referenced by G_TouchTriggers(), 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, and linkedList_t::next.
Referenced by G_ResetTriggers(), and G_TriggerAddToList().
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, and linkedList_t::next.
Referenced by Destroy_Breakable(), and G_ResetTriggers().
Definition at line 106 of file g_trigger.cpp.
References Edict::_owner, Edict::absBox, Edict::entBox, ET_TRIGGER, AABB::expandXY(), G_Spawn(), gi, Edict::reset, AABB::set(), Edict::solid, SOLID_TRIGGER, Edict::type, and UNIT_SIZE.
Referenced by 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_s::csi, csi_s::damFire, Edict::dmg, Edict::dmgtype, ET_TRIGGER_HURT, gi, Edict::model, Edict::reset, Edict::setChild(), Edict::setTouch(), Edict::solid, SOLID_TRIGGER, Touch_HurtTrigger(), and Edict::type.
Definition at line 171 of file g_trigger.cpp.
References Edict::classname, ET_TRIGGER_NEXTMAP, G_FreeEdict(), G_IsMultiPlayer, gi, level, level_locals_s::mapname, Edict::model, Edict::nextmap, Edict::particle, Q_streq, Edict::reset, Edict::setChild(), Edict::solid, SOLID_TRIGGER, and Edict::type.
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, Edict::spawnflags, Touch_RescueTrigger(), and Edict::type.
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, Edict::target, Touch_TouchTrigger(), and Edict::type.
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 _, G_EventCenterViewAt(), G_SpawnParticle(), gi, PM_ALL, PRINT_HUD, Touch_NextMapTrigger(), and VecToPos.
Referenced by G_MatchEndTrigger().
Hurt trigger.
Definition at line 212 of file g_trigger.cpp.
References Edict::addStun(), Edict::chr, game_import_s::csi, csi_s::damShock, csi_s::damStunElectro, csi_s::damStunGas, Edict::dmgtype, G_ApplyProtection(), G_CheckDeathOrKnockout(), G_DamageActor(), G_EventSpawnSound(), G_IsLivingActor(), G_PlayerToPM, character_s::gender, teamDef_s::getActorSound(), Edict::getPlayer(), gi, makeActor(), teamDef_s::robot, SND_HURT, and character_s::teamDef.
Referenced by SP_misc_fire(), SP_misc_smoke(), SP_misc_smokestun(), and SP_trigger_hurt().