cl_localentity.h File Reference

#include "../renderer/r_entity.h"
Include dependency graph for cl_localentity.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  le_s
 a local entity More...
struct  localModel_s
 local models More...

Defines

#define MAX_LE_PATHLENGTH   32
#define IS_MODE_FIRE_RIGHT(x)   ((x) == M_FIRE_R || (x) == M_PEND_FIRE_R)
#define IS_MODE_FIRE_LEFT(x)   ((x) == M_FIRE_L || (x) == M_PEND_FIRE_L)
#define IS_MODE_FIRE_HEADGEAR(x)   ((x) == M_FIRE_HEADGEAR)
#define IS_MODE_FIRE_PENDING(x)   ((x) == M_PEND_FIRE_L || (x) == M_PEND_FIRE_R)
#define MAX_LOCALMODELS   512
#define LE_IsStunned(le)   (((le)->state & STATE_STUN) & ~STATE_DEAD)
#define LE_IsDead(le)   ((le)->state & STATE_DEAD)
#define LE_IsPaniced(le)   ((le)->state & STATE_PANIC)
#define LE_IsCrouched(le)   ((le)->state & STATE_CROUCHED)
#define LE_IsItem(le)   ((le)->type == ET_ITEM)
#define LE_IsCivilian(le)   ((le)->team == TEAM_CIVILIAN)
#define LE_IsAlien(le)   ((le)->team == TEAM_ALIEN)
#define LE_IsPhalanx(le)   ((le)->team == TEAM_PHALANX)
#define LE_GetAnimationIndexForDeath(le)   ((le)->state & MAX_DEATH)
 Valid indices from 1 - MAX_DEATH.
#define LE_NotFoundError(entnum)   _LE_NotFoundError(entnum, __FILE__, __LINE__)

Typedefs

typedef struct le_s le_t
 a local entity
typedef struct localModel_s localModel_t
 local models

Enumerations

enum  actorModes_t {
  M_MOVE, M_FIRE_R, M_FIRE_L, M_FIRE_HEADGEAR,
  M_PEND_MOVE, M_PEND_FIRE_R, M_PEND_FIRE_L
}
 

Actor actions.

More...

Functions

const char * LE_GetAnim (const char *anim, int right, int left, int state)
 Get the correct animation for the given actor state and weapons.
void LE_AddProjectile (const fireDef_t *fd, int flags, const vec3_t muzzle, const vec3_t impact, int normal, le_t *leVictim)
void LE_AddGrenade (const fireDef_t *fd, int flags, const vec3_t muzzle, const vec3_t v0, int dt, le_t *leVictim)
void LE_AddAmbientSound (const char *sound, const vec3_t origin, int levelflags, float volume, float attenuation)
 Adds ambient sounds from misc_sound entities.
int LE_ActorGetStepTime (const le_t *le, const pos3_t pos, const pos3_t oldPos, const int dir, const int sped)
void LE_SetThink (le_t *le, void(*think)(le_t *le))
void LE_ExecuteThink (le_t *le)
 Call think function for the given local entity if its still in use.
void LE_Think (void)
 Calls the le think function and updates the animation. The animation updated even if the particular local entity is invisible for the client. This ensures, that an animation is always lerped correctly and won't magically start again once the local entity gets visible again.
void LET_StartIdle (le_t *le)
 Change the animation of an actor to the idle animation (which can be panic, dead or stand).
void LET_Appear (le_t *le)
void LET_StartPathMove (le_t *le)
 Change the actors animation to walking.
void LET_BrushModel (le_t *le)
void LE_DoEndPathMove (le_t *le)
 Ends the move of an actor.
void LM_Think (void)
void LMT_Init (localModel_t *localModel)
localModel_tLM_AddModel (const char *model, const vec3_t origin, const vec3_t angles, int entnum, int levelflags, int flags, const vec3_t scale)
 Prepares local (not known or handled by the server) models to the map, which will be added later in LM_AddToScene().
void LM_Perish (struct dbuffer *msg)
void LM_AddToScene (void)
 Add the local models to the scene.
qboolean LE_BrushModelAction (le_t *le, entity_t *ent)
 Add function for brush models.
