162 Actor* actor =
nullptr;
199 if (newMorale > maxMorale)
200 actor->
morale = maxMorale;
202 actor->
morale = newMorale;
void G_EventCenterView(const Edict &ent)
Centers the view for all clients that are seeing the given edict on the world position of the edict...
void G_MoraleBehaviour(int team)
Applies morale behaviour on actors.
#define MORALE_RANDOM(mod)
void G_PrintStats(const char *format,...)
Prints stats to game console and stats log file.
const teamDef_t * teamDef
Artificial Intelligence functions.
Misc utility functions for game module.
void G_ClientStateChange(const Player &player, Actor *actor, int reqState, bool checkaction)
Changes the state of a player/soldier.
static bool G_IsMoraleEnabled(int team)
Checks whether the morale handling is activated for this game. This is always the case in singleplaye...
static void G_MoraleStopRage(Actor *actor)
Stops the rage state of an actor.
void G_ActorSetMaxs(Actor *actor)
Sets correct bounding box for actor (state dependent).
Player & getPlayer() const
Item * getRightHandItem() const
void G_EventSendState(playermask_t playerMask, const Edict &ent)
bool CHRSH_IsTeamDefRobot(const teamDef_t *const td)
Check if a team definition is a robot.
static void G_MoraleRage(Actor *actor)
playermask_t G_VisToPM(teammask_t teamMask)
Converts vis mask to player mask.
#define INVDEF(containerID)
cvar_t * mor_regeneration
bool G_ActorInvMove(Actor *actor, const invDef_t *fromContType, Item *fItem, const invDef_t *toContType, int tx, int ty, bool checkaction)
Moves an item inside an inventory. Floors are handled special.
#define G_IsSinglePlayer()
Actor * G_EdictsGetNextLivingActorOfTeam(Actor *lastEnt, const int team)
Iterate through the living actor entities of the given team.
float frand(void)
Return random values between 0 and 1.
Local definitions for game module.
static void G_MoraleStopPanic(Actor *actor)
Stops the panic state of an actor.
void G_ActorSetTU(Edict *ent, int tus)
functions to handle the storage and lifecycle of all edicts in the game module.
static void G_MoralePanic(Actor *actor)
void AI_ActorRun(Player &player, Actor *actor)
void G_SendStats(Edict &ent)
Send stats to network buffer.
Item * getLeftHandItem() const
int skills[SKILL_NUM_TYPES]
Interface for g_client.cpp.