UFO: Alien Invasion
|
#include "g_local.h"
#include "g_actor.h"
#include "g_ai.h"
#include "g_client.h"
#include "g_edicts.h"
#include "g_utils.h"
Go to the source code of this file.
Functions | |
static void | G_MoralePanic (Actor *actor) |
static void | G_MoraleStopPanic (Actor *actor) |
Stops the panic state of an actor. More... | |
static void | G_MoraleRage (Actor *actor) |
static void | G_MoraleStopRage (Actor *actor) |
Stops the rage state of an actor. More... | |
static bool | G_IsMoraleEnabled (int team) |
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. More... | |
void | G_MoraleBehaviour (int team) |
Applies morale behaviour on actors. More... | |
|
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 136 of file g_morale.cpp.
References G_IsSinglePlayer, cvar_s::integer, sv_enablemorale, and TEAM_CIVILIAN.
Referenced by G_MoraleBehaviour().
Applies morale behaviour on actors.
Definition at line 156 of file g_morale.cpp.
References ABILITY_MIND, Edict::chr, CHRSH_IsTeamDefRobot(), ET_ACTOR, frand(), G_ActorSetMaxs(), G_ClientStateChange(), G_EdictsGetNextLivingActorOfTeam(), G_EventSendState(), G_IsMoraleEnabled(), G_MoralePanic(), G_MoraleRage(), G_MoraleStopPanic(), G_MoraleStopRage(), G_PrintStats(), G_SendStats(), G_VisToPM(), GET_MORALE, Edict::getIdNum(), Edict::getPlayer(), cvar_s::integer, Actor::isPanicked(), Actor::isRaged(), m_rage, m_sanity, mor_panic, mor_regeneration, mor_shaken, Edict::morale, MORALE_RANDOM, character_s::name, character_s::score, Actor::setInsane(), Actor::setShaken(), chrScoreGlobal_s::skills, STATE_REACTION, character_s::teamDef, Edict::type, cvar_s::value, and Edict::visflags.
Referenced by G_ClientEndRound().
Definition at line 38 of file g_morale.cpp.
References AI_ActorRun(), Edict::chr, CID_FLOOR, CID_LEFT, CID_RIGHT, G_ActorInvMove(), G_ActorSetMaxs(), G_ActorSetTU(), G_ClientStateChange(), G_EventCenterView(), G_EventSendState(), G_PrintStats(), G_VisToPM(), Edict::getIdNum(), Edict::getLeftHandItem(), Edict::getPlayer(), Edict::getRightHandItem(), INVDEF, Actor::isInsane(), character_s::name, NONE, Actor::removeCrouched(), Actor::setPanicked(), STATE_REACTION, character_s::teamDef, Edict::visflags, and teamDef_s::weapons.
Referenced by G_MoraleBehaviour(), G_MoraleStopPanic(), and G_MoraleStopRage().
Definition at line 96 of file g_morale.cpp.
References AI_ActorRun(), Edict::chr, G_ClientStateChange(), G_EventSendState(), G_PrintStats(), G_VisToPM(), Edict::getIdNum(), Edict::getPlayer(), Actor::isInsane(), character_s::name, Actor::setRaged(), STATE_REACTION, and Edict::visflags.
Referenced by G_MoraleBehaviour().
Stops the panic state of an actor.
Definition at line 78 of file g_morale.cpp.
References Edict::chr, frand(), G_EventSendState(), G_MoralePanic(), G_PrintStats(), G_VisToPM(), Edict::getIdNum(), m_panic_stop, mor_panic, Edict::morale, character_s::name, Actor::removeInsane(), Actor::removePanicked(), cvar_s::value, and Edict::visflags.
Referenced by G_MoraleBehaviour().
Stops the rage state of an actor.
Definition at line 118 of file g_morale.cpp.
References Edict::chr, frand(), G_EventSendState(), G_MoralePanic(), G_PrintStats(), G_VisToPM(), Edict::getIdNum(), m_rage_stop, mor_panic, Edict::morale, character_s::name, Actor::removeInsane(), Actor::removeRaged(), cvar_s::value, and Edict::visflags.
Referenced by G_MoraleBehaviour().