UFO: Alien Invasion
|
func_* edicts More...
#include "g_func.h"
#include "g_actor.h"
#include "g_ai.h"
#include "g_match.h"
#include "g_move.h"
#include "g_spawn.h"
#include "g_trigger.h"
#include "g_utils.h"
#include "g_vis.h"
Go to the source code of this file.
Macros | |
#define | REVERSE 0x00000200 |
Functions | |
static bool | Touch_Breakable (Edict *self, Edict *activator) |
If an actor was standing on the breakable that is going to get destroyed, we have to let him fall to the ground. More... | |
static bool | Destroy_Breakable (Edict *self) |
static bool | Use_Breakable (Edict *self, Edict *activator) |
void | SP_func_breakable (Edict *ent) |
func_breakable (0.3 0.3 0.3) ? Used for breakable objects. More... | |
static void | Door_SlidingUse (Edict *door) |
Slides a door. More... | |
static bool | Door_Use (Edict *door, Edict *activator) |
Opens/closes a door. More... | |
static bool | Touch_DoorTrigger (Edict *self, Edict *activator) |
Trigger to open the door we are standing in front of it. More... | |
static void | Reset_DoorTrigger (Edict *self, Edict *activator) |
Left the door trigger zone - reset the client action. More... | |
void | SP_func_door (Edict *ent) |
func_door (0 .5 .8) ? "health" if set, door is destroyable More... | |
void | SP_func_door_sliding (Edict *ent) |
void | SP_func_rotating (Edict *ent) |
Spawns a rotating solid inline brush model. More... | |
func_* edicts
Definition in file g_func.cpp.
#define REVERSE 0x00000200 |
Definition at line 326 of file g_func.cpp.
Referenced by SP_func_door(), and SP_func_door_sliding().
|
static |
Definition at line 55 of file g_func.cpp.
References Edict::child(), linkedList_t::data, f, G_ActorFall(), G_EventModelExplode(), G_EventModelExplodeTriggered(), G_FreeEdict(), G_IsActor, G_RecalcRouting(), G_SpawnParticle(), G_TouchEdicts(), G_TriggerRemoveFromList(), gi, LIST_Foreach, MAT_ELECTRICAL, MAT_GLASS, MAT_MAX, MAT_METAL, MAT_WOOD, linkedList_t::next, Edict::reset, GridBox::set(), and Edict::touchedList.
Referenced by SP_func_breakable(), SP_func_door(), SP_func_door_sliding(), SP_func_rotating(), and Use_Breakable().
Slides a door.
[in,out] | door | The entity of the inline model. The aabb of this bmodel will get updated in this function to reflect the new door position in the world |
Definition at line 180 of file g_func.cpp.
References AngleVectors(), Edict::dir, Edict::doorState, DotProduct, GET_SLIDING_DOOR_SHIFT_VECTOR, Edict::origin, Edict::size, STATE_OPENED, VectorAbs, VectorAdd, and VectorMul.
Referenced by Door_Use().
Opens/closes a door.
Definition at line 217 of file g_func.cpp.
References Edict::angles, Com_DPrintf(), DEBUG_GAME, Edict::dir, DOOR_OPEN_REVERSE, DOOR_ROTATION_ANGLE, Door_SlidingUse(), Edict::doorState, ET_DOOR, ET_DOOR_SLIDING, G_CheckVis(), G_CheckVisTeamAll(), G_EventDoorClose(), G_EventDoorOpen(), G_EventSpawnSound(), G_GetClosePlayerMask(), G_IsLivingActor(), G_MatchIsRunning(), G_RecalcRouting(), Edict::getTeam(), gi, Edict::model, Edict::noise, Edict::origin, Q_strvalid, GridBox::set(), STATE_CLOSED, STATE_OPENED, Edict::type, and UNIT_SIZE.
Referenced by SP_func_door(), and SP_func_door_sliding().
Left the door trigger zone - reset the client action.
self | The trigger |
activator | The edict that left the trigger zone |
Definition at line 320 of file g_func.cpp.
References Edict::clientAction, G_ActorSetClientAction(), and Edict::owner().
Referenced by SP_func_door().
func_breakable (0.3 0.3 0.3) ? Used for breakable objects.
Definition at line 144 of file g_func.cpp.
References AABB_STRING, AABB::asIntString(), Edict::classname, Com_DPrintf(), DEBUG_GAME, Edict::destroy, Destroy_Breakable(), Edict::entBox, ET_BREAKABLE, FL_DESTROYABLE, Edict::flags, gi, Edict::mapNum, Edict::model, Edict::origin, Edict::setTouch(), Edict::solid, SOLID_BSP, Touch_Breakable(), Edict::type, Edict::use, and Use_Breakable().
func_door (0 .5 .8) ? "health" if set, door is destroyable
Definition at line 335 of file g_func.cpp.
References Edict::classname, Edict::destroy, Destroy_Breakable(), Edict::dir, DOOR_OPEN_REVERSE, Door_Use(), Edict::doorState, ET_DOOR, FL_CLIENTACTION, FL_DESTROYABLE, FL_TRIGGERED, Edict::flags, G_ActorSetTU(), G_TriggerSpawn(), G_UseEdict(), gi, Edict::HP, Edict::model, Edict::noise, Edict::reset, Reset_DoorTrigger(), REVERSE, Edict::setChild(), Edict::setTouch(), Edict::solid, SOLID_BSP, Edict::spawnflags, Edict::speed, STATE_CLOSED, Touch_DoorTrigger(), TU_DOOR_ACTION, Edict::type, Edict::use, and YAW.
Definition at line 374 of file g_func.cpp.
References Edict::classname, Edict::destroy, Destroy_Breakable(), Edict::dir, DOOR_OPEN_REVERSE, Door_Use(), Edict::doorState, ET_DOOR_SLIDING, FL_DESTROYABLE, Edict::flags, gi, Edict::HP, Edict::model, Edict::noise, REVERSE, Edict::solid, SOLID_BSP, Edict::spawnflags, Edict::speed, STATE_CLOSED, Edict::type, and Edict::use.
Spawns a rotating solid inline brush model.
Definition at line 405 of file g_func.cpp.
References Edict::classname, Edict::destroy, Destroy_Breakable(), ET_ROTATING, FL_DESTROYABLE, Edict::flags, gi, Edict::HP, Edict::model, Edict::solid, SOLID_BSP, Edict::speed, and Edict::type.
If an actor was standing on the breakable that is going to get destroyed, we have to let him fall to the ground.
self | The breakable edict |
activator | The touching edict |
Definition at line 46 of file g_func.cpp.
References G_IsActor, and G_TriggerAddToList().
Referenced by SP_func_breakable().
Trigger to open the door we are standing in front of it.
Definition at line 290 of file g_func.cpp.
References AI_CheckUsingDoor(), FL_GROUPSLAVE, G_ActorSetClientAction(), G_ActorUseDoor(), G_IsActor, G_IsAI, makeActor(), and Edict::owner().
Referenced by SP_func_door().
Definition at line 127 of file g_func.cpp.
References Destroy_Breakable().
Referenced by SP_func_breakable().