void CL_RecalcRouting (const le_t *le)
void CL_CompleteRecalcRouting (void)
qboolean LE_IsLivingAndVisibleActor (const le_t *le)
 Checks whether the given le is a living and visible actor.
qboolean LE_IsLivingActor (const le_t *le)
 Checks whether the given le is a living actor (but might be hidden).
qboolean LE_IsActor (const le_t *le)
 Checks whether the given le is a living actor.
le_tLE_Add (int entnum)
 Add a new local entity to the scene.
le_tLE_Get (int entnum)
 Searches all local entities for the one with the searched entnum.
le_tLE_GetNextInUse (le_t *lastLE)
 Iterate through the entities that are in use.
le_tLE_GetNext (le_t *lastLE)
 Iterate through the list of entities.
void LE_Lock (le_t *le)
 Markes a le_t struct as locked. Should be called at the beginning of an event handler on this le_t, and paired with a LE_Unlock at the end.
void LE_Unlock (le_t *le)
 Unlocks a previously locked le_t struct.
qboolean LE_IsLocked (int entnum)
 Checks if a given le_t structure is locked, i.e., used by another event at this time.
void _LE_NotFoundError (int entnum, const char *file, const int line) __attribute__((noreturn))
le_tLE_Find (int type, const pos3_t pos)
 Searches a local entity on a given grid field.
le_tLE_FindRadius (le_t *from, const vec3_t org, float rad, entity_type_t type)
 Returns entities that have origins within a spherical area.
le_tLE_GetFromPos (const pos3_t pos)
 Searches a local entity on a given grid field.
void LE_PlaceItem (le_t *le)
void LE_Cleanup (void)
 Cleanup unused LE inventories that the server sent to the client also free some unused LE memory.
void LE_AddToScene (void)
void LE_CenterView (const le_t *le)
 Center the camera on the local entity's origin.
trace_t CL_Trace (const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, const le_t *passle, le_t *passle2, int contentmask, int worldLevel)
 Moves the given mins/maxs volume through the world from start to end.
void LM_Register (void)
 Register misc_models.
localModel_tLM_GetByID (const char *id)

Variables

static const vec3_t player_mins = { -PLAYER_WIDTH, -PLAYER_WIDTH, PLAYER_MIN }
static const vec3_t player_maxs = { PLAYER_WIDTH, PLAYER_WIDTH, PLAYER_STAND }
static const vec3_t player_dead_maxs = { PLAYER_WIDTH, PLAYER_WIDTH, PLAYER_DEAD }
cvar_tcl_le_debug
cvar_tcl_leshowinvis

Detailed Description

Definition in file cl_localentity.h.


Define Documentation

#define IS_MODE_FIRE_HEADGEAR (  )     ((x) == M_FIRE_HEADGEAR)
#define IS_MODE_FIRE_LEFT (  )     ((x) == M_FIRE_L || (x) == M_PEND_FIRE_L)
#define IS_MODE_FIRE_PENDING (  )     ((x) == M_PEND_FIRE_L || (x) == M_PEND_FIRE_R)

Definition at line 46 of file cl_localentity.h.

Referenced by CL_GetHitProbability().

#define IS_MODE_FIRE_RIGHT (  )     ((x) == M_FIRE_R || (x) == M_PEND_FIRE_R)

Definition at line 43 of file cl_localentity.h.

Referenced by CL_ActorFireModeActivated(), and CL_ActorShoot().

#define LE_GetAnimationIndexForDeath ( le   )     ((le)->state & MAX_DEATH)

Valid indices from 1 - MAX_DEATH.

Definition at line 200 of file cl_localentity.h.

Referenced by CL_ActorDie(), and LET_StartIdle().

#define LE_IsAlien ( le   )     ((le)->team == TEAM_ALIEN)

Definition at line 196 of file cl_localentity.h.

Referenced by AL_CollectingAliens(), and CL_AddTargetingBox().

#define LE_IsCivilian ( le   )     ((le)->team == TEAM_CIVILIAN)
#define LE_IsCrouched ( le   )     ((le)->state & STATE_CROUCHED)
#define LE_IsDead ( le   )     ((le)->state & STATE_DEAD)
#define LE_IsItem ( le   )     ((le)->type == ET_ITEM)

Definition at line 194 of file cl_localentity.h.

