#include "g_local.h"
Go to the source code of this file.
Functions | |
static void | G_MoralePanic (edict_t *ent, qboolean sanity) |
static void | G_MoraleStopPanic (edict_t *ent) |
Stops the panic state of an actor. | |
static void | G_MoraleRage (edict_t *ent, qboolean sanity) |
static void | G_MoraleStopRage (edict_t *ent) |
Stops the rage state of an actor. | |
static qboolean | G_IsMoraleEnabled (void) |
Checks whether the morale handling is activated for this game. This is always the case in singleplayer matches, and might be disabled for multiplayer matches. | |
void | G_MoraleBehaviour (int team) |
Applies morale behaviour on actors. |
Definition in file g_morale.c.
static qboolean G_IsMoraleEnabled | ( | void | ) | [static] |
Checks whether the morale handling is activated for this game. This is always the case in singleplayer matches, and might be disabled for multiplayer matches.
true
if the morale is activated for this game. Definition at line 125 of file g_morale.c.
References cvar_s::integer, qfalse, qtrue, sv_enablemorale, and sv_maxclients.
Referenced by G_MoraleBehaviour().
void G_MoraleBehaviour | ( | int | team | ) |
Applies morale behaviour on actors.
Definition at line 144 of file g_morale.c.
References _, ABILITY_MIND, level_locals_t::activeTeam, edict_s::chr, ET_ACTOR, frand(), G_ActorSetMaxs(), G_ClientPrintf(), G_EdictsGetNextInUse(), G_IsDead, G_IsMoraleEnabled(), G_IsPaniced, G_IsRaged, G_MoralePanic(), G_MoraleRage(), G_MoraleStopPanic(), G_MoraleStopRage(), G_PLAYER_FROM_ENT, G_SendState(), G_SendStats(), G_SetShaken, G_SetState, G_VisToPM(), GET_MORALE, gi, cvar_s::integer, level, m_rage, m_sanity, mor_panic, mor_regeneration, mor_shaken, edict_s::morale, MORALE_RANDOM, character_s::name, PRINT_HUD, qfalse, qtrue, character_s::score, chrScoreGlobal_s::skills, STATE_REACTION_MANY, sv_maxclients, edict_s::team, TEAM_CIVILIAN, edict_s::type, cvar_s::value, and edict_s::visflags.
Referenced by G_ClientEndRound().
Definition at line 34 of file g_morale.c.
References _, AI_ActorThink(), edict_s::chr, game_import_t::csi, G_ActorInvMove(), G_ActorSetMaxs(), G_ActorSetTU(), G_CenterView(), G_ClientPrintf(), G_PLAYER_FROM_ENT, G_RemoveCrouched, G_SendState(), G_SetPanic, G_VisToPM(), gi, csi_s::idFloor, csi_s::idLeft, csi_s::idRight, INVDEF, LEFT, character_s::name, NONE, PRINT_HUD, qtrue, RIGHT, character_s::teamDef, edict_s::visflags, and teamDef_s::weapons.
Referenced by G_MoraleBehaviour(), G_MoraleStopPanic(), and G_MoraleStopRage().
Definition at line 88 of file g_morale.c.
References _, AI_ActorThink(), edict_s::chr, G_PLAYER_FROM_ENT, G_SendState(), G_SetInsane, G_SetRage, G_VisToPM(), gi, character_s::name, PRINT_HUD, and edict_s::visflags.
Referenced by G_MoraleBehaviour().
static void G_MoraleStopPanic | ( | edict_t * | ent | ) | [static] |
Stops the panic state of an actor.
Definition at line 74 of file g_morale.c.
References frand(), G_MoralePanic(), G_RemovePanic, m_panic_stop, mor_panic, edict_s::morale, qtrue, and cvar_s::value.
Referenced by G_MoraleBehaviour().
static void G_MoraleStopRage | ( | edict_t * | ent | ) | [static] |
Stops the rage state of an actor.
Definition at line 111 of file g_morale.c.
References frand(), G_MoralePanic(), G_RemoveInsane, G_SendState(), G_VisToPM(), m_rage_stop, mor_panic, edict_s::morale, qtrue, cvar_s::value, and edict_s::visflags.
Referenced by G_MoraleBehaviour().