g_morale.c File Reference

#include "g_local.h"
Include dependency graph for g_morale.c:

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.

Detailed Description

Definition in file g_morale.c.


Function Documentation

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.

Returns:
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  ) 
static void G_MoralePanic ( edict_t ent,
qboolean  sanity 
) [static]
static void G_MoraleRage ( edict_t ent,
qboolean  sanity 
) [static]
static void G_MoraleStopPanic ( edict_t ent  )  [static]

Stops the panic state of an actor.

Note:
This is only called when cvar mor_panic is not zero
See also:
G_MoralePanic
G_MoraleRage
G_MoraleStopRage
G_MoraleBehaviour

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.

Note:
This is only called when cvar mor_panic is not zero
See also:
G_MoralePanic
G_MoraleRage
G_MoraleStopPanic
G_MoraleBehaviour

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().


Generated by  doxygen 1.6.2