Referenced by AII_CollectingItems(), CL_InvAdd(), CL_InvDel(), LE_Cleanup(), and LE_PlaceItem().

#define LE_IsPaniced ( le   )     ((le)->state & STATE_PANIC)

Definition at line 191 of file cl_localentity.h.

Referenced by HUD_UpdateActor(), and LET_StartIdle().

#define LE_IsPhalanx ( le   )     ((le)->team == TEAM_PHALANX)

Definition at line 197 of file cl_localentity.h.

#define LE_IsStunned ( le   )     (((le)->state & STATE_STUN) & ~STATE_DEAD)
#define LE_NotFoundError ( entnum   )     _LE_NotFoundError(entnum, __FILE__, __LINE__)
#define MAX_LE_PATHLENGTH   32

Definition at line 30 of file cl_localentity.h.

Referenced by CL_ActorDoMove().

#define MAX_LOCALMODELS   512

Definition at line 144 of file cl_localentity.h.

Referenced by LM_AddModel().


Typedef Documentation

typedef struct le_s le_t

a local entity

typedef struct localModel_s localModel_t

local models


Enumeration Type Documentation

Actor actions.

Enumerator:
M_MOVE 

We are currently in move-mode (destination selection).

M_FIRE_R 

We are currently in fire-mode for the right weapon (target selection).

M_FIRE_L 

We are currently in fire-mode for the left weapon (target selection).

M_FIRE_HEADGEAR 

We'll fire headgear item shortly.

M_PEND_MOVE 

A move target has been selected, we are waiting for player-confirmation.

M_PEND_FIRE_R 

A fire target (right weapon) has been selected, we are waiting for player-confirmation.

M_PEND_FIRE_L 

A fire target (left weapon) has been selected, we are waiting for player-confirmation.

Definition at line 33 of file cl_localentity.h.


Function Documentation

void _LE_NotFoundError ( int  entnum,
const char *  file,
const int  line 
)

Definition at line 1035 of file cl_localentity.c.

References Cmd_ExecuteString(), Com_Error(), and ERR_DROP.

void CL_CompleteRecalcRouting ( void   ) 
void CL_RecalcRouting ( const le_t le  ) 
See also:
CL_Explode
Parameters:
[in] le A local entity of a brush model (func_breakable, func_door, ...)

Definition at line 78 of file cl_localentity.c.

References cl, CL_ActorConditionalMoveCalc(), Grid_RecalcRouting(), le_s::inlineModelName, LE_GenerateInlineModelList(), le_s::model1, and selActor.

Referenced by CL_AddBrushModel(), CL_DoorClose(), CL_DoorOpen(), and CL_Explode().

trace_t CL_Trace ( const vec3_t  start,
const vec3_t  end,
const vec3_t  mins,
const vec3_t  maxs,
const le_t passle,
le_t passle2,
int  contentmask,
int  worldLevel 
)

Moves the given mins/maxs volume through the world from start to end.

Note:
Passedict and edicts owned by passedict are explicitly not checked.
See also:
CL_TraceBounds
CL_ClipMoveToLEs
SV_Trace
Parameters:
[in] start Start vector to start the trace from
[in] end End vector to stop the trace at
[in] mins Bounding box used for tracing
[in] maxs Bounding box used for tracing
[in] passle Ignore this local entity in the trace (might be NULL)
[in] passle2 Ignore this local entity in the trace (might be NULL)
[in] contentmask Searched content the trace should watch for
[in] worldLevel The worldlevel (0-7) to calculate the levelmask for the trace from

Definition at line 1537 of file cl_localentity.c.

References moveclip_t::boxmaxs, moveclip_t::boxmins, cl, CL_ClipMoveToLEs(), CL_TraceBounds(), CM_CompleteBoxTrace(), moveclip_t::contentmask, moveclip_t::end, trace_s::fraction, trace_s::le, moveclip_t::maxs, moveclip_t::mins, moveclip_t::passle, moveclip_t::passle2, moveclip_t::start, and moveclip_t::trace.

Referenced by CL_ActorVis(), CL_ParticleRun2(), CL_TargetingGrenade(), CL_TargetingStraight(), and LE_PlayFootStepSound().

int LE_ActorGetStepTime ( const le_t le,
const pos3_t  pos,
const pos3_t  oldPos,
const int  dir,
const int  speed 
)

