UFO: Alien Invasion
|
Event related headers. More...
#include "g_vis.h"
Go to the source code of this file.
Macros | |
#define | PM_ALL 0xFFFFFFFF |
#define | G_PlayerToPM(player) ((player).getNum() < game.sv_maxplayersperteam ? 1 << ((player).getNum()) : 0) |
Typedefs | |
typedef unsigned int | playermask_t |
Functions | |
void | G_EventActorAdd (playermask_t playerMask, const Edict &ent, const bool instant=false) |
void | G_EventActorAppear (playermask_t playerMask, const Actor &check, const Edict *ent) |
void | G_EventActorDie (const Edict &ent, bool attacker) |
Announce the actor die event for the clients that are seeing the actor. More... | |
void | G_EventActorFall (const Edict &ent) |
void | G_EventActorRevitalise (const Edict &ent) |
Announce the actor revitalize event for the clients that are seeing the actor. More... | |
void | G_EventActorSendReservations (const Edict &ent) |
Will inform the player about the real TU reservation. More... | |
void | G_EventActorStateChange (playermask_t playerMask, const Edict &ent) |
void | G_EventActorStats (const Edict &ent, playermask_t playerMask) |
void | G_EventActorTurn (const Edict &ent) |
Send the turn event for the given entity. More... | |
void | G_EventAddBrushModel (playermask_t playerMask, const Edict &ent) |
void | G_EventCenterView (const Edict &ent) |
Centers the view for all clients that are seeing the given edict on the world position of the edict. More... | |
void | G_EventCenterViewAt (playermask_t playerMask, const pos3_t pos) |
Centers the view for all clients that are seeing the given edict on the world position of the edict. More... | |
void | G_EventMoveCameraTo (playermask_t playerMask, const pos3_t pos) |
Centers the view for all clients that are seeing the given edict on the world position of the edict. More... | |
void | G_EventDoorClose (const Edict &door) |
void | G_EventDoorOpen (const Edict &door) |
void | G_EventDestroyEdict (const Edict &ent) |
Unregister an edict at the client. More... | |
void | G_EventEdictAppear (playermask_t playerMask, const Edict &ent) |
Send an appear event to the client. More... | |
void | G_EventEdictPerish (playermask_t playerMask, const Edict &ent) |
Send disappear event. More... | |
void | G_EventCameraAppear (playermask_t playerMask, const Edict &ent) |
Send an appear event to the client. More... | |
void | G_EventEndRound (void) |
End of turn event for the current active team. More... | |
void | G_EventEndRoundAnnounce (const Player &player) |
void | G_EventInventoryAdd (const Edict &ent, playermask_t playerMask, int itemAmount) |
Tell the client to add the item from the container. More... | |
void | G_EventInventoryAmmo (const Edict &ent, const objDef_t *ammo, int amount, shoot_types_t shootType) |
Change the amount of available ammo for the given entity. More... | |
void | G_EventInventoryDelete (const Edict &ent, playermask_t playerMask, const containerIndex_t containerId, int x, int y) |
Tell the client to remove the item from the container. More... | |
void | G_EventInventoryReload (const Edict &ent, playermask_t playerMask, const Item *item, const invDef_t *invDef, const Item *ic) |
void | G_EventModelExplodeTriggered (const Edict &ent, const char *sound) |
void | G_EventModelExplode (const Edict &ent, const char *sound) |
void | G_EventParticleSpawn (playermask_t playerMask, const char *name, int levelFlags, const vec3_t s, const vec3_t v, const vec3_t a) |
Spawn a new particle for the client. More... | |
void | G_EventPerish (const Edict &ent) |
Send an event to all clients that are seeing the given edict, that it just has disappeared. More... | |
void | G_EventReactionFireChange (const Edict &ent) |
void | G_EventReset (const Player &player, int activeTeam) |
void | G_EventResetClientAction (const Edict &ent) |
Reset the client actions for the given entity. More... | |
void | G_EventSendEdict (const Edict &ent) |
Send the bounding box info to the client. More... | |
void | G_EventSendParticle (playermask_t playerMask, const Edict &ent) |
void | G_EventSendState (playermask_t playerMask, const Edict &ent) |
void | G_EventSetClientAction (const Edict &ent) |
Informs the client that an interaction with the world is possible. More... | |
void | G_EventShootHidden (teammask_t teamMask, const fireDef_t *fd, bool firstShoot, const vec3_t impact, int flags, const Edict *targetEdict) |
Start the shooting event for hidden actors. More... | |
void | G_EventShoot (const Edict &ent, teammask_t teamMask, const fireDef_t *fd, bool firstShoot, shoot_types_t shootType, int flags, const trace_t *trace, const vec3_t from, const vec3_t impact) |
Do the shooting. More... | |
void | G_EventSpawnSound (playermask_t playerMask, const Edict &ent, const vec3_t origin, const char *sound) |
Spawns a sound (that will be spatialized on the client side) More... | |
void | G_EventSpawnFootstepSound (const Edict &ent, const char *sound) |
void | G_EventStart (const Player &player, bool teamplay) |
void | G_EventStartShoot (const Edict &ent, teammask_t teamMask, shoot_types_t shootType, const pos3_t at) |
Start the shooting event. More... | |
void | G_EventEndShoot (const Edict &ent, teammask_t teamMask) |
Ends the shooting event. More... | |
void | G_EventThrow (teammask_t teamMask, const fireDef_t *fd, float dt, byte flags, const vec3_t position, const vec3_t velocity) |
void | G_EventAdd (playermask_t playerMask, int eType, int entnum) |
void | G_EventEnd (void) |
void | G_EventActorWound (const Edict &ent, const int bodyPart) |
Send info about an actor's wounds to the client. More... | |
void | G_EventReactionFireAddTarget (const Edict &shooter, const Edict &target, int tusG_EventReactionFireAddTarget, int step) |
void | G_EventReactionFireRemoveTarget (const Edict &shooter, const Edict &target, int step) |
void | G_EventReactionFireTargetUpdate (const Edict &shooter, const Edict &target, int tus, int step) |
void | G_EventReactionFireAbortShot (const Edict &shooter, const Edict &target, int step) |
Event related headers.
Definition in file g_events.h.
#define G_PlayerToPM | ( | player | ) | ((player).getNum() < game.sv_maxplayersperteam ? 1 << ((player).getNum()) : 0) |
Definition at line 37 of file g_events.h.
Referenced by G_CheckVisPlayer(), G_ClientConnect(), G_ClientSendEdictsAndBrushModels(), G_EventActorSendReservations(), G_EventActorWound(), G_EventReactionFireAbortShot(), G_EventReactionFireAddTarget(), G_EventReactionFireChange(), G_EventReactionFireRemoveTarget(), G_EventReactionFireTargetUpdate(), G_EventReset(), G_EventResetClientAction(), G_EventStart(), G_PMToVis(), G_SendInvisible(), G_SendPlayerStats(), G_TeamToPM(), G_VisToPM(), and Touch_HurtTrigger().
#define PM_ALL 0xFFFFFFFF |
Definition at line 36 of file g_events.h.
Referenced by AI_CheckRespawn(), G_EventActorFall(), G_EventDestroyEdict(), G_EventDoorClose(), G_EventDoorOpen(), G_EventEndRound(), G_EventEndRoundAnnounce(), G_EventModelExplode(), G_EventModelExplodeTriggered(), G_EventSendEdict(), G_MatchSendResults(), G_TraceDraw(), G_WriteStep(), and Think_NextMapTrigger().
typedef unsigned int playermask_t |
Definition at line 34 of file g_events.h.
void G_EventActorAdd | ( | playermask_t | playerMask, |
const Edict & | ent, | ||
const bool | instant | ||
) |
Definition at line 511 of file g_events.cpp.
References Edict::chr, EV_ACTOR_ADD, EVENT_INSTANTLY, Edict::fieldSize, G_EventAdd(), G_EventEnd(), character_s::gender, Edict::getIdNum(), Edict::getPlayerNum(), Edict::getTeam(), gi, teamDef_s::idx, NONE, Edict::pos, Edict::state, STATE_PUBLIC, and character_s::teamDef.
Referenced by AI_CheckRespawn(), G_DoTestVis(), and G_SendInvisible().
void G_EventActorAppear | ( | playermask_t | playerMask, |
const Actor & | check, | ||
const Edict * | ent | ||
) |
Definition at line 571 of file g_events.cpp.
References ABILITY_MIND, character_s::bodySkin, Edict::chr, Item::def(), Edict::dir, EV_ACTOR_APPEAR, Edict::fieldSize, G_ActorCalculateMaxTU(), G_EventActorStateChange(), G_EventAdd(), G_EventEnd(), G_SendInventory(), G_TeamToPM(), character_s::gender, GET_MORALE, Actor::getBody(), Actor::getHead(), Edict::getIdNum(), Edict::getLeftHandItem(), Edict::getPlayerNum(), Edict::getRightHandItem(), Edict::getTeam(), gi, character_s::headSkin, objDef_s::idx, teamDef_s::idx, MAX_SKILL, character_s::maxHP, NONE, Edict::pos, character_s::score, chrScoreGlobal_s::skills, SKIP_LOCAL_ENTITY, Edict::state, STATE_PUBLIC, character_s::teamDef, and character_s::ucn.
Referenced by G_AppearPerishEvent().
Announce the actor die event for the clients that are seeing the actor.
[in] | ent | The actor that is dying |
[in] | attacker | Whether the actor was killed or just died |
Definition at line 89 of file g_events.cpp.
References EV_ACTOR_DIE, G_EventAdd(), G_EventEnd(), G_VisToPM(), Edict::getIdNum(), Edict::getPlayerNum(), gi, Edict::state, and Edict::visflags.
Referenced by G_ActorDieOrStun().
Definition at line 345 of file g_events.cpp.
References DIRECTION_FALL, EV_ACTOR_MOVE, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, GRAVITY, makeDV, PM_ALL, and Edict::pos.
Referenced by G_ActorFall().
Announce the actor revitalize event for the clients that are seeing the actor.
[in] | ent | The actor that was healed and woke up again |
Definition at line 102 of file g_events.cpp.
References EV_ACTOR_REVITALISED, G_EventAdd(), G_EventEnd(), G_VisToPM(), Edict::getIdNum(), gi, Edict::state, and Edict::visflags.
Referenced by G_ActorCheckRevitalise().
Will inform the player about the real TU reservation.
ent | The actors edict. |
Definition at line 113 of file g_events.cpp.
References Edict::chr, EV_ACTOR_RESERVATIONCHANGE, G_EventAdd(), G_EventEnd(), G_PlayerToPM, Edict::getIdNum(), Edict::getPlayer(), gi, and character_s::reservedTus.
Referenced by G_ActorReserveTUs().
void G_EventActorStateChange | ( | playermask_t | playerMask, |
const Edict & | ent | ||
) |
Definition at line 632 of file g_events.cpp.
References EV_ACTOR_STATECHANGE, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, and Edict::state.
Referenced by G_ActorCheckRevitalise(), G_ActorDieOrStun(), G_EventActorAppear(), and G_EventSendState().
void G_EventActorStats | ( | const Edict & | ent, |
playermask_t | playerMask | ||
) |
Definition at line 383 of file g_events.cpp.
References EV_ACTOR_STATS, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), Edict::getStun(), gi, Edict::HP, Edict::morale, and Edict::TU.
Referenced by G_SendPlayerStats(), and G_SendStats().
Send the turn event for the given entity.
ent | The entity to send the turn event for |
Definition at line 77 of file g_events.cpp.
References Edict::dir, EV_ACTOR_TURN, G_EventAdd(), G_EventEnd(), G_VisToPM(), Edict::getIdNum(), gi, and Edict::visflags.
Referenced by G_ActorDoTurn(), G_ClientMove(), G_ClientShoot(), and G_ClientTurn().
Send info about an actor's wounds to the client.
[in] | ent | The actor whose wound status we are sending. |
[in] | bodyPart | The body part index we are sending wound info about. |
Definition at line 399 of file g_events.cpp.
References Edict::chr, EV_ACTOR_WOUND, G_EventAdd(), G_EventEnd(), G_PlayerToPM, Edict::getIdNum(), Edict::getPlayer(), gi, woundInfo_s::treatmentLevel, woundInfo_s::woundLevel, and character_s::wounds.
Referenced by G_SendWoundStats().
void G_EventAdd | ( | playermask_t | playerMask, |
int | eType, | ||
int | entnum | ||
) |
Definition at line 705 of file g_events.cpp.
References G_EventEnd(), and gi.
Referenced by G_EventActorAdd(), G_EventActorAppear(), G_EventActorDie(), G_EventActorFall(), G_EventActorRevitalise(), G_EventActorSendReservations(), G_EventActorStateChange(), G_EventActorStats(), G_EventActorTurn(), G_EventActorWound(), G_EventAddBrushModel(), G_EventCameraAppear(), G_EventCenterViewAt(), G_EventDestroyEdict(), G_EventDoorClose(), G_EventDoorOpen(), G_EventEdictAppear(), G_EventEdictPerish(), G_EventEndRound(), G_EventEndRoundAnnounce(), G_EventEndShoot(), G_EventInventoryAdd(), G_EventInventoryAmmo(), G_EventInventoryDelete(), G_EventInventoryReload(), G_EventModelExplode(), G_EventModelExplodeTriggered(), G_EventMoveCameraTo(), G_EventParticleSpawn(), G_EventReactionFireChange(), G_EventReset(), G_EventResetClientAction(), G_EventSendEdict(), G_EventSendParticle(), G_EventSendState(), G_EventSetClientAction(), G_EventShoot(), G_EventShootHidden(), G_EventSpawnSound(), G_EventStart(), G_EventStartShoot(), G_EventThrow(), G_MatchSendResults(), and G_WriteStep().
void G_EventAddBrushModel | ( | playermask_t | playerMask, |
const Edict & | ent | ||
) |
Definition at line 639 of file g_events.cpp.
References Edict::angle, Edict::angles, Edict::dir, EV_ADD_BRUSH_MODEL, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, Edict::modelindex, Edict::origin, Edict::spawnflags, Edict::speed, and Edict::type.
Referenced by G_AppearPerishEvent(), and G_ClientSendEdictsAndBrushModels().
void G_EventCameraAppear | ( | playermask_t | playerMask, |
const Edict & | ent | ||
) |
Send an appear event to the client.
playerMask | The players to send the event to |
ent | The camera that should appear to the players included in the given mask. |
Definition at line 543 of file g_events.cpp.
References Edict::camera, camera_edict_data_s::cameraType, Edict::dir, EV_CAMERA_APPEAR, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), Edict::getTeam(), gi, Edict::origin, camera_edict_data_s::rotate, and Edict::spawnflags.
Referenced by G_AppearPerishEvent().
Centers the view for all clients that are seeing the given edict on the world position of the edict.
[in] | ent | The edict to use the position from |
Definition at line 479 of file g_events.cpp.
References G_EventCenterViewAt(), G_VisToPM(), Edict::pos, and Edict::visflags.
Referenced by G_MoralePanic().
void G_EventCenterViewAt | ( | playermask_t | playerMask, |
const pos3_t | pos | ||
) |
Centers the view for all clients that are seeing the given edict on the world position of the edict.
playerMask | The clients that should see the edict |
pos | The position to center the view |
Definition at line 489 of file g_events.cpp.
References EV_CENTERVIEW, G_EventAdd(), G_EventEnd(), and gi.
Referenced by G_EventCenterView(), and Think_NextMapTrigger().
Unregister an edict at the client.
ent | The edict to unregister |
Definition at line 167 of file g_events.cpp.
References EV_ENT_DESTROY, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), Edict::inuse, and PM_ALL.
Referenced by G_FreeEdict().
Definition at line 683 of file g_events.cpp.
References EV_DOOR_CLOSE, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), and PM_ALL.
Referenced by Door_Use().
Definition at line 677 of file g_events.cpp.
References EV_DOOR_OPEN, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), and PM_ALL.
Referenced by Door_Use().
void G_EventEdictAppear | ( | playermask_t | playerMask, |
const Edict & | ent | ||
) |
Send an appear event to the client.
playerMask | The players to send the event to |
ent | The edict that should appear to the players included in the given mask. |
Definition at line 563 of file g_events.cpp.
References EV_ENT_APPEAR, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, Edict::pos, and Edict::type.
Referenced by G_AppearPerishEvent().
void G_EventEdictPerish | ( | playermask_t | playerMask, |
const Edict & | ent | ||
) |
Send disappear event.
[in] | playerMask | The bitmask to determine the clients this event is send to |
[in,out] | ent | The edict that perished |
Definition at line 624 of file g_events.cpp.
References EV_ENT_PERISH, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, Edict::inuse, and Edict::type.
Referenced by G_AppearPerishEvent(), G_EventPerish(), and Think_SmokeAndFire().
Definition at line 711 of file g_events.cpp.
References EV_ACTOR_MOVE, game_import_s::GetEventEdict(), gi, and Edict::pos.
Referenced by G_ActorFall(), G_ActorInvMove(), G_ClientBegin(), G_ClientEndRound(), G_ClientMove(), G_ClientShoot(), G_ClientStartMatch(), G_ClientStateChangeUpdate(), G_ClientTurn(), G_ClientUseEdict(), G_EventActorAdd(), G_EventActorAppear(), G_EventActorDie(), G_EventActorFall(), G_EventActorRevitalise(), G_EventActorSendReservations(), G_EventActorStateChange(), G_EventActorStats(), G_EventActorTurn(), G_EventActorWound(), G_EventAdd(), G_EventAddBrushModel(), G_EventCameraAppear(), G_EventCenterViewAt(), G_EventDestroyEdict(), G_EventDoorClose(), G_EventDoorOpen(), G_EventEdictAppear(), G_EventEdictPerish(), G_EventEndRound(), G_EventEndRoundAnnounce(), G_EventEndShoot(), G_EventInventoryAmmo(), G_EventInventoryDelete(), G_EventInventoryReload(), G_EventModelExplode(), G_EventModelExplodeTriggered(), G_EventMoveCameraTo(), G_EventParticleSpawn(), G_EventReactionFireChange(), G_EventReset(), G_EventResetClientAction(), G_EventSendEdict(), G_EventSendParticle(), G_EventSendState(), G_EventSetClientAction(), G_EventShoot(), G_EventShootHidden(), G_EventSpawnSound(), G_EventStart(), G_EventStartShoot(), G_EventThrow(), G_MatchSendResults(), and G_SendInventory().
End of turn event for the current active team.
Definition at line 414 of file g_events.cpp.
References level_locals_s::activeTeam, EV_ENDROUND, G_EventAdd(), G_EventEnd(), gi, level, and PM_ALL.
Referenced by G_ClientEndRound().
void G_EventEndRoundAnnounce | ( | const Player & | player | ) |
Definition at line 654 of file g_events.cpp.
References EV_ENDROUNDANNOUNCE, G_EventAdd(), G_EventEnd(), gi, and PM_ALL.
Referenced by G_ClientEndRound().
void G_EventEndShoot | ( | const Edict & | ent, |
teammask_t | teamMask | ||
) |
Ends the shooting event.
ent | The entity that starts the shooting |
teamMask | the vis mask of the teams to determine the clients from this event is send to |
Definition at line 217 of file g_events.cpp.
References EV_ACTOR_END_SHOOT, G_EventAdd(), G_EventEnd(), G_VisToPM(), and Edict::getIdNum().
Referenced by G_ClientShoot().
void G_EventInventoryAdd | ( | const Edict & | ent, |
playermask_t | playerMask, | ||
int | itemAmount | ||
) |
Tell the client to add the item from the container.
[in] | ent | Pointer to entity having given inventory. |
[in] | playerMask | The player mask to determine which clients should receive the event (e.g. G_VisToPM (ent->visflags)) |
[in] | itemAmount | How many items to add. |
G_WriteItem
call Definition at line 147 of file g_events.cpp.
References EV_INV_ADD, G_EventAdd(), Edict::getIdNum(), and gi.
Referenced by G_ActorInvMove(), and G_SendInventory().
void G_EventInventoryAmmo | ( | const Edict & | ent, |
const objDef_t * | ammo, | ||
int | amount, | ||
shoot_types_t | shootType | ||
) |
Change the amount of available ammo for the given entity.
ent | The entity to change the amount of ammo for |
ammo | The ammo to change |
amount | The new amount of the left ammo |
shootType | The shooting type to determine which container to use |
Definition at line 181 of file g_events.cpp.
References CID_LEFT, CID_RIGHT, EV_INV_AMMO, G_EventAdd(), G_EventEnd(), G_VisToPM(), Edict::getIdNum(), gi, objDef_s::idx, IS_SHOT_RIGHT, and Edict::visflags.
Referenced by G_ClientShoot().
void G_EventInventoryDelete | ( | const Edict & | ent, |
playermask_t | playerMask, | ||
const containerIndex_t | containerId, | ||
int | x, | ||
int | y | ||
) |
Tell the client to remove the item from the container.
[in] | ent | Pointer to entity having given inventory. |
[in] | playerMask | The player mask to determine which clients should receive the event (e.g. G_VisToPM (ent->visflags)) |
[in] | containerId | Id of the container the item is in. |
[in] | x,y | Position of item in container. |
Definition at line 131 of file g_events.cpp.
References EV_INV_DEL, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), and gi.
Referenced by G_ActorInvMove(), G_ClientShoot(), G_InventoryRemoveItemByID(), and G_InventoryToFloor().
void G_EventInventoryReload | ( | const Edict & | ent, |
playermask_t | playerMask, | ||
const Item * | item, | ||
const invDef_t * | invDef, | ||
const Item * | ic | ||
) |
Definition at line 421 of file g_events.cpp.
References objDef_s::ammo, Item::ammoDef(), Item::def(), EV_INV_RELOAD, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), Item::getX(), Item::getY(), gi, invDef_s::id, and objDef_s::idx.
Referenced by G_ActorInvMove().
Definition at line 697 of file g_events.cpp.
References EV_MODEL_EXPLODE, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, Edict::inuse, and PM_ALL.
Referenced by Destroy_Breakable().
Definition at line 689 of file g_events.cpp.
References EV_MODEL_EXPLODE_TRIGGERED, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, Edict::inuse, and PM_ALL.
Referenced by Destroy_Breakable().
void G_EventMoveCameraTo | ( | playermask_t | playerMask, |
const pos3_t | pos | ||
) |
Centers the view for all clients that are seeing the given edict on the world position of the edict.
[in] | playerMask | The clients that should see the edict |
[in] | pos | The position to center the view |
Definition at line 501 of file g_events.cpp.
References EV_MOVECAMERA, G_EventAdd(), G_EventEnd(), and gi.
Referenced by G_ClientMove().
void G_EventParticleSpawn | ( | playermask_t | playerMask, |
const char * | name, | ||
int | levelFlags, | ||
const vec3_t | s, | ||
const vec3_t | v, | ||
const vec3_t | a | ||
) |
Spawn a new particle for the client.
[in] | playerMask | A bit mask. One bit for each affected player |
[in] | name | The id of the particle (see ptl_*.ufo script files in base/ufos) |
[in] | levelFlags | Show at which levels |
[in] | s | starting/location vector |
[in] | v | velocity vector |
[in] | a | acceleration vector |
Definition at line 334 of file g_events.cpp.
References EV_PARTICLE_SPAWN, G_EventAdd(), G_EventEnd(), and gi.
Referenced by G_TraceDraw().
Send an event to all clients that are seeing the given edict, that it just has disappeared.
ent | The edict that disappeared |
Definition at line 158 of file g_events.cpp.
References G_EventEdictPerish(), G_VisToPM(), and Edict::visflags.
Referenced by G_ActorInvMove(), G_InventoryToFloor(), G_MissionThink(), and G_SpawnItemOnFloor().
Definition at line 318 of file g_events.cpp.
References EV_ACTOR_REACTIONFIREABORTSHOT, G_PlayerToPM, Edict::getIdNum(), Edict::getPlayer(), and gi.
Referenced by ReactionFireTargets::notifyClientRFAborted().
void G_EventReactionFireAddTarget | ( | const Edict & | shooter, |
const Edict & | target, | ||
int | tusG_EventReactionFireAddTarget, | ||
int | step | ||
) |
Definition at line 295 of file g_events.cpp.
References EV_ACTOR_REACTIONFIREADDTARGET, G_PlayerToPM, Edict::getIdNum(), Edict::getPlayer(), and gi.
Referenced by ReactionFireTargets::add(), and ReactionFireTargets::notifyClientMove().
Definition at line 282 of file g_events.cpp.
References Edict::chr, EV_ACTOR_REACTIONFIRECHANGE, G_EventAdd(), G_EventEnd(), G_PlayerToPM, FiremodeSettings::getFmIdx(), FiremodeSettings::getHand(), Edict::getIdNum(), Edict::getPlayer(), FiremodeSettings::getWeapon(), gi, objDef_s::idx, NONE, and character_s::RFmode.
Referenced by G_ClientStateChange(), G_ReactionFireSettingsSetDefault(), and G_ReactionFireSettingsUpdate().
Definition at line 303 of file g_events.cpp.
References EV_ACTOR_REACTIONFIREREMOVETARGET, G_PlayerToPM, Edict::getIdNum(), Edict::getPlayer(), and gi.
Referenced by ReactionFireTargets::notifyClientMove(), and ReactionFireTargets::remove().
void G_EventReactionFireTargetUpdate | ( | const Edict & | shooter, |
const Edict & | target, | ||
int | tus, | ||
int | step | ||
) |
Definition at line 310 of file g_events.cpp.
References EV_ACTOR_REACTIONFIRETARGETUPDATE, G_PlayerToPM, Edict::getIdNum(), Edict::getPlayer(), and gi.
Referenced by ReactionFireTargets::notifyClientOnShot(), and ReactionFireTargets::notifyClientOnStep().
Definition at line 669 of file g_events.cpp.
References EV_RESET, EVENT_INSTANTLY, G_EventAdd(), G_EventEnd(), G_PlayerToPM, and gi.
Referenced by G_ClientStartMatch().
Reset the client actions for the given entity.
[in] | ent | The entity to reset the client action for |
Definition at line 376 of file g_events.cpp.
References EV_RESET_CLIENT_ACTION, G_EventAdd(), G_EventEnd(), G_PlayerToPM, Edict::getIdNum(), and Edict::getPlayer().
Referenced by G_ActorSetClientAction().
Send the bounding box info to the client.
[in] | ent | The edict to send the bounding box for |
Definition at line 457 of file g_events.cpp.
References Edict::absBox, EV_ADD_EDICT, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, AABB::maxs, AABB::mins, PM_ALL, and Edict::type.
Referenced by G_SendBoundingBoxes().
void G_EventSendParticle | ( | playermask_t | playerMask, |
const Edict & | ent | ||
) |
Send a particle spawn event to the client
[in] | playerMask | The clients that should see the particle |
[in] | ent | The particle to spawn |
Definition at line 529 of file g_events.cpp.
References EV_PARTICLE_APPEAR, G_EventAdd(), G_EventEnd(), Edict::getIdNum(), gi, Edict::origin, Edict::particle, and Edict::spawnflags.
Referenced by G_AppearPerishEvent().
void G_EventSendState | ( | playermask_t | playerMask, |
const Edict & | ent | ||
) |
Definition at line 466 of file g_events.cpp.
References EV_ACTOR_STATECHANGE, G_EventActorStateChange(), G_EventAdd(), G_EventEnd(), G_TeamToPM(), Edict::getIdNum(), Edict::getTeam(), gi, Edict::state, and STATE_PUBLIC.
Referenced by G_ClientStateChangeUpdate(), G_Damage(), G_MoraleBehaviour(), G_MoralePanic(), G_MoraleRage(), G_MoraleStopPanic(), G_MoraleStopRage(), and G_ReactionFireSettingsUpdate().
Informs the client that an interaction with the world is possible.
[in] | ent | The edict that can execute the action (an actor) |
Definition at line 360 of file g_events.cpp.
References Edict::clientAction, EV_CLIENT_ACTION, FL_CLIENTACTION, Edict::flags, G_EventAdd(), G_EventEnd(), G_TeamToPM(), Edict::getIdNum(), Edict::getTeam(), and gi.
Referenced by G_ActorSetClientAction().
void G_EventShoot | ( | const Edict & | ent, |
teammask_t | teamMask, | ||
const fireDef_t * | fd, | ||
bool | firstShoot, | ||
shoot_types_t | shootType, | ||
int | flags, | ||
const trace_t * | trace, | ||
const vec3_t | from, | ||
const vec3_t | impact | ||
) |
Do the shooting.
ent | The entity that is doing the shooting |
teamMask | the vis mask to determine the clients from this event is send to |
fd | The firedefinition to use for the shoot |
firstShoot | Is this the first shoot |
shootType | The type of the shoot |
flags | Define some flags in a bitmask: SF_BODY , SF_IMPACT , SF_BOUNCING and SF_BOUNCED |
trace | The trace what was used to determine whether this shot has hit something |
from | The position the entity shoots from |
impact | The impact world vector for the shot |
Definition at line 260 of file g_events.cpp.
References trace_s::contentFlags, trace_s::entNum, EV_ACTOR_SHOOT, fireDef_s::fdIdx, G_EdictsGetByNum(), G_EventAdd(), G_EventEnd(), G_IsBreakable, G_VisToPM(), Edict::getIdNum(), gi, objDef_s::idx, fireDef_s::obj, trace_s::plane, SKIP_LOCAL_ENTITY, and fireDef_s::weapFdsIdx.
Referenced by G_ShootSingle().
void G_EventShootHidden | ( | teammask_t | teamMask, |
const fireDef_t * | fd, | ||
bool | firstShoot, | ||
const vec3_t | impact, | ||
int | flags, | ||
const Edict * | targetEdict | ||
) |
Start the shooting event for hidden actors.
teamMask | the vis mask to determine the clients from this event is send to |
fd | The firedefinition to use for the shoot |
firstShoot | Is this the first shoot |
impact | Impact position |
flags | Impact (sound) flags |
targetEdict | Target of the shot |
Definition at line 232 of file g_events.cpp.
References EV_ACTOR_SHOOT_HIDDEN, fireDef_s::fdIdx, G_EventAdd(), G_EventEnd(), G_IsBreakable, G_VisToPM(), Edict::getIdNum(), gi, objDef_s::idx, fireDef_s::obj, SKIP_LOCAL_ENTITY, and fireDef_s::weapFdsIdx.
Referenced by G_ClientShoot(), G_ShootGrenade(), and G_ShootSingle().
Definition at line 62 of file g_events.cpp.
References EV_SOUND, G_VisToPM(), Edict::getIdNum(), gi, Edict::moveinfo, Edict::origin, moveinfo_s::steps, and Edict::visflags.
Referenced by G_SendFootstepSound().
void G_EventSpawnSound | ( | playermask_t | playerMask, |
const Edict & | ent, | ||
const vec3_t | origin, | ||
const char * | sound | ||
) |
Spawns a sound (that will be spatialized on the client side)
playerMask | A bit mask. One bit for each affected player |
ent | The edict that is causing the sound |
origin | The origin of the sound |
sound | The sound file, path relative to sounds/. If there is a + at the end the client will choose a random sound. See the event function for more information. of the path, a random sound will be taken. |
Definition at line 40 of file g_events.cpp.
References Edict::entBox, EV_SOUND, G_EventAdd(), G_EventEnd(), AABB::getCenter(), Edict::getIdNum(), gi, Edict::origin, Edict::solid, SOLID_BSP, vec3_origin, and VectorAdd.
Referenced by Door_Use(), G_SplashDamage(), and Touch_HurtTrigger().
void G_EventStart | ( | const Player & | player, |
bool | teamplay | ||
) |
Definition at line 662 of file g_events.cpp.
References EV_START, EVENT_INSTANTLY, G_EventAdd(), G_EventEnd(), G_PlayerToPM, and gi.
Referenced by G_ClientBegin().
void G_EventStartShoot | ( | const Edict & | ent, |
teammask_t | teamMask, | ||
shoot_types_t | shootType, | ||
const pos3_t | at | ||
) |
Start the shooting event.
ent | The entity that starts the shooting |
teamMask | the vis mask of the teams to determine the clients from this event is send to |
shootType | The type of the shoot |
at | The grid position to target to |
Definition at line 203 of file g_events.cpp.
References EV_ACTOR_START_SHOOT, G_EventAdd(), G_EventEnd(), G_VisToPM(), Edict::getIdNum(), gi, and Edict::pos.
Referenced by G_ClientShoot().
void G_EventThrow | ( | teammask_t | teamMask, |
const fireDef_t * | fd, | ||
float | dt, | ||
byte | flags, | ||
const vec3_t | position, | ||
const vec3_t | velocity | ||
) |
[in] | teamMask | the vis mask to determine the clients from this event is send to |
[in] | fd | The firedefinition to use |
[in] | dt | Delta time |
[in] | flags | bitmask of the following values: SF_BODY , SF_IMPACT , SF_BOUNCING and SF_BOUNCED |
[in] | position | The current position |
[in] | velocity | The velocity of the throw |
Definition at line 440 of file g_events.cpp.
References EV_ACTOR_THROW, fireDef_s::fdIdx, G_EventAdd(), G_EventEnd(), G_VisToPM(), gi, objDef_s::idx, fireDef_s::obj, and fireDef_s::weapFdsIdx.
Referenced by G_ShootGrenade().