|
UFO: Alien Invasion
|
Reaction fire system. More...
#include "g_local.h"

Go to the source code of this file.
Functions | |
| void | G_ReactionFirePreShot (const Actor *target, const int fdTime) |
| Called when 'target' is about to shoot, this forces a 'draw' to decide who gets the first shot. | |
| void | G_ReactionFirePostShot (Actor *target) |
| Called after 'target' has fired, this might trigger more reaction fire or resolve outstanding reaction fire (because target is out of time). | |
| void | G_ReactionFireReset (int team) |
| Guess! Reset all "shaken" states on end of turn? | |
| void | G_ReactionFireNotifyClientStartMove (const Actor *target) |
| void | G_ReactionFireNotifyClientEndMove (const Actor *target) |
| void | G_ReactionFireSettingsUpdate (Actor *actor, fireDefIndex_t fmIdx, actorHands_t hand, const objDef_t *od) |
| Updates the reaction fire settings in case something was moved into a hand or from a hand that would make the current settings invalid. | |
| void | G_ReactionFireNotifyClientRFAborted (const Actor *shooter, const Edict *target, int step) |
| bool | G_ReactionFireSettingsReserveTUs (Actor *ent) |
| Set the reaction fire TU reservation for an actor. | |
| bool | G_ReactionFireOnMovement (Actor *target, int step) |
| Called when 'target' moves, possibly triggering or resolving reaction fire. | |
| void | G_ReactionFireOnEndTurn (void) |
| Called at the end of turn, all outstanding reaction fire is resolved. | |
| void | G_ReactionFireOnDead (const Actor *target) |
| Removes the given target from the reaction fire lists. | |
| void | G_ReactionFireTargetsInit (void) |
| free function to initialize the reaction fire table for all entities. | |
| void | G_ReactionFireTargetsCreate (const Edict *shooter) |
| free function to create a table of reaction fire targets for the given edict. | |
| void | G_ReactionFireTargetsDestroy (const Edict *shooter) |
| free function to destroy the table of reaction fire targets for the given edict. | |
Reaction fire system.
Definition in file g_reaction.h.
Definition at line 1081 of file g_reaction.cpp.
References Edict::moveinfo, rft, and moveinfo_t::steps.
Referenced by G_ClientMove().
Definition at line 1086 of file g_reaction.cpp.
References rft.
Referenced by ReactionFire::checkExecution(), and G_ReactionFirePreShot().
Definition at line 1075 of file g_reaction.cpp.
References MAX_ROUTE, and rft.
Referenced by G_ClientMove().
Removes the given target from the reaction fire lists.
| [in] | target | The target to remove from the lists |
Definition at line 1030 of file g_reaction.cpp.
Referenced by G_ActorDieOrStun().
Called at the end of turn, all outstanding reaction fire is resolved.
Definition at line 1054 of file g_reaction.cpp.
References rft.
Referenced by G_ClientEndRound().
Called when 'target' moves, possibly triggering or resolving reaction fire.
| [in] | target | The target entity |
| [in] | step | The number of the step in the move we are checking reactions for |
Definition at line 962 of file g_reaction.cpp.
References rf.
Referenced by G_ClientMove().
Called after 'target' has fired, this might trigger more reaction fire or resolve outstanding reaction fire (because target is out of time).
| [in] | target | The entity that has just fired |
Definition at line 1042 of file g_reaction.cpp.
References G_ReactionFireNotifyClientEndShot(), MAX_ROUTE, and rf.
Referenced by G_ClientShoot().
Called when 'target' is about to shoot, this forces a 'draw' to decide who gets the first shot.
| [in] | target | The entity about to shoot |
| [in] | fdTime | The TU of the shot |
Definition at line 994 of file g_reaction.cpp.
References G_EdictsGetNextLivingActor(), G_ReactionFireGetTUsForItem(), G_ReactionFireNotifyClientRFAborted(), G_ReactionFireNotifyClientStartShot(), MAX_ROUTE, rf, and rft.
Referenced by G_ClientShoot().
Guess! Reset all "shaken" states on end of turn?
| [in] | team | Index of team to loop through. |
Definition at line 1066 of file g_reaction.cpp.
References G_EdictsGetNextLivingActorOfTeam(), and Actor::removeShaken().
Referenced by G_ClientEndRound().
| bool G_ReactionFireSettingsReserveTUs | ( | Actor * | ent | ) |
Set the reaction fire TU reservation for an actor.
| [in,out] | ent | The actor edict to set the TUs for |
true if TUs for reaction fire were reserved, false if the reservation was set back to 0 Definition at line 665 of file g_reaction.cpp.
References Edict::chr, chrReservations_t::crouch, G_ActorGetTUForReactionFire(), G_ActorReserveTUs(), G_ReactionFireCanBeEnabled(), G_ReactionFireSettingsSetDefault(), character_t::reservedTus, and chrReservations_t::shot.
Referenced by G_ClientInitActorStates(), G_ClientStateChange(), and G_ReactionFireSettingsUpdate().
| void G_ReactionFireSettingsUpdate | ( | Actor * | actor, |
| fireDefIndex_t | fmIdx, | ||
| actorHands_t | hand, | ||
| const objDef_t * | od ) |
Updates the reaction fire settings in case something was moved into a hand or from a hand that would make the current settings invalid.
| [in,out] | actor | The actor edict to check the settings for |
| [in] | fmIdx | The fire mode index that should be used for reaction fire |
| [in] | hand | The hand that should be used for reaction fire |
| [in] | od | The object/weapon for the reaction fire |
Definition at line 555 of file g_reaction.cpp.
References Edict::chr, G_ActorHasWorkingFireModeSet(), G_ClientStateChange(), G_EventReactionFireChange(), G_EventSendState(), G_ReactionFireSettingsReserveTUs(), G_VisToPM(), Edict::getPlayer(), Actor::isReaction(), character_t::RFmode, FiremodeSettings::set(), STATE_REACTION, and Edict::visflags.
Referenced by AI_TryToReloadWeapon(), G_ActorInvMove(), G_ClientAction(), G_ClientInitActorStates(), and G_ClientShoot().
free function to create a table of reaction fire targets for the given edict.
| [in] | shooter | The reaction firing actor |
Definition at line 436 of file g_reaction.cpp.
References rft.
Referenced by G_ClientGetFreeSpawnPointForActorSize().
free function to destroy the table of reaction fire targets for the given edict.
| [in] | shooter | The reaction firing actor |
Definition at line 445 of file g_reaction.cpp.
References rft.
Referenced by G_ActorDieOrStun().
free function to initialize the reaction fire table for all entities.
Definition at line 427 of file g_reaction.cpp.
References rft.
Referenced by G_SpawnEntities().