sqrt(2) for diagonal movement

Definition at line 508 of file cl_localentity.c.

References BASE_DIRECTIONS, cl, CORE_DIRECTIONS, dest, DIRECTION_FALL, le_s::fieldSize, Grid_PosToVec(), and UNIT_SIZE.

Referenced by CL_ActorDoMoveTime(), CL_GetEventTime(), and LE_DoPathMove().

le_t* LE_Add ( int  entnum  ) 

Add a new local entity to the scene.

Parameters:
[in] entnum The entity number (server side)
See also:
LE_Get

Definition at line 1005 of file cl_localentity.c.

References ACTOR_SIZE_NORMAL, cl, Com_Error(), le_s::entnum, ERR_DROP, le_s::fieldSize, le_s::inuse, LE_GetNext(), MAX_EDICTS, and qtrue.

Referenced by CL_ActorAdd(), CL_ActorAppear(), CL_AddBrushModel(), CL_AddEdict(), CL_EntAppear(), LE_AddAmbientSound(), LE_AddGrenade(), and LE_AddProjectile().

void LE_AddAmbientSound ( const char *  sound,
const vec3_t  origin,
int  levelflags,
float  volume,
float  attenuation 
)
void LE_AddGrenade ( const fireDef_t fd,
int  flags,
const vec3_t  muzzle,
const vec3_t  v0,
int  dt,
le_t leVictim 
)
Parameters:
[in] fd The grenade fire definition
[in] flags bitmask: SF_BODY, SF_IMPACT, SF_BOUNCING, SF_BOUNCED
[in] muzzle starting/location vector
[in] v0 velocity vector
[in] dt delta seconds

Definition at line 863 of file cl_localentity.c.

References ptl_s::angles, fireDef_s::bounce, fireDef_s::bounceSound, cl, cl_leshowinvis, CL_ParticleSpawn(), crand(), le_s::dir, le_s::endTime, le_s::fd, GRAVITY, fireDef_s::hitBody, fireDef_s::hitBodySound, fireDef_s::impact, fireDef_s::impactSound, cvar_s::integer, le_s::inuse, le_s::invis, LE_Add(), LE_ExecuteThink(), LE_SetThink(), LET_Projectile(), ptl_s::omega, fireDef_s::projectile, le_s::ptl, qfalse, le_s::ref1, le_s::ref2, le_s::ref3, SF_BODY, SF_BOUNCING, SF_IMPACT, fireDef_s::splrad, and VectorSet.

Referenced by CL_ActorDoThrow().

void LE_AddProjectile ( const fireDef_t fd,
int  flags,
const vec3_t  muzzle,
const vec3_t  impact,
int  normal,
le_t leVictim 
)
void LE_AddToScene ( void   ) 
qboolean LE_BrushModelAction ( le_t le,
entity_t ent 
)

Add function for brush models.

See also:
LE_AddToScene

Definition at line 912 of file cl_localentity.c.

References le_s::angles, ET_BREAKABLE, ET_DOOR, ET_ROTATING, le_s::maxs, le_s::mins, le_s::origin, qtrue, R_EntityGetOrigin(), le_s::type, and VectorCopy.

Referenced by CL_AddBrushModel().

void LE_CenterView ( const le_t le  ) 

Center the camera on the local entity's origin.

Parameters:
le The local entity which origin is used to center the camera
See also:
CL_CenterView
CL_ViewCenterAtGridPosition
CL_CameraRoute

Definition at line 1048 of file cl_localentity.c.

References cl, cl_centerview, Cvar_SetValue(), cvar_s::integer, le_s::origin, le_s::pos, and VectorCopy.

Referenced by CL_ActorAppear(), and CL_ActorSelectList().

void LE_Cleanup ( void   ) 

Cleanup unused LE inventories that the server sent to the client also free some unused LE memory.

Definition at line 1334 of file cl_localentity.c.

References cl, CL_ActorCleanup(), cls, Com_DPrintf(), csi, DEBUG_CLIENT, inventoryInterface_s::EmptyContainer, le_s::i, client_static_s::i, i, csi_s::idFloor, le_s::inuse, INVDEF, LE_IsActor(), LE_IsItem, and qfalse.

