29 #define G_IsState(ent, s) ((ent)->state & (s)) 30 #define G_IsStunned(ent) (G_IsState(ent, STATE_STUN) & ~STATE_DEAD) 31 #define G_IsPanicked(ent) G_IsState(ent, STATE_PANIC) 32 #define G_IsCrouched(ent) G_IsState(ent, STATE_CROUCHED) 34 #define G_IsDead(ent) G_IsState(ent, STATE_DEAD) 36 #define G_SetState(ent, s) (ent)->state |= (s) 37 #define G_SetStunned(ent) G_SetState((ent), STATE_STUN) 38 #define G_SetDead(ent) G_SetState((ent), STATE_DEAD) 39 #define G_SetCrouched(ent) G_SetState((ent), STATE_CROUCHED) 41 #define G_ToggleState(ent, s) (ent)->state ^= (s) 42 #define G_ToggleCrouched(ent) G_ToggleState(ent, STATE_CROUCHED) void G_ActorSetTU(Edict *ent, int tus)
bool G_IsLivingActor(const Edict *ent) __attribute__((nonnull))
Checks whether the given edict is a living actor.
void G_ActorCheckRevitalise(Actor *actor)
void G_ActorUseTU(Edict *ent, int tus)
bool G_ActorReload(Actor *actor, const invDef_t *invDef)
Reload weapon with actor.
int G_ActorGetModifiedTimeForFiredef(const Edict *ent, const fireDef_t *const fd, bool reaction)
inventory definition for our menus
void G_ActorGiveTimeUnits(Actor *actor)
Set time units for the given edict. Based on speed skills.
void G_ActorReserveTUs(Edict *ent, int resReaction, int resShot, int resCrouch)
Reserves TUs for different actor actions.
int G_ActorGetTUForReactionFire(const Edict *ent)
Calculates the amount of TUs that are needed for the current selected reaction fire mode...
void G_ActorModifyCounters(const Edict *attacker, const Edict *victim, int deltaAlive, int deltaKills, int deltaStuns)
void G_ActorUseDoor(Actor *actor, Edict *door)
Make the actor use (as in open/close) a door edict.
int G_ActorUsableTUs(const Edict *ent)
Calculates the amount of usable TUs. This is without the reserved TUs.
item instance data, with linked list capability
int G_ActorCalculateMaxTU(const Edict *ent)
Local definitions for game module.
bool G_ActorInvMove(Actor *actor, const invDef_t *from, Item *fItem, const invDef_t *to, int tx, int ty, bool checkaction)
Moves an item inside an inventory. Floors are handled special.
this is a fire definition for our weapons/ammo
void G_ActorGetEyeVector(const Edict *actor, vec3_t eye)
Fills a vector with the eye position of a given actor.
void G_ActorSetClientAction(Edict *actor, Edict *ent)
Handles the client actions (interaction with the world)
void G_ActorSetMaxs(Actor *actor)
Sets correct bounding box for actor (state dependent).
bool G_ActorDieOrStun(Actor *actor, Edict *attacker)
Reports and handles death or stun of an actor. If the HP of an actor is zero the actor will die...
int G_ActorGetContentFlags(const vec3_t origin)
Get the content flags from where the actor is currently standing.
int G_ActorDoTurn(Edict *ent, byte dir)
Turns an actor around.