edict_s Struct Reference

Everything that is not in the bsp tree is an edict, the spawnpoints, the actors, the misc_models, the weapons and so on. More...

#include <g_local.h>

Collaboration diagram for edict_s:
Collaboration graph
[legend]

Data Fields

qboolean inuse
int linkcount
int number
vec3_t origin
vec3_t angles
solid_t solid
vec3_t mins
vec3_t maxs
vec3_t absmin
vec3_t absmax
vec3_t size
edict_tchild
edict_towner
int modelindex
int mapNum
const char * model
entity_type_t type
int visflags
int contentFlags
pos3_t pos
byte dir
int TU
int HP
int STUN
int morale
int state
int team
int pnum
int body
int head
int frame
char * group
const edict_treactionTarget
float reactionTUs
qboolean reactionNoDraw
qboolean inRescueZone
edict_tclientAction
character_t chr
int spawnflags
const char * classname
float angle
int speed
const char * target
const char * targetname
const char * item
const char * particle
const char * message
const char * noise
edictMaterial_t material
int count
int time
int sounds
int dmg
actorSizeEnum_t fieldSize
qboolean hiding
qboolean(* touch )(edict_t *self, edict_t *activator)
void(* reset )(edict_t *self, edict_t *activator)
float nextthink
void(* think )(edict_t *self)
qboolean(* use )(edict_t *self, edict_t *activator)
qboolean(* destroy )(edict_t *self)
int doorState
moveinfo_t moveinfo
edict_tgroupChain
edict_tgroupMaster
int flags
AI_t AI
pos3_tforbiddenListPos
int forbiddenListSize

Detailed Description

Everything that is not in the bsp tree is an edict, the spawnpoints, the actors, the misc_models, the weapons and so on.

Definition at line 636 of file g_local.h.


Field Documentation

The character's artificial intelligence

Definition at line 759 of file g_local.h.

Referenced by AIL_ActorThink(), AIL_CleanupActor(), and AIL_InitActor().

entity yaw - (0-360 degree) set via mapeditor - sometimes used for movement direction, then -1=up; -2=down is used additionally

Definition at line 714 of file g_local.h.

Referenced by G_Actor2x2Spawn(), G_ActorSpawn(), and G_ClientSendEdictsAndBrushModels().

the rotation in the world (pitch, yaw, roll)

Definition at line 644 of file g_local.h.

Referenced by Door_Use(), G_ClientSendEdictsAndBrushModels(), SV_ClipMoveToEntities(), SV_LinkEdict(), and SV_SetModel().

the models (hud)

Definition at line 689 of file g_local.h.

Referenced by AI_InitPlayer(), G_AppearPerishEvent(), and G_ClientAssignDefaultActorValues().

const char* edict_s::classname

client actions - interact with the world

Definition at line 706 of file g_local.h.

Referenced by G_ActorSetClientAction(), G_ClientAction(), G_ClientMove(), G_EventSetClientAction(), and Reset_DoorTrigger().

contents flags of the brush the actor is walking in

Definition at line 670 of file g_local.h.

Referenced by G_PhysicsStep().

general purpose 'amount' variable - set via mapeditor often

Definition at line 725 of file g_local.h.

Referenced by AI_CheckForMissionTargets(), G_MissionThink(), and SP_civilian_start().

damage done by entity

Definition at line 728 of file g_local.h.

Referenced by SP_trigger_hurt(), and Touch_HurtTrigger().

open or closed

Definition at line 746 of file g_local.h.

Referenced by AI_CheckUsingDoor(), Door_Use(), and SP_func_door().

this is used for e.g. misc_models with the solid flag set - this will hold a list of grid positions that are blocked by the aabb of the model

Definition at line 761 of file g_local.h.

Referenced by G_BuildForbiddenList(), and G_BuildForbiddenListForEntity().

amount of entries in the forbiddenListPos

Definition at line 763 of file g_local.h.

Referenced by G_BuildForbiddenList(), and G_BuildForbiddenListForEntity().

frame of the model to show

Definition at line 691 of file g_local.h.

Referenced by SP_misc_model().

this can be used to trigger a group of entities e.g. for two-part-doors - set the group to the same string for each door part and they will open both if you open one

Definition at line 693 of file g_local.h.

Referenced by G_FindEdictGroups().

flags will have FL_GROUPSLAVE set when the edict is part of a chain, but not the master - you can use the groupChain pointer to get all the edicts in the particular chain - and start out for the on that doesn't have the above mentioned flag set.

See also:
G_FindEdictGroups

Definition at line 755 of file g_local.h.

Referenced by AI_CheckForMissionTargets(), G_AddToWayPointList(), G_FindEdictGroups(), G_MissionThink(), and G_UseEdict().

first entry in the list

Definition at line 756 of file g_local.h.

Referenced by G_ClientAction(), G_FindEdictGroups(), and G_MissionThink().

Definition at line 690 of file g_local.h.

Referenced by AI_InitPlayer(), G_AppearPerishEvent(), and G_ClientAssignDefaultActorValues().

for ai actors - when they try to hide after the performed their action

Definition at line 731 of file g_local.h.

Referenced by AI_ActorThink(), and AI_CheckUsingDoor().

the actor is standing in a rescue zone if this is true - this means that when the mission is aborted the actor will not die

Definition at line 702 of file g_local.h.