Referenced by CL_ClearState().

void LE_DoEndPathMove ( le_t le  ) 
void LE_ExecuteThink ( le_t le  ) 

Call think function for the given local entity if its still in use.

Definition at line 305 of file cl_localentity.c.

References Com_DPrintf(), DEBUG_EVENTSYS, le_s::entnum, le_s::inuse, and le_s::think.

Referenced by LE_AddGrenade(), LE_AddProjectile(), LE_DoEndPathMove(), LE_Think(), and LET_StartPathMove().

le_t* LE_Find ( int  type,
const pos3_t  pos 
)

Searches a local entity on a given grid field.

Parameters:
[in] type Entity type
[in] pos The grid pos to search for an item of the given type

Definition at line 1218 of file cl_localentity.c.

References LE_GetNextInUse(), le_s::pos, le_s::type, and VectorCompare.

Referenced by CL_ActorRevitalised(), and LE_DoEndPathMove().

le_t* LE_FindRadius ( le_t from,
const vec3_t  org,
float  rad,
entity_type_t  type 
)

Returns entities that have origins within a spherical area.

Parameters:
[in] from The entity to start the search from. NULL will start from the beginning.
[in] org The origin that is the center of the circle.
[in] rad radius to search an edict in.
[in] type Type of local entity. ET_NULL to ignore the type.

Definition at line 1194 of file cl_localentity.c.

References ET_NULL, LE_GetNextInUse(), le_s::maxs, le_s::mins, le_s::origin, le_s::type, and VectorLength().

le_t* LE_Get ( int  entnum  ) 
const char* LE_GetAnim ( const char *  anim,
int  right,
int  left,
int  state 
)

Get the correct animation for the given actor state and weapons.

Parameters:
[in] anim Type of animation (for example "stand", "walk")
[in] right ods index to determine the weapon in the actors right hand
[in] left ods index to determine the weapon in the actors left hand
[in] state the actors state - e.g. STATE_CROUCHED (crounched animations) have a 'c' in front of their animation definitions (see *.anm files for characters)

Definition at line 364 of file cl_localentity.c.

References objDef_s::animationIndex, Com_sprintf(), INVSH_GetItemByIDX(), NONE, Q_strncpyz(), qfalse, qtrue, STATE_CROUCHED, objDef_s::type, and type.

Referenced by CL_ActorDoShoot(), CL_ActorStartShoot(), LET_StartIdle(), and LET_StartPathMove().

le_t* LE_GetFromPos ( const pos3_t  pos  ) 

Searches a local entity on a given grid field.

Parameters:
[in] pos The grid pos to search for an item of the given type

Definition at line 1130 of file cl_localentity.c.

References LE_GetNextInUse(), le_s::pos, and VectorCompare.

Referenced by CL_GetHitProbability().

le_t* LE_GetNext ( le_t lastLE  ) 

Iterate through the list of entities.

Parameters:
lastLE The entity found in the previous iteration; if NULL, we start at the beginning

Definition at line 1147 of file cl_localentity.c.

References cl.

Referenced by LE_Add(), LE_GetNextInUse(), and LE_Think().

le_t* LE_GetNextInUse ( le_t lastLE  ) 

Iterate through the entities that are in use.

Note:
we can hopefully get rid of this function once we know when it makes sense to iterate through entities that are NOT in use
Parameters:
lastLE The entity found in the previous iteration; if NULL, we start at the beginning

Definition at line 1176 of file cl_localentity.c.

References le_s::inuse, and LE_GetNext().

Referenced by AII_CollectingItems(), AL_CollectingAliens(), CL_ActorConfirmAction_f(), CL_ActorSearchAtGridPos(), CL_BuildForbiddenList(), CL_ClipMoveToLEs(), CL_EntPerish(), CL_ViewLoadMedia(), LE_Find(), LE_FindRadius(), LE_GenerateInlineModelList(), LE_Get(), LE_GetFromPos(), LE_PlaceItem(), S_Frame(), and UI_RadarNodeDraw().

qboolean LE_IsActor ( const le_t le  ) 

Checks whether the given le is a living actor.

Parameters:
[in] le The local entity to perform the check for
See also:
G_IsLivingActor

Definition at line 181 of file cl_localentity.c.

