39#define _(String) String
40#define ngettext(x, y, cnt) x
49#define GAMEVERSION "baseufo"
51#define MAX_SPOT_DIST_CAMERA 768
52#define MAX_SPOT_DIST 4096
55#define SERVER_FRAME_SECONDS 0.1
61#define INVDEF(containerID) (&gi.csi->ids[(containerID)])
63#define G_FreeTags(tag) gi.FreeTags((tag), __FILE__, __LINE__)
64#define G_TagMalloc(size, tag) gi.TagMalloc((size), (tag), __FILE__, __LINE__)
65#define G_MemFree(ptr) gi.TagFree((ptr), __FILE__, __LINE__)
69typedef struct game_locals_s {
80typedef struct level_locals_s {
127#define G_IsActor(ent) ((ent)->type == ET_ACTOR || (ent)->type == ET_ACTOR2x2)
128#define G_IsActive(ent) ((ent)->active)
129#define G_IsCamera(ent) ((ent)->type == ET_CAMERA)
130#define G_IsActiveCamera(ent) (G_IsCamera(ent) && G_IsActive(ent))
131#define G_IsSmoke(ent) ((ent)->type == ET_SMOKE)
132#define G_IsFire(ent) ((ent)->type == ET_FIRE)
133#define G_IsTriggerNextMap(ent) ((ent)->type == ET_TRIGGER_NEXTMAP)
134#define G_IsItem(ent) ((ent)->type == ET_ITEM)
135#define G_IsDoor(ent) ((ent)->type == ET_DOOR || (ent)->type == ET_DOOR_SLIDING)
137#define G_IsBreakable(ent) ((ent)->flags & FL_DESTROYABLE)
138#define G_IsBrushModel(ent) ((ent)->type == ET_BREAKABLE || G_IsDoor(ent) || (ent)->type == ET_ROTATING)
140#define G_IsVisibleOnBattlefield(ent) (G_IsActor((ent)) || G_IsItem(ent) || G_IsCamera(ent) || (ent)->type == ET_PARTICLE)
141#define G_IsAI(ent) ((ent)->getPlayer().pers.ai)
142#define G_IsAIPlayer(player) ((player)->pers.ai)
143#define G_TeamToVisMask(team) (1 << (team))
144#define G_IsVisibleForTeam(ent, team) ((ent)->visflags & G_TeamToVisMask(team))
145#define G_IsMultiPlayer() (sv_maxclients->integer > 1)
146#define G_IsSinglePlayer() (!G_IsMultiPlayer())
148#define G_IsCivilian(ent) ((ent)->getTeam() == TEAM_CIVILIAN)
149#define G_IsAlien(ent) ((ent)->getTeam() == TEAM_ALIEN)
150#define G_IsBlockingMovementActor(ent) (((ent)->type == ET_ACTOR && !G_IsDead(ent)) || ent->type == ET_ACTOR2x2)
243void G_InvList_f(
const Player& player);
248#define MORALE_RANDOM( mod ) ( (mod) * (1.0 + 0.3*crand()) )
289#define FL_DESTROYABLE 0x00000004
294#define FL_GROUPSLAVE 0x00000008
298#define FL_CLIENTACTION 0x00000010
302#define FL_TRIGGERED 0x00000100
Local definitions for game module.
cvar_t * ai_singleplayeraliens
void G_ClientCommand(Player &player)
cvar_t * sv_maxplayersperteam
bool SV_FilterPacket(const char *from)
void G_SendStats(Edict &ent)
Send stats to network buffer.
void G_ServerCommand(void)
ServerCommand will be called when an "sv" command is issued. The game can issue gi....
void G_MoraleBehaviour(int team)
Applies morale behaviour on actors.
void G_ClientEndRound(Player &player)
cvar_t * sv_maxsoldiersperplayer
void G_InitCamera(Edict *ent, camera_type_t cameraType, float angle, bool rotate)
cvar_t * ai_multiplayeraliens
cvar_t * sv_roundtimelimit
edictMaterial_t
e.g. used for breakable objects
cvar_t * sv_maxsoldiersperteam
void G_SendPlayerStats(const Player &player)
Write player stats to network buffer.
cvar_t * mor_regeneration
void G_CheckForceEndRound(void)
Check whether a forced turn end should be executed.
Interface to game library.
Artificial intelligence of a character.
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
functions exported by the game subsystem
functions provided by the main engine
this structure is left intact through an entire game it should be initialized at game library load ti...
this structure is cleared as each map is entered
unsigned num_stuns[MAX_TEAMS+1][MAX_TEAMS]
unsigned num_kills[MAX_TEAMS+1][MAX_TEAMS]
byte num_2x2spawnpoints[MAX_TEAMS]
unsigned num_spawned[MAX_TEAMS]
int initialAlienActorsSpawned
byte num_alive[MAX_TEAMS]
byte num_spawnpoints[MAX_TEAMS]