/** * @brief Stops the rage state of an actor * @note This is only called when cvar mor_panic is not zero * @sa G_MoralePanic * @sa G_MoraleRage * @sa G_MoraleStopPanic * @sa G_MoraleBehaviour */ static void G_MoraleStopRage (edict_t * ent) { if (ent->morale / mor_panic->value > m_rage_stop->value * frand()) { G_RemoveInsane(ent); G_EventSendState(G_VisToPM(ent->visflags), ent); } else G_MoralePanic(ent, qtrue); /* regains sanity */ }
/** * @brief Stops the rage state of an actor * @note This is only called when cvar mor_panic is not zero * @sa G_MoralePanic * @sa G_MoraleRage * @sa G_MoraleStopPanic * @sa G_MoraleBehaviour */ static void G_MoraleStopRage (Edict *ent) { if (ent->morale / mor_panic->value > m_rage_stop->value * frand()) { G_RemoveInsane(ent); G_EventSendState(G_VisToPM(ent->visflags), *ent); G_PrintStats("%s is no longer insane (entnum %i).", ent->chr.name, ent->number); } else { G_MoralePanic(ent, true); /* regains sanity */ } }
/** * @brief Stops the panic state of an actor * @note This is only called when cvar mor_panic is not zero * @sa G_MoralePanic * @sa G_MoraleRage * @sa G_MoraleStopRage * @sa G_MoraleBehaviour */ static void G_MoraleStopPanic (Edict* ent) { G_RemoveInsane(ent); if (ent->morale / mor_panic->value > m_panic_stop->value * frand()) { G_RemovePanic(ent); G_PrintStats("%s is no longer panicked (entnum %i).", ent->chr.name, ent->getIdNum()); G_EventSendState(G_VisToPM(ent->visflags), *ent); } else { G_MoralePanic(ent); } }