References ET_ACTOR, ET_ACTOR2x2, ET_ACTORHIDDEN, and le_s::type.

Referenced by AII_CollectingItems(), AL_CollectingAliens(), CL_ActorDoMove(), CL_ActorDoShoot(), CL_ActorDoTurn(), CL_ActorInvMove(), CL_ActorStateChange(), LE_Cleanup(), and LE_IsLivingActor().

qboolean LE_IsLivingActor ( const le_t le  ) 

Checks whether the given le is a living actor (but might be hidden).

Parameters:
[in] le The local entity to perform the check for
See also:
G_IsLivingActor
LE_IsActor

Definition at line 193 of file cl_localentity.c.

References LE_IsActor(), LE_IsDead, and LE_IsStunned.

Referenced by CL_ActorAppear(), CL_ActorConfirmAction_f(), CL_ActorDie(), CL_ActorRevitalised(), CL_ActorStartShoot(), CL_ActorStateChange(), and LE_IsLivingAndVisibleActor().

qboolean LE_IsLivingAndVisibleActor ( const le_t le  ) 

Checks whether the given le is a living and visible actor.

Parameters:
[in] le The local entity to perform the check for
See also:
G_IsLivingActor
LE_IsActor

Definition at line 205 of file cl_localentity.c.

References ET_ACTORHIDDEN, le_s::invis, LE_IsLivingActor(), qfalse, and le_s::type.

Referenced by CL_ActorSearchAtGridPos(), CL_BuildForbiddenList(), CL_EntPerish(), CL_NextAlien_f(), CL_NextAlienVisibleFromActor_f(), and LE_PlaySoundFileAndParticleForSurface().

qboolean LE_IsLocked ( int  entnum  ) 

Checks if a given le_t structure is locked, i.e., used by another event at this time.

Parameters:
entnum the entnum of the le_t struct involved.
Returns:
true if the le_t is locked (used by another event), false if it's not or if it doesn't exist.

Definition at line 1086 of file cl_localentity.c.

References LE_Get(), and le_s::locked.

Referenced by CL_CheckDefault().

void LE_Lock ( le_t le  ) 

Markes a le_t struct as locked. Should be called at the beginning of an event handler on this le_t, and paired with a LE_Unlock at the end.

Parameters:
le The struct to be locked.
Note:
Always make sure you call LE_Unlock at the end of the event (might be in a different function), to allow other events on this le_t.

Definition at line 1099 of file cl_localentity.c.

References Com_Error(), le_s::entnum, ERR_DROP, le_s::locked, and qtrue.

Referenced by CL_ActorAppear(), CL_ActorDie(), CL_ActorDoMove(), and CL_ActorRevitalised().

void LE_PlaceItem ( le_t le  ) 
void LE_SetThink ( le_t le,
void(*)(le_t *le)  think 
)
void LE_Think ( void   ) 

Calls the le think function and updates the animation. The animation updated even if the particular local entity is invisible for the client. This ensures, that an animation is always lerped correctly and won't magically start again once the local entity gets visible again.

See also:
LET_StartIdle
LET_PathMove
LET_StartPathMove
LET_Projectile

Definition at line 323 of file cl_localentity.c.

References le_s::as, ca_active, cls, client_static_s::frametime, LE_ExecuteThink(), LE_GetNext(), le_s::model1, R_AnimRun(), and client_static_s::state.

Referenced by CL_Frame().

void LE_Unlock ( le_t le  ) 

Unlocks a previously locked le_t struct.

Parameters:
le The le_t to unlock.
Note:
Make sure that this is always paired with the corresponding LE_Lock around the conceptual beginning and ending of a le_t event. Should never be called by the handler(s) of a different event than the one that locked le. The owner of the lock is currently not checked.
Todo:
If the event loop ever becomes multithreaded, this should be a real mutex lock.

Definition at line 1118 of file cl_localentity.c.

References Com_Error(), le_s::entnum, ERR_DROP, le_s::locked, and qfalse.

Referenced by CL_ActorAppear(), CL_ActorDie(), CL_ActorRevitalised(), and LE_DoEndPathMove().

void LET_Appear ( le_t le  ) 
void LET_BrushModel ( le_t le  ) 
void LET_StartIdle ( le_t le  ) 