Referenced by G_ActorIsInRescueZone(), and G_ActorSetInRescueZone().

const char* edict_s::item

the item id that must be placed to e.g. the func_mission to activate the use function

Definition at line 720 of file g_local.h.

Referenced by G_MissionThink(), and SP_misc_item().

count the amount of server side links - if a link was called, something on the position or the size of the entity was changed

Definition at line 638 of file g_local.h.

Referenced by SV_LinkEdict().

entity number in the map file

Definition at line 661 of file g_local.h.

Referenced by G_SpawnEntities(), SP_func_breakable(), SP_func_door(), and SP_func_rotating().

material value (e.g. for func_breakable)

Definition at line 724 of file g_local.h.

const char* edict_s::message

misc_message

Definition at line 722 of file g_local.h.

Referenced by SP_misc_message().

const char* edict_s::model

inline model (start with * and is followed by the model numberer) or misc_model model name (e.g. md2)

Definition at line 662 of file g_local.h.

Referenced by Door_Use(), G_GenerateEntList(), G_RecalcRouting(), G_TouchEdicts(), SP_func_breakable(), SP_func_door(), SP_func_rotating(), SP_misc_model(), SP_trigger_hurt(), SP_trigger_rescue(), and SP_trigger_touch().

inline model index

Definition at line 655 of file g_local.h.

Referenced by G_ClientSendEdictsAndBrushModels(), SV_ClipMoveToEntities(), SV_HullForEntity(), and SV_SetModel().

Definition at line 748 of file g_local.h.

Referenced by G_ClientMove(), and G_PhysicsStep().

const char* edict_s::noise

sounds - e.g. for func_door

Definition at line 723 of file g_local.h.

Referenced by Door_Use(), and SP_func_door().

e.g. the door model in case of func_door

Definition at line 654 of file g_local.h.

Referenced by G_TriggerSpawn(), SV_ClipMoveToEntities(), and Touch_DoorTrigger().

const char* edict_s::particle

Definition at line 721 of file g_local.h.

Referenced by G_MissionThink(), G_SendParticle(), and G_SpawnParticle().

delayed reaction fire the current moving actor - only set when this actor has reaction fire enabled

Definition at line 699 of file g_local.h.

Referenced by G_ReactionFireCheckExecution(), G_ReactionFireEndTurn(), G_ReactionFirePreShot(), G_ReactionFireReset(), G_ReactionFireSearchTarget(), and G_ReactionFireTryToShoot().

time that an opponent has left until the attacker can react

Definition at line 700 of file g_local.h.

Referenced by G_ReactionFireCheckExecution(), G_ReactionFireReset(), G_ReactionFireSearchTarget(), and G_ReactionFireTryToShoot().

void(* edict_s::reset)(edict_t *self, edict_t *activator)

reset function that is called before the touch triggers are called

Referenced by G_ResetTriggers(), SP_func_door(), and SP_trigger_rescue().

Definition at line 651 of file g_local.h.

Referenced by SV_LinkEdict().

type of sounds to play - e.g. doors

Definition at line 727 of file g_local.h.

speed of entities - e.g. rotating or actors

Definition at line 717 of file g_local.h.

Referenced by G_ClientMove(), G_ClientSendEdictsAndBrushModels(), and SP_func_rotating().

The stun damage received in a mission.

See also:
g_combat.c:G_Damage
Todo:

How is this handled after mission-end?

How is this checked to determine the stun-state? (I've found HP<=STUN in g_combat.c:G_Damage)

Definition at line 677 of file g_local.h.

Referenced by AI_SetStats(), G_ActorCheckRevitalise(), G_Damage(), G_EventActorStats(), G_SendCharacterData(), G_SendStats(), G_UpdateStunState(), SP_2x2_start(), SP_alien_start(), SP_civilian_start(), SP_human_start(), SP_player_start(), and Touch_HurtTrigger().

const char* edict_s::target

name of the entity to trigger or move towards - this name is stored in the target edicts targetname value

Definition at line 718 of file g_local.h.

Referenced by SP_misc_mission(), and SP_trigger_touch().

const char* edict_s::targetname

name pointed to by target - see the target of the parent edict

Definition at line 719 of file g_local.h.

Referenced by G_FindTargetEntity().

void(* edict_s::think)(edict_t *self)

general purpose 'rounds' variable - set via mapeditor often

Definition at line 726 of file g_local.h.

Referenced by G_MissionThink(), and SP_misc_mission().

qboolean(* edict_s::touch)(edict_t *self, edict_t *activator)

function to call when triggered - this function should only return true when there is a client action associated with it

Referenced by G_TouchEdicts(), G_TouchSolids(), G_TouchTriggers(), SP_func_breakable(), SP_func_door(), SP_misc_mission(), SP_misc_mission_aliens(), SP_trigger_hurt(), SP_trigger_rescue(), and SP_trigger_touch().

qboolean(* edict_s::use)(edict_t *self, edict_t *activator)

general use function that is called when the triggered client action is executed or when the server has to 'use' the entity

Parameters:
activator Might be NULL if there is no activator

Referenced by G_MissionThink(), G_MissionUse(), G_UseEdict(), SP_func_door(), SP_misc_message(), and SP_misc_mission().


The documentation for this struct was generated from the following file:

Generated by  doxygen 1.6.2