UFO: Alien Invasion
Loading...
Searching...
No Matches
g_events.h
Go to the documentation of this file.
1
5
6/*
7All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9Original file from Quake 2 v3.21: quake2-2.31/game/g_local.h
10Copyright (C) 1997-2001 Id Software, Inc.
11
12This program is free software; you can redistribute it and/or
13modify it under the terms of the GNU General Public License
14as published by the Free Software Foundation; either version 2
15of the License, or (at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
21See the GNU General Public License for more details.
22
23You should have received a copy of the GNU General Public License
24along with this program; if not, write to the Free Software
25Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27*/
28
29#pragma once
30
31#include "g_vis.h"
32
33/* A bit mask. One bit for each affected player. */
34typedef unsigned int playermask_t;
35/* Bitmask for all players */
36#define PM_ALL 0xFFFFFFFF
37#define G_PlayerToPM(player) ((player).getNum() < game.sv_maxplayersperteam ? 1 << ((player).getNum()) : 0)
38
39void G_EventActorAdd(playermask_t playerMask, const Edict& ent, const bool instant = false);
40void G_EventActorAppear(playermask_t playerMask, const Actor& check, const Edict* ent);
41void G_EventActorDie(const Edict& ent, bool attacker);
42void G_EventActorFall(const Edict& ent);
43void G_EventActorRevitalise(const Edict& ent);
44void G_EventActorSendReservations(const Edict& ent);
45void G_EventActorStateChange(playermask_t playerMask, const Edict& ent);
46void G_EventActorStats(const Edict& ent, playermask_t playerMask);
47void G_EventActorTurn(const Edict& ent);
48void G_EventAddBrushModel(playermask_t playerMask, const Edict& ent);
49void G_EventCenterView(const Edict& ent);
50void G_EventCenterViewAt(playermask_t playerMask, const pos3_t pos);
51void G_EventMoveCameraTo(playermask_t playerMask, const pos3_t pos);
52void G_EventDoorClose(const Edict& door);
53void G_EventDoorOpen(const Edict& door);
54void G_EventDestroyEdict(const Edict& ent);
55void G_EventEdictAppear(playermask_t playerMask, const Edict& ent);
56void G_EventEdictPerish(playermask_t playerMask, const Edict& ent);
57void G_EventCameraAppear(playermask_t playerMask, const Edict& ent);
58void G_EventEndRound(void);
59void G_EventEndRoundAnnounce(const Player& player);
60void G_EventInventoryAdd(const Edict& ent, playermask_t playerMask, int itemAmount);
61void G_EventInventoryAmmo(const Edict& ent, const objDef_t* ammo, int amount, shoot_types_t shootType);
62void G_EventInventoryDelete(const Edict& ent, playermask_t playerMask, const containerIndex_t containerId, int x, int y);
63void G_EventInventoryReload(const Edict& ent, playermask_t playerMask, const Item* item, const invDef_t* invDef, const Item* ic);
64void G_EventModelExplodeTriggered(const Edict& ent, const char* sound);
65void G_EventModelExplode(const Edict& ent, const char* sound);
66void G_EventParticleSpawn(playermask_t playerMask, const char* name, int levelFlags, const vec3_t s, const vec3_t v, const vec3_t a);
67void G_EventPerish(const Edict& ent);
68void G_EventReactionFireChange(const Edict& ent);
69void G_EventReset(const Player& player, int activeTeam);
70void G_EventResetClientAction(const Edict& ent);
71void G_EventSendEdict(const Edict& ent);
72void G_EventSendParticle(playermask_t playerMask, const Edict& ent);
73void G_EventSendState(playermask_t playerMask, const Edict& ent);
74void G_EventSetClientAction(const Edict& ent);
75void G_EventShootHidden(teammask_t teamMask, const fireDef_t* fd, bool firstShoot, const vec3_t impact, int flags, const Edict* targetEdict);
76void 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);
77void G_EventSpawnSound(playermask_t playerMask, const Edict& ent, const vec3_t origin, const char* sound);
78void G_EventSpawnFootstepSound(const Edict& ent, const char* sound);
79void G_EventStart(const Player& player, bool teamplay);
80void G_EventStartShoot(const Edict& ent, teammask_t teamMask, shoot_types_t shootType, const pos3_t at);
81void G_EventEndShoot(const Edict& ent, teammask_t teamMask);
82void G_EventThrow(teammask_t teamMask, const fireDef_t* fd, float dt, byte flags, const vec3_t position, const vec3_t velocity);
83void G_EventAdd(playermask_t playerMask, int eType, int entnum);
84void G_EventEnd(void);
85void G_EventActorWound(const Edict& ent, const int bodyPart);
86void G_EventReactionFireAddTarget(const Edict& shooter, const Edict& target, int tusG_EventReactionFireAddTarget, int step);
87void G_EventReactionFireRemoveTarget(const Edict& shooter, const Edict& target, int step);
88void G_EventReactionFireTargetUpdate(const Edict& shooter, const Edict& target, int tus, int step);
89void G_EventReactionFireAbortShot(const Edict& shooter, const Edict& target, int step);
An Edict of type Actor.
Definition g_edict.h:348
item instance data, with linked list capability
Definition inv_shared.h:402
void G_EventEnd(void)
Definition g_events.cpp:711
void G_EventSendParticle(playermask_t playerMask, const Edict &ent)
Definition g_events.cpp:529
void G_EventSendEdict(const Edict &ent)
Send the bounding box info to the client.
Definition g_events.cpp:457
void G_EventStartShoot(const Edict &ent, teammask_t teamMask, shoot_types_t shootType, const pos3_t at)
Start the shooting event.
Definition g_events.cpp:203
void G_EventReactionFireChange(const Edict &ent)
Definition g_events.cpp:282
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.
Definition g_events.cpp:131
void G_EventEndRoundAnnounce(const Player &player)
Definition g_events.cpp:654
void G_EventSpawnFootstepSound(const Edict &ent, const char *sound)
Definition g_events.cpp:62
void G_EventDoorOpen(const Edict &door)
Definition g_events.cpp:677
void G_EventActorStats(const Edict &ent, playermask_t playerMask)
Definition g_events.cpp:383
void G_EventAdd(playermask_t playerMask, int eType, int entnum)
Definition g_events.cpp:705
void G_EventActorTurn(const Edict &ent)
Send the turn event for the given entity.
Definition g_events.cpp:77
void G_EventDestroyEdict(const Edict &ent)
Unregister an edict at the client.
Definition g_events.cpp:167
void G_EventActorAppear(playermask_t playerMask, const Actor &check, const Edict *ent)
Definition g_events.cpp:571
void G_EventSetClientAction(const Edict &ent)
Informs the client that an interaction with the world is possible.
Definition g_events.cpp:360
void G_EventReactionFireAddTarget(const Edict &shooter, const Edict &target, int tusG_EventReactionFireAddTarget, int step)
Definition g_events.cpp:295
void G_EventReactionFireRemoveTarget(const Edict &shooter, const Edict &target, int step)
Definition g_events.cpp:303
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.
Definition g_events.cpp:181
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.
Definition g_events.cpp:501
void G_EventActorDie(const Edict &ent, bool attacker)
Announce the actor die event for the clients that are seeing the actor.
Definition g_events.cpp:89
void G_EventActorAdd(playermask_t playerMask, const Edict &ent, const bool instant=false)
Definition g_events.cpp:511
void G_EventThrow(teammask_t teamMask, const fireDef_t *fd, float dt, byte flags, const vec3_t position, const vec3_t velocity)
Definition g_events.cpp:440
void G_EventEndShoot(const Edict &ent, teammask_t teamMask)
Ends the shooting event.
Definition g_events.cpp:217
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.
Definition g_events.cpp:232
void G_EventAddBrushModel(playermask_t playerMask, const Edict &ent)
Definition g_events.cpp:639
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.
Definition g_events.cpp:479
void G_EventInventoryAdd(const Edict &ent, playermask_t playerMask, int itemAmount)
Tell the client to add the item from the container.
Definition g_events.cpp:147
void G_EventStart(const Player &player, bool teamplay)
Definition g_events.cpp:662
void G_EventCameraAppear(playermask_t playerMask, const Edict &ent)
Send an appear event to the client.
Definition g_events.cpp:543
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.
Definition g_events.cpp:489
void G_EventActorFall(const Edict &ent)
Definition g_events.cpp:345
void G_EventEdictPerish(playermask_t playerMask, const Edict &ent)
Send disappear event.
Definition g_events.cpp:624
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).
Definition g_events.cpp:40
void G_EventEndRound(void)
End of turn event for the current active team.
Definition g_events.cpp:414
void G_EventActorSendReservations(const Edict &ent)
Will inform the player about the real TU reservation.
Definition g_events.cpp:113
void G_EventPerish(const Edict &ent)
Send an event to all clients that are seeing the given edict, that it just has disappeared.
Definition g_events.cpp:158
void G_EventReset(const Player &player, int activeTeam)
Definition g_events.cpp:669
void G_EventSendState(playermask_t playerMask, const Edict &ent)
Definition g_events.cpp:466
void G_EventActorRevitalise(const Edict &ent)
Announce the actor revitalize event for the clients that are seeing the actor.
Definition g_events.cpp:102
void G_EventDoorClose(const Edict &door)
Definition g_events.cpp:683
void G_EventActorWound(const Edict &ent, const int bodyPart)
Send info about an actor's wounds to the client.
Definition g_events.cpp:399
void G_EventInventoryReload(const Edict &ent, playermask_t playerMask, const Item *item, const invDef_t *invDef, const Item *ic)
Definition g_events.cpp:421
void G_EventReactionFireTargetUpdate(const Edict &shooter, const Edict &target, int tus, int step)
Definition g_events.cpp:310
void G_EventResetClientAction(const Edict &ent)
Reset the client actions for the given entity.
Definition g_events.cpp:376
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.
Definition g_events.cpp:334
void G_EventActorStateChange(playermask_t playerMask, const Edict &ent)
Definition g_events.cpp:632
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.
Definition g_events.cpp:260
unsigned int playermask_t
Definition g_events.h:34
void G_EventReactionFireAbortShot(const Edict &shooter, const Edict &target, int step)
Definition g_events.cpp:318
void G_EventEdictAppear(playermask_t playerMask, const Edict &ent)
Send an appear event to the client.
Definition g_events.cpp:563
void G_EventModelExplode(const Edict &ent, const char *sound)
Definition g_events.cpp:697
void G_EventModelExplodeTriggered(const Edict &ent, const char *sound)
Definition g_events.cpp:689
unsigned int teammask_t
Definition g_vis.h:30
int32_t containerIndex_t
Definition inv_shared.h:46
voidpf uLong int origin
Definition ioapi.h:45
int32_t shoot_types_t
Available shoot types - also see the ST_ constants.
Definition q_shared.h:206
QGL_EXTERN int GLboolean GLfloat * v
Definition r_gl.h:120
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition r_gl.h:110
this is a fire definition for our weapons/ammo
Definition inv_shared.h:110
inventory definition for our menus
Definition inv_shared.h:371
Defines all attributes of objects used in the inventory.
Definition inv_shared.h:264
pos_t pos3_t[3]
Definition ufotypes.h:58
vec_t vec3_t[3]
Definition ufotypes.h:39