Change the animation of an actor to the idle animation (which can be panic, dead or stand).

Note:
We have more than one animation for dead - the index is given by the state of the local entity
Think function
See the *.anm files in the models dir

Definition at line 423 of file cl_localentity.c.

References le_s::as, ET_ACTORHIDDEN, LE_GetAnim(), LE_GetAnimationIndexForDeath, LE_IsDead, LE_IsPaniced, LE_SetThink(), le_s::left, le_s::model1, le_s::pathLength, le_s::pathPos, R_AnimChange(), le_s::right, le_s::state, le_s::type, and va().

Referenced by CL_ActorAppear(), CL_ActorRevitalised(), CL_ActorStateChange(), CL_InvAdd(), CL_InvDel(), and LE_DoEndPathMove().

void LET_StartPathMove ( le_t le  ) 

Change the actors animation to walking.

Note:
Think function
See the *.anm files in the models dir

Definition at line 653 of file cl_localentity.c.

References le_s::as, animState_s::change, Com_Printf(), le_s::entnum, LE_ExecuteThink(), LE_GetAnim(), LE_SetThink(), le_s::left, LET_PathMove(), le_s::model1, le_s::pnum, R_AnimChange(), le_s::right, le_s::state, and le_s::team.

Referenced by CL_ActorDoMove().

localModel_t* LM_AddModel ( const char *  model,
const vec3_t  origin,
const vec3_t  angles,
int  entnum,
int  levelflags,
int  renderFlags,
const vec3_t  scale 
)

Prepares local (not known or handled by the server) models to the map, which will be added later in LM_AddToScene().

Parameters:
[in] model The model name.
[in] origin Origin of the model (position on map).
[in] angles Angles of the model (how it should be rotated after adding to map).
[in] scale Scaling of the model (how it should be scaled after adding to map).
[in] entnum Entity number.
[in] levelflags The levels in which the entity resides/is visible.
[in] renderFlags The flags for the renderer, eg. 'translucent'.
Note:
misc_model
See also:
CL_SpawnParseEntitystring
LM_AddToScene

Definition at line 273 of file cl_localentity.c.

References localModel_s::angles, cl, Com_Error(), localModel_s::entnum, ERR_DROP, localModel_s::inuse, localModel_s::levelflags, LM_Find(), MAX_LOCALMODELS, localModel_s::name, localModel_s::origin, Q_strncpyz(), qtrue, localModel_s::renderFlags, localModel_s::scale, and VectorCopy.

Referenced by SP_misc_model().

void LM_AddToScene ( void   ) 

Add the local models to the scene.

See also:
CL_ViewRender
LE_AddToScene
LM_AddModel

Definition at line 156 of file cl_localentity.c.

References LM_AddToSceneOrder(), qfalse, and qtrue.

Referenced by CL_ViewRender().

localModel_t* LM_GetByID ( const char *  id  ) 

Definition at line 246 of file cl_localentity.c.

References cl, and i.

Referenced by LMT_Init(), and SP_misc_model().

void LM_Perish ( struct dbuffer msg  ) 
void LM_Register ( void   ) 
void LM_Think ( void   ) 

Definition at line 337 of file cl_localentity.c.

References cl, i, and localModel_s::think.

Referenced by CL_SpawnParseEntitystring().

void LMT_Init ( localModel_t localModel  ) 

Variable Documentation

Definition at line 38 of file cl_localentity.c.

Referenced by CL_InitLocal().

const vec3_t player_dead_maxs = { PLAYER_WIDTH, PLAYER_WIDTH, PLAYER_DEAD } [static]

Definition at line 177 of file cl_localentity.h.

Referenced by CL_ActorAppear(), CL_ActorDie(), and CL_ActorStateChange().

const vec3_t player_maxs = { PLAYER_WIDTH, PLAYER_WIDTH, PLAYER_STAND } [static]

Definition at line 176 of file cl_localentity.h.

Referenced by CL_ActorAppear(), and CL_ActorRevitalised().

const vec3_t player_mins = { -PLAYER_WIDTH, -PLAYER_WIDTH, PLAYER_MIN } [static]

Definition at line 175 of file cl_localentity.h.

Referenced by CL_ActorAppear().


Generated by  doxygen 1.6.2