|
UFO: Alien Invasion
|
A table with all the relations between all shooters and all their targets. More...

Public Member Functions | |
| void | init () |
| Initialize the reaction fire table for all entities. | |
| void | add (const Edict *shooter, const Edict *target, const int tusForShot) |
| Add a reaction fire target for the given shooter. | |
| void | remove (const Edict *shooter, const Edict *target) |
| Remove a reaction fire target for the given shooter. | |
| bool | hasExpired (const Edict *shooter, const Edict *target, const int tusTarget) |
| Check if the given shooter is ready to reaction fire at the given target. | |
| int | getTriggerTUs (const Edict *shooter, const Edict *target) |
| Check if the given shooter is ready to reaction fire at the given target. | |
| void | advance (const Edict *shooter, const int tusShot) |
| Increase the triggertime for the next RF shot for all targets of the shooter (after a reaction fire). | |
| void | reset () |
| Reset the target count in the reaction fire table for all entities. | |
| void | notifyClientMove (const Edict *target, int step, bool startMove) |
| void | notifyClientOnStep (const Edict *target, int step) |
| void | create (const Edict *shooter) |
| Create a table of reaction fire targets for the given edict. | |
| void | destroy (const Edict *shooter) |
| Destroys the table of reaction fire targets for the given edict. | |
| void | resetTargetList (const Edict *shooter) |
| void | notifyClientOnShot (const Edict *target, int step) |
| void | notifyClientRFAborted (const Edict *shooter, const Edict *target, int step) |
Private Member Functions | |
| ReactionFireTargetList * | find (const Edict *shooter) |
| Find the given edict's table of reaction fire targets. | |
Private Attributes | |
| ReactionFireTargetList | rfData [MAX_RF_DATA] |
A table with all the relations between all shooters and all their targets.
Definition at line 121 of file g_reaction.cpp.
Add a reaction fire target for the given shooter.
| [in] | shooter | The reaction firing actor |
| [in] | target | The potential reaction fire victim |
| [in] | tusForShot | The TUs needed for the shot |
Definition at line 293 of file g_reaction.cpp.
References Com_Printf(), ReactionFireTargetList::count, find(), G_EventReactionFireAddTarget(), G_IsAlien, G_IsCivilian, i, MAX_RF_TARGETS, Edict::moveinfo, Edict::number, moveinfo_t::steps, ReactionFireTarget::target, ReactionFireTargetList::targets, ReactionFireTarget::triggerTUs, and Edict::TU.
Increase the triggertime for the next RF shot for all targets of the shooter (after a reaction fire).
| [in] | shooter | The reaction firing actor |
| [in] | tusShot | The TUs the shooter will need for the next shot |
Definition at line 413 of file g_reaction.cpp.
References ReactionFireTargetList::count, find(), i, ReactionFireTargetList::targets, and ReactionFireTarget::triggerTUs.
Create a table of reaction fire targets for the given edict.
| [in] | shooter | The reaction firing actor |
Definition at line 253 of file g_reaction.cpp.
References data, find(), Edict::getIdNum(), gi, i, MAX_RF_DATA, RF_NO_ENTNUM, and rfData.
Destroys the table of reaction fire targets for the given edict.
| [in] | shooter | The reaction firing actor |
Definition at line 275 of file g_reaction.cpp.
References find(), gi, and ReactionFireTargetList::init().
|
private |
Find the given edict's table of reaction fire targets.
| [in] | shooter | The reaction firing actor |
Definition at line 237 of file g_reaction.cpp.
References ReactionFireTargetList::entnum, Edict::getIdNum(), i, MAX_RF_DATA, and rfData.
Referenced by add(), advance(), create(), destroy(), getTriggerTUs(), hasExpired(), notifyClientRFAborted(), remove(), and resetTargetList().
Check if the given shooter is ready to reaction fire at the given target.
| [in] | shooter | The reaction firing actor |
| [in] | target | The potential reaction fire victim |
Definition at line 364 of file g_reaction.cpp.
References ReactionFireTargetList::count, find(), i, ReactionFireTarget::target, ReactionFireTargetList::targets, and ReactionFireTarget::triggerTUs.
| bool ReactionFireTargets::hasExpired | ( | const Edict * | shooter, |
| const Edict * | target, | ||
| const int | tusTarget ) |
Check if the given shooter is ready to reaction fire at the given target.
| [in] | shooter | The reaction firing actor |
| [in] | target | The potential reaction fire victim |
| [in] | tusTarget | The TUs the target will need for the shot, 0 for just moving |
Definition at line 389 of file g_reaction.cpp.
References ReactionFireTargetList::count, find(), i, ReactionFireTarget::target, ReactionFireTargetList::targets, ReactionFireTarget::triggerTUs, and Edict::TU.
Initialize the reaction fire table for all entities.
Definition at line 149 of file g_reaction.cpp.
References i, MAX_RF_DATA, and rfData.
Definition at line 200 of file g_reaction.cpp.
References ReactionFireTargetList::count, ReactionFireTargetList::entnum, G_EdictsGetByNum(), G_EventReactionFireAddTarget(), G_EventReactionFireRemoveTarget(), i, MAX_RF_DATA, RF_NO_ENTNUM, rfData, ReactionFireTarget::target, ReactionFireTargetList::targets, ReactionFireTarget::triggerTUs, and Edict::TU.
Definition at line 183 of file g_reaction.cpp.
References ReactionFireTargetList::count, ReactionFireTargetList::entnum, G_EdictsGetByNum(), G_EventReactionFireTargetUpdate(), i, MAX_RF_DATA, MAX_ROUTE, RF_NO_ENTNUM, rfData, ReactionFireTarget::target, ReactionFireTargetList::targets, ReactionFireTarget::triggerTUs, and Edict::TU.
Definition at line 166 of file g_reaction.cpp.
References ReactionFireTargetList::count, ReactionFireTargetList::entnum, G_EdictsGetByNum(), G_EventReactionFireTargetUpdate(), i, MAX_RF_DATA, RF_NO_ENTNUM, rfData, ReactionFireTarget::target, ReactionFireTargetList::targets, ReactionFireTarget::triggerTUs, and Edict::TU.
| void ReactionFireTargets::notifyClientRFAborted | ( | const Edict * | shooter, |
| const Edict * | target, | ||
| int | step ) |
Definition at line 220 of file g_reaction.cpp.
References ReactionFireTargetList::count, find(), G_EventReactionFireAbortShot(), i, ReactionFireTarget::target, and ReactionFireTargetList::targets.
Remove a reaction fire target for the given shooter.
| [in] | shooter | The reaction firing actor |
| [in] | target | The potential reaction fire victim |
Definition at line 323 of file g_reaction.cpp.
References Com_Printf(), ReactionFireTargetList::count, find(), G_EventReactionFireRemoveTarget(), G_IsAlien, G_IsCivilian, i, Edict::moveinfo, Edict::number, moveinfo_t::steps, ReactionFireTarget::target, ReactionFireTargetList::targets, and ReactionFireTarget::triggerTUs.
Referenced by resetTargetList().
Reset the target count in the reaction fire table for all entities.
Definition at line 159 of file g_reaction.cpp.
References i, MAX_RF_DATA, and rfData.
Definition at line 349 of file g_reaction.cpp.
References ReactionFireTargetList::count, find(), i, remove(), ReactionFireTargetList::reset(), ReactionFireTarget::target, and ReactionFireTargetList::targets.
|
private |
Definition at line 140 of file g_reaction.cpp.
Referenced by create(), find(), init(), notifyClientMove(), notifyClientOnShot(), notifyClientOnStep(), and reset().