UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
game_export_s Struct Reference

functions exported by the game subsystem More...

#include <game.h>

Public Member Functions

 void (EXPORT *Init)(void)
 
 void (EXPORT *Shutdown)(void)
 
 void (EXPORT *SpawnEntities)(const char *mapname
 
 bool (EXPORT *ClientConnect)(player_t *client
 
 bool (EXPORT *ClientBegin)(player_t &client)
 
 void (EXPORT *ClientStartMatch)(player_t &client)
 
 void (EXPORT *ClientUserinfoChanged)(player_t &client
 
 void (EXPORT *ClientDisconnect)(player_t &client)
 
 void (EXPORT *ClientCommand)(player_t &client)
 
 int (EXPORT *ClientAction)(player_t &client)
 
 void (EXPORT *ClientEndRound)(player_t &client)
 
 void (EXPORT *ClientTeamInfo)(const player_t &client)
 
 void (EXPORT *ClientInitActorStates)(const player_t &client)
 
 int (EXPORT *ClientGetTeamNum)(const player_t &client)
 
 bool (EXPORT *ClientIsReady)(const player_t *client)
 
 int (EXPORT *ClientGetActiveTeam)(void)
 
const char *EXPORTClientGetName (int pnum)
 
 bool (EXPORT *RunFrame)(void)
 
 void (EXPORT *ServerCommand)(void)
 

Data Fields

int apiversion
 
bool day
 
bool const char * entstring
 
char * userinfo
 
char size_t userinfoSize
 
const char * userinfo
 
edict_tedicts
 
int edict_size
 
int num_edicts
 
int max_edicts
 
player_tplayers
 
int player_size
 
int maxplayersperteam
 

Detailed Description

functions exported by the game subsystem

Definition at line 317 of file game.h.

Member Function Documentation

game_export_s::bool ( EXPORT ClientConnect)
game_export_s::bool ( EXPORT ClientBegin)
game_export_s::bool ( EXPORT ClientIsReady) const
game_export_s::bool ( EXPORT RunFrame)
const char* EXPORT* game_export_s::ClientGetName ( int  pnum)

Referenced by GetGameAPI().

game_export_s::int ( EXPORT ClientAction)
game_export_s::int ( EXPORT ClientGetTeamNum) const
game_export_s::int ( EXPORT ClientGetActiveTeam)
game_export_s::void ( EXPORT Init)

the init function will only be called when a game starts, not each time a level is loaded. Persistant data for clients and the server can be allocated in init

game_export_s::void ( EXPORT Shutdown)
game_export_s::void ( EXPORT SpawnEntities) const
game_export_s::void ( EXPORT ClientStartMatch)
game_export_s::void ( EXPORT ClientUserinfoChanged)
game_export_s::void ( EXPORT ClientDisconnect)
game_export_s::void ( EXPORT ClientCommand)
game_export_s::void ( EXPORT ClientEndRound)
game_export_s::void ( EXPORT ClientTeamInfo) const
game_export_s::void ( EXPORT ClientInitActorStates) const
game_export_s::void ( EXPORT ServerCommand)

ServerCommand will be called when an "sv <command>" command is issued on the server console. The game can issue gi.Cmd_Argc() / gi.Cmd_Argv() commands to get the rest of the parameters

Field Documentation

int game_export_s::apiversion

Definition at line 318 of file game.h.

Referenced by GetGameAPI(), and SV_InitGameProgs().

bool game_export_s::day

Definition at line 327 of file game.h.

int game_export_s::edict_size

Definition at line 361 of file game.h.

Referenced by GetGameAPI().

edict_t* game_export_s::edicts

The size will be fixed when ge->Init() is called

Definition at line 360 of file game.h.

Referenced by G_Init(), and SV_LinkEdict().

bool const char* game_export_s::entstring

Definition at line 327 of file game.h.

int game_export_s::max_edicts

Definition at line 363 of file game.h.

Referenced by G_Init().

int game_export_s::maxplayersperteam

Definition at line 367 of file game.h.

Referenced by G_Init().

int game_export_s::num_edicts

current number, <= max_edicts

Definition at line 362 of file game.h.

Referenced by G_EdictsGetNewEdict(), G_EdictsGetNext(), G_EdictsGetNextActor(), G_EdictsGetNumber(), G_EdictsIsValidNum(), and G_Init().

int game_export_s::player_size

Definition at line 366 of file game.h.

Referenced by GetGameAPI().

player_t* game_export_s::players

Definition at line 365 of file game.h.

Referenced by G_Init().

char* game_export_s::userinfo

Definition at line 329 of file game.h.

const char* game_export_s::userinfo

Definition at line 332 of file game.h.

char size_t game_export_s::userinfoSize

Definition at line 329 of file game.h.


The documentation for this struct was generated from the following file: