Example #1
0
/**
 * @brief Called when 'target' moves, possibly triggering or resolving reaction fire
 * @param[in] target The target entity
 * @return true If any shots were (or would be) taken
 * @sa G_ClientMove
 */
bool G_ReactionFireOnMovement (Edict *target)
{
#if DEBUG_RF
	G_ReactionFirePrintSituation (target);
#endif
	/* Check to see whether this resolves any reaction fire */
	const bool fired = G_ReactionFireCheckExecution(target);

	/* Check to see whether this triggers any reaction fire */
	G_ReactionFireTargetsUpdateAll(target);

	return fired;
}
Example #2
0
/**
 * @brief Called when 'target' moves, possibly triggering or resolving reaction fire
 * @param[in] target The target entity
 * @param[in] step The number of the step in the move we are checking reactions for
 * @return true If any shots were (or would be) taken
 * @sa G_ClientMove
 */
bool G_ReactionFireOnMovement (Actor* target, int step)
{
#if DEBUG_RF
	G_ReactionFirePrintSituation(target);
#endif
	rf.notifyClientOnStep(target, step);

	/* Check to see whether this resolves any reaction fire */
	const bool fired = rf.checkExecution(target, step);

	/* Check to see whether this triggers any reaction fire */
	rf.updateAllTargets(target);

	return fired;
}