This part may not be changed because the engine assumes all fields to be of these types and in this order.
|
Name |
Type |
Notes |
|
s |
entity_state_t |
has several subtypes (see below) |
|
client |
struct gclient_s* |
points to the player controlling it, NULL if not player controlled |
|
inuse |
qboolean |
the entity exists in the world |
|
linkcount |
int |
changed by the gi.linkentity function ? |
|
area |
link_t |
used by engine. |
|
num_clusters |
int |
used by engine. |
|
clusternums[] |
int |
used by engine. |
|
headnode |
int |
used by engine. |
|
areanum, areanum2 |
int |
area where you currently are used when checking if monsters can hear sounds. Used by engine. |
|
svflags |
int |
SVF_NOCLIENT - don't send to clients |
|
mins, maxs |
vec3_t |
position of min and max points of entity relative to its origin |
|
absmin, absmax |
vec3_t |
position of min and max points of entity relative to the world's origin |
|
size |
vec3_t |
size of entity (vector from mins to maxs) |
|
solid |
solid_t |
solidity of entity : |
|
clipmask |
int |
type of objects the entity will not pass through can be any of MASK_* or CONTENTS_* listed at bottom of this document |
|
owner |
edict_t * |
usually the entity that spawned this entity (eg bullet is 'owned' by the monster that fired it) |
Here you can add new attributes necessary for your modifications of the game DLL. The engine won't mind. It will know the edict size by a reference in the game_export_t API. That is all it needs for proper allocation of new edicts.
|
Name |
Type |
Notes |
|
accel |
float |
acceleration of platforms |
|
activator |
edict_t * |
entity which activated the current entity |
|
air_finished |
float |
time when air will run out (when underwater) compare to level.time. Players can hold breath about 10 sec. |
|
angle |
float |
entity yaw set by level editor (-1 = up; -2 = down) |
|
attenuation |
float |
attenuation of above sound (set at level edit) |
|
avelocity |
vec3_t |
angular velocity (see note for velocity) |
|
chain |
editc_t * |
used when creating a list of entities |
|
classname |
char * |
type of entity (eg 'player','monster_soldier') |
|
combattarget |
char * |
name of entity to attack (used once) |
|
count |
int |
general purpose 'amount' variable, often set in level editor |
|
damage_debounce_time |
float |
time when lava/slime can do more damage to player |
|
deadflag |
int |
state of deadness : DEAD_NO, DEAD_DYING, DEAD_DEAD, DEAD_RESPAWNABLE |
|
deathtarget |
char * |
name of entity to use when current entity dies |
|
decel |
float |
deceleration of platforms |
|
delay |
float |
time between triggering switch and effect activating |
|
dmg |
int |
damage done by entity |
|
dmg_radius |
float |
area to do radius damage |
|
enemy |
edict_t * |
entity to attack |
|
flags |
int |
various attributes :
|
|
fly_sound_debounce_time |
float |
used with looping sound when pushing player (in_trigger.c) |
|
freetime |
float |
time when entity was freed-up in memory |
|
gib_health |
int |
health at which to gib :) |
|
goalentity |
edict_t * |
entity currently moving towards |
|
gravity |
float |
not used by any entites, but can be used to define reduced/ increased gravity for individual entities (normal=1.0) |
|
groundentity |
edict_t * |
what the entity is standing on |
|
groundentity_linkcount |
int |
used in conjunction with linkcount to see if the current entity is still standing on the groundentity |
|
health |
int |
health of entity, increased and set in many places, but should only be reduced by t_damage() |
|
ideal_yaw |
float |
yaw the entity wants to face |
|
item |
gitem_t * |
info about item (see below) |
|
killtarget |
char * |
name of entity to remove when current entity triggered |
|
last_move_time |
float |
time to play earthquake sound again |
|
light_level |
int |
player's light level, used by monsters when checking if player can be seen |
|
map |
char * |
filename of the next map, part of entity target_changelevel |
|
mass |
int |
used when pushing entites and calculating knock-back for weapons (eg rocket hits) |
|
max_health |
int |
maximum health |
|
message |
char * |
message when entity activated (set by level editor) |
|
model |
char * |
filename of entitie's model |
|
monsterinfo |
monsterinfo_t |
info about the monster (see below) |
|
move_angles |
vec3_t |
the angle that the gun turret is facing |
|
move_origin |
vec3_t |
the origin of the gun turret |
|
movedir |
vec3_t |
direction currently moving in |
|
moveinfo |
moveinfo_t |
used by the ships flying overhead |
|
movetarget |
edict_t * |
entity to wark towards when not got anything better to do(such as killing the player) |
|
movetype |
int |
how the entity moves :
|
|
mynoise,mynoise2 |
edict_t * |
spawned when player makes a noise, monsters can home in on them |
|
nextthink |
float |
time at which entity should call function 'ent->think' |
|
noise_index |
int |
index of sound to play when entity is triggered |
|
noise_index2 |
int |
not used anywhere |
|
oldenemy |
edict_t * |
player they were attacking before distracted (by another monster hitting them) |
|
pain_debounce_time |
float |
prevent pain sounds/anims playing to often |
|
pathtarget |
char * |
name of entity to move towards |
|
pos1 |
vec3_t |
top position of lift |
|
pos2 |
vec3_t |
bottom position of lift |
|
powerarmor_time |
float |
time to stop showing translucent shield effects |
|
radius_dmg |
int |
amount of radius damage done by entity |
|
random |
float |
used to add a bit of time variation to func_timers |
|
show_hostile |
qboolean |
any monsters seeing this one will inherit its enemy |
|
sounds |
int |
type of sounds to play - used by doors, lifts, etc |
|
spawnflags |
int |
set by level editor, some values are:
There are other possible settings, which I have not yet looked at in detail. |
|
speed |
float |
speed of misc entities, including moving buttons, the gun turret and the fly-by ships |
|
style |
int |
type of entities (eg type of health box) also used as areaportal number (something to do with separating areas) |
|
takedamgage |
int |
can the entity be damaged? :
|
|
target |
char * |
name of entity to trigger or move towards |
|
target_ent |
editc_t * |
entity that platform/lift is moving towards |
|
targetname |
char * |
name pointed to by target |
|
team |
char * |
name of team which entity is part of |
|
teamchain |
edict_t * |
the next entity in the team |
|
teammaster |
edict_t * |
the master entity in the team |
|
teleport_time |
float |
time when monster teleported into level |
|
timestamp |
float |
Used by various functions to mark the spawn time of an entity or the start of a change (eg a light ramp) Used in trail to figure out how hold footprints are. Used by Viper, earthquakes , hurt triggers, dead hovers for time to explode. |
|
touch_debounce_time |
float |
prevent touch function from being called again too quickly |
|
viewheight |
int |
height above origin where eyes are found |
|
velocity |
vec3_t |
current velocity. |
|
volume |
float |
volume when playing above sound (set at level edit) |
|
wait |
float |
time to wait before platform moves to the next point on its path |
|
waterlevel |
int |
height of liquid: |
|
watertype |
int |
type of water the entity is in (see the CONTENTS_* list at bottom of document) |
|
yaw_speed |
float |
speed to turn towards ideal yaw |
|
blocked |
void (*self, *other) |
function to call when movement is blocked by something? (optional) |
|
die |
void (*self, *inflicotr, *attacker, *damage, vec3_t point) |
function to call when health <= 0 (MUST be present if the entity can take damage) |
|
prethink |
void (*ent) |
function to call before each frame (optional) |
|
pain |
void (*self, *other, float kick, int damage) |
function to call when hurt (optional) |
|
think |
void (*ent) |
sets the function that should be called at time nextthink |
|
touch |
void (*self, *other, cplane_t *plane, csurface_t *surf) |
function to call when it touches another entity/the world (optional) |
|
use |
void (*self, *other, *activator) |
function to call when used (optional) |