33 #include "../shared/infostring.h"
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__)
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)
243 void G_InvList_f(
const Player& player);
248 #define MORALE_RANDOM( mod ) ( (mod) * (1.0 + 0.3*crand()) )
287 #define FL_DESTROYABLE 0x00000004
292 #define FL_GROUPSLAVE 0x00000008
296 #define FL_CLIENTACTION 0x00000010
300 #define FL_TRIGGERED 0x00000100
cvar_t * sv_maxplayersperteam
cvar_t * sv_maxsoldiersperplayer
Local definitions for game module.
unsigned num_stuns[MAX_TEAMS+1][MAX_TEAMS]
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
void G_InitCamera(Edict *ent, camera_type_t cameraType, float angle, bool rotate)
this structure is left intact through an entire game it should be initialized at game library load ti...
struct moveinfo_s moveinfo_t
actor movement
void G_ClientEndRound(Player &player)
this structure is cleared as each map is entered
Interface to game library.
cvar_t * ai_singleplayeraliens
bool SV_FilterPacket(const char *from)
void G_MoraleBehaviour(int team)
Applies morale behaviour on actors.
unsigned num_kills[MAX_TEAMS+1][MAX_TEAMS]
struct game_locals_s game_locals_t
this structure is left intact through an entire game it should be initialized at game library load ti...
functions exported by the game subsystem
functions provided by the main engine
cvar_t * sv_maxsoldiersperteam
struct camera_edict_data_s camera_edict_data_t
byte num_spawnpoints[MAX_TEAMS]
struct AI_s AI_t
Artificial intelligence of a character.
void G_ClientCommand(Player &player)
cvar_t * ai_multiplayeraliens
edictMaterial_t
e.g. used for breakable objects
byte num_alive[MAX_TEAMS]
cvar_t * mor_regeneration
struct level_locals_s level_locals_t
this structure is cleared as each map is entered
void G_CheckForceEndRound(void)
Check whether a forced turn end should be executed.
cvar_t * sv_roundtimelimit
unsigned num_spawned[MAX_TEAMS]
int initialAlienActorsSpawned
void G_ServerCommand(void)
ServerCommand will be called when an "sv" command is issued. The game can issue gi.Cmd_Argc() / gi.Cmd_Argv() commands to get the rest of the parameters.
Artificial intelligence of a character.
byte num_2x2spawnpoints[MAX_TEAMS]
void G_SendPlayerStats(const Player &player)
Write player stats to network buffer.
void G_SendStats(Edict &ent)
Send stats to network buffer.