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

functions provided by the main engine More...

#include <game.h>

Public Member Functions

 void (IMPORT *BroadcastPrintf)(int printlevel
 
const char __attribute__ ((format(__printf__, 2, 3)))
 
 void (IMPORT *DPrintf)(const char *fmt
 
 __attribute__ ((format(__printf__, 1, 2)))
 
 void (IMPORT *PlayerPrintf)(const player_t *player
 
 void (IMPORT *ConfigString)(int num
 
const char __attribute__ ((format(__printf__, 2, 3)))
 
 void (IMPORT *Error)(const char *fmt
 
 __attribute__ ((noreturn, format(__printf__, 1, 2)))
 
unsigned int (IMPORT *ModelIndex)(const char *name)
 
 void (IMPORT *SetInlineModelOrientation)(const char *name
 
 void (IMPORT *GetInlineModelAABB)(const char *name
 
 void (IMPORT *SetModel)(edict_t *ent
 
 trace_t (IMPORT *Trace)(const Line &traceLine
 collision detection More...
 
 int (IMPORT *PointContents)(const vec3_t point)
 
const char *IMPORTGetFootstepSound (const char *texture)
 
 float (IMPORT *GetBounceFraction)(const char *texture)
 
 bool (IMPORT *LoadModelAABB)(const char *model
 
 void (IMPORT *LinkEdict)(edict_t *ent)
 
 void (IMPORT *UnlinkEdict)(edict_t *ent)
 
 bool (IMPORT *TestLine)(const vec3_t start
 fast version of a line trace but without including entities More...
 
 bool (IMPORT *TestLineWithEnt)(const vec3_t start
 fast version of a line trace that also includes entities More...
 
 float (IMPORT *GrenadeTarget)(const vec3_t from
 
 void (IMPORT *GridCalcPathing)(actorSizeEnum_t actorSize
 
 bool (IMPORT *GridFindPath)(const actorSizeEnum_t actorSize
 
 void (IMPORT *MoveStore)(pathing_t *path)
 
 pos_t (IMPORT *MoveLength)(const pathing_t *path
 
 int (IMPORT *MoveNext)(const pathing_t *path
 
 int (IMPORT *GetTUsForDirection)(int dir
 
 pos_t (IMPORT *GridFall)(actorSizeEnum_t actorSize
 
 void (IMPORT *GridPosToVec)(actorSizeEnum_t actorSize
 
 bool (IMPORT *isOnMap)(const vec3_t vec)
 
 void (IMPORT *GridRecalcRouting)(const char *name
 
 bool (IMPORT *CanActorStandHere)(actorSizeEnum_t actorSize
 
 bool (IMPORT *GridShouldUseAutostand)(const pathing_t *path
 
 float (IMPORT *GetVisibility)(const pos3_t position)
 
const char *IMPORTFS_Gamedir (void)
 
 int (IMPORT *FS_LoadFile)(const char *path
 
 void (IMPORT *FS_FreeFile)(void *buffer)
 
FILE *IMPORTSys_Fopen (const char *filename, const char *mode)
 
 void (IMPORT *WriteChar)(char c)
 
 void (IMPORT *WriteByte)(byte c)
 
 void (IMPORT *WriteShort)(int c)
 
 void (IMPORT *WriteLong)(int c)
 
 void (IMPORT *WriteString)(const char *s)
 
 void (IMPORT *WritePos)(const vec3_t pos)
 
 void (IMPORT *WriteGPos)(const pos3_t pos)
 
 void (IMPORT *WriteDir)(const vec3_t pos)
 
 void (IMPORT *WriteAngle)(float f)
 
 void (IMPORT *WriteFormat)(const char *format
 
 void (IMPORT *AbortEvents)(void)
 
 void (IMPORT *EndEvents)(void)
 
 void (IMPORT *AddEvent)(unsigned int mask
 
 int (IMPORT *GetEvent)(void)
 
edict_t *IMPORTGetEventEdict (void)
 
 void (IMPORT *QueueEvent)(unsigned int mask
 
 void (IMPORT *QueueWriteByte)(byte c)
 
 void (IMPORT *QueueWritePos)(const vec3_t pos)
 
 void (IMPORT *QueueWriteString)(const char *s)
 
 void (IMPORT *QueueWriteShort)(int c)
 
 int (IMPORT *ReadChar)(void)
 
 int (IMPORT *ReadByte)(void)
 
 int (IMPORT *ReadShort)(void)
 
 int (IMPORT *ReadLong)(void)
 
 int (IMPORT *ReadString)(char *str
 
 void (IMPORT *ReadPos)(vec3_t pos)
 
 void (IMPORT *ReadGPos)(pos3_t pos)
 
 void (IMPORT *ReadDir)(vec3_t vector)
 
 float (IMPORT *ReadAngle)(void)
 
 void (IMPORT *ReadData)(void *buffer
 
 void (IMPORT *ReadFormat)(const char *format
 
 bool (IMPORT *GetConstInt)(const char *name
 
 bool (IMPORT *GetConstIntFromNamespace)(const char *space
 
const char *IMPORTGetConstVariable (const char *space, int value)
 
 void (IMPORT *RegisterConstInt)(const char *name
 
 bool (IMPORT *UnregisterConstVariable)(const char *name)
 
 void (IMPORT *GetCharacterValues)(const char *teamDefinition
 
void *IMPORTTagMalloc (int size, int tag, const char *file, int line)
 
 void (IMPORT *TagFree)(void *block
 
 void (IMPORT *FreeTags)(int tag
 
cvar_t *IMPORTCvar_Get (const char *varName, const char *value, int flags, const char *desc)
 
cvar_t *IMPORTCvar_Set (const char *varName, const char *value,...) __attribute__((format(__printf__
 
cvar_t *IMPORT const char *IMPORTCvar_String (const char *varName)
 
 int (IMPORT *Cmd_Argc)(void)
 
const char *IMPORTCmd_Argv (int n)
 
const char *IMPORTCmd_Args (void)
 
 void (IMPORT *AddCommandString)(const char *text
 
 __attribute__ ((format(__printf__, 1, 2)))
 

Data Fields

int seed
 
const csi_tcsi
 
const char * fmt
 
int printlevel
 
int const char * fmt
 
int const char va_list ap
 
const vec3_t origin
 
const vec3_t const vec3_t angles
 
AABBaabb
 
const char * name
 
const AABBbox
 
const AABB const edict_tpassent
 
const AABB const edict_t int contentmask
 
int frame
 
int AABBaabb
 
const vec3_t stop
 
const vec3_t const int levelmask
 
const vec3_t const int const
char ** 
entlist
 
const vec3_t at
 
const vec3_t float speed
 
const vec3_t float bool launched
 
const vec3_t float bool bool rolled
 
const vec3_t float bool bool vec3_t v0
 
pathing_tpath
 
pathing_t const pos3_t from
 
pathing_t const pos3_t int distance
 
pathing_t const pos3_t int
forbiddenList_t
fb_list
 
pathing_t const pos3_t const pos3_t targetPos
 
pathing_t const pos3_t const
pos3_t byte 
crouchingState
 
pathing_t const pos3_t const
pos3_t byte int 
maxTUs
 
pathing_t const pos3_t const
pos3_t byte int
forbiddenList_t
fb_list
 
const pos3_t to
 
const pos3_t byte crouchingState
 
const pos3_t byte bool stored
 
const pos3_t from
 
bool crouched
 
const pos3_t pos
 
const pos3_t vec3_t vec
 
const GridBoxbox
 
const GridBox const char ** list
 
byte ** buffer
 
int eType
 
int int entnum
 
size_t length
 
int size
 
intvalue
 
const char intvalue
 
int value
 
character_tchr
 
const char * file
 
const char int line
 

Detailed Description

functions provided by the main engine

Definition at line 173 of file game.h.

Member Function Documentation

const char game_import_s::__attribute__ ( (format(__printf__, 2, 3))  )
game_import_s::__attribute__ ( (format(__printf__, 1, 2))  )
const char game_import_s::__attribute__ ( (format(__printf__, 2, 3))  )
game_import_s::__attribute__ ( (noreturn, format(__printf__, 1, 2))  )
game_import_s::__attribute__ ( (format(__printf__, 1, 2))  )
game_import_s::bool ( IMPORT LoadModelAABB) const
game_import_s::bool ( IMPORT TestLine) const

fast version of a line trace but without including entities

game_import_s::bool ( IMPORT TestLineWithEnt) const

fast version of a line trace that also includes entities

game_import_s::bool ( IMPORT GridFindPath) const
game_import_s::bool ( IMPORT isOnMap) const
game_import_s::bool ( IMPORT CanActorStandHere)
game_import_s::bool ( IMPORT GridShouldUseAutostand) const
game_import_s::bool ( IMPORT GetConstInt) const
game_import_s::bool ( IMPORT GetConstIntFromNamespace) const
game_import_s::bool ( IMPORT UnregisterConstVariable) const
const char* IMPORT* game_import_s::Cmd_Args ( void  )

concatenation of all argv >= 1

Referenced by G_Say_f().

const char* IMPORT* game_import_s::Cmd_Argv ( int  n)
cvar_t* IMPORT* game_import_s::Cvar_Get ( const char *  varName,
const char *  value,
int  flags,
const char *  desc 
)

Referenced by G_Init().

cvar_t* IMPORT* game_import_s::Cvar_Set ( const char *  varName,
const char *  value,
  ... 
)

Referenced by CheckNeedPass(), and G_RunFrame().

cvar_t* IMPORT const char* IMPORT* game_import_s::Cvar_String ( const char *  varName)
game_import_s::float ( IMPORT GetBounceFraction) const
game_import_s::float ( IMPORT GrenadeTarget) const
game_import_s::float ( IMPORT GetVisibility) const
game_import_s::float ( IMPORT ReadAngle)
const char* IMPORT* game_import_s::FS_Gamedir ( void  )

Referenced by G_Init(), and SVCmd_WriteIP_f().

const char* IMPORT* game_import_s::GetConstVariable ( const char *  space,
int  value 
)

Referenced by AIL_toTeamString().

edict_t* IMPORT* game_import_s::GetEventEdict ( void  )

Referenced by G_EventEnd().

const char* IMPORT* game_import_s::GetFootstepSound ( const char *  texture)

Referenced by G_SendFootstepSound().

unsigned game_import_s::int ( IMPORT ModelIndex) const

the *index functions create configstrings and some internal server state

game_import_s::int ( IMPORT PointContents) const
game_import_s::int ( IMPORT MoveNext) const
game_import_s::int ( IMPORT GetTUsForDirection)
game_import_s::int ( IMPORT FS_LoadFile) const
game_import_s::int ( IMPORT GetEvent)
game_import_s::int ( IMPORT ReadChar)
game_import_s::int ( IMPORT ReadByte)
game_import_s::int ( IMPORT ReadShort)
game_import_s::int ( IMPORT ReadLong)
game_import_s::int ( IMPORT ReadString)
game_import_s::int ( IMPORT Cmd_Argc)
game_import_s::pos_t ( IMPORT MoveLength) const
game_import_s::pos_t ( IMPORT GridFall)
FILE* IMPORT* game_import_s::Sys_Fopen ( const char *  filename,
const char *  mode 
)

Referenced by G_Init(), and SVCmd_WriteIP_f().

void* IMPORT* game_import_s::TagMalloc ( int  size,
int  tag,
const char *  file,
int  line 
)
game_import_s::trace_t ( IMPORT Trace) const

collision detection

Note
traces a box from start to end, ignoring entities passent, stopping if it hits an object of type specified via contentmask (MASK_*). Mins and maxs set the box which will do the tracing - if nullptr then a line is used instead
Returns
the trace data
game_import_s::void ( IMPORT BroadcastPrintf)

sends message to all players

game_import_s::void ( IMPORT DPrintf) const

print output to server console

game_import_s::void ( IMPORT PlayerPrintf) const

sends message to only one player (don't use this to send messages to an AI player struct)

game_import_s::void ( IMPORT ConfigString)

configstrings hold all the index strings. All of the current configstrings are sent to clients when they connect, and changes are sent to all connected clients.

game_import_s::void ( IMPORT Error) const
Note
The error message should not have a newline - it's added inside of this function
game_import_s::void ( IMPORT SetInlineModelOrientation) const

This updates the inline model's orientation

game_import_s::void ( IMPORT GetInlineModelAABB) const
game_import_s::void ( IMPORT SetModel)
game_import_s::void ( IMPORT LinkEdict)

links entity into the world - so that it is sent to the client and used for collision detection, etc. Must be relinked if its size, position or solidarity changes

game_import_s::void ( IMPORT UnlinkEdict)

call before removing an interactive edict

game_import_s::void ( IMPORT GridCalcPathing)
game_import_s::void ( IMPORT MoveStore)
game_import_s::void ( IMPORT GridPosToVec)
game_import_s::void ( IMPORT GridRecalcRouting) const
game_import_s::void ( IMPORT FS_FreeFile)
game_import_s::void ( IMPORT WriteChar)
game_import_s::void ( IMPORT WriteByte)
game_import_s::void ( IMPORT WriteShort)
game_import_s::void ( IMPORT WriteLong)
game_import_s::void ( IMPORT WriteString) const
game_import_s::void ( IMPORT WritePos) const

some fractional bits

game_import_s::void ( IMPORT WriteGPos) const
game_import_s::void ( IMPORT WriteDir) const

single byte encoded, very coarse

game_import_s::void ( IMPORT WriteAngle)
game_import_s::void ( IMPORT WriteFormat) const
game_import_s::void ( IMPORT AbortEvents)
game_import_s::void ( IMPORT EndEvents)
game_import_s::void ( IMPORT AddEvent)
game_import_s::void ( IMPORT QueueEvent)
game_import_s::void ( IMPORT QueueWriteByte)
game_import_s::void ( IMPORT QueueWritePos) const
game_import_s::void ( IMPORT QueueWriteString) const
game_import_s::void ( IMPORT QueueWriteShort)
game_import_s::void ( IMPORT ReadPos)
game_import_s::void ( IMPORT ReadGPos)
game_import_s::void ( IMPORT ReadDir)
game_import_s::void ( IMPORT ReadData)
game_import_s::void ( IMPORT ReadFormat) const
game_import_s::void ( IMPORT RegisterConstInt) const
game_import_s::void ( IMPORT GetCharacterValues) const
game_import_s::void ( IMPORT TagFree)
game_import_s::void ( IMPORT FreeTags)
game_import_s::void ( IMPORT AddCommandString) const

add commands to the server console as if they were typed in for map changing, etc

Field Documentation

AABB& game_import_s::aabb

Definition at line 200 of file game.h.

int AABB& game_import_s::aabb

Definition at line 214 of file game.h.

const vec3_t const vec3_t game_import_s::angles

Definition at line 199 of file game.h.

int const char va_list game_import_s::ap

Definition at line 185 of file game.h.

const vec3_t game_import_s::at

Definition at line 226 of file game.h.

const AABB& game_import_s::box

Definition at line 209 of file game.h.

const GridBox& game_import_s::box

Definition at line 237 of file game.h.

byte** game_import_s::buffer

Definition at line 244 of file game.h.

character_t* game_import_s::chr

Definition at line 294 of file game.h.

const AABB const edict_t int game_import_s::contentmask

Definition at line 209 of file game.h.

bool game_import_s::crouched

Definition at line 233 of file game.h.

const pos3_t byte game_import_s::crouchingState

Definition at line 229 of file game.h.

const pos3_t byte game_import_s::crouchingState

Definition at line 231 of file game.h.

pathing_t const pos3_t int game_import_s::distance

Definition at line 228 of file game.h.

const vec3_t const int const char** game_import_s::entlist

Definition at line 225 of file game.h.

int int game_import_s::entnum

Definition at line 264 of file game.h.

int game_import_s::eType

Definition at line 264 of file game.h.

pathing_t const pos3_t int forbiddenList_t* game_import_s::fb_list

Definition at line 228 of file game.h.

pathing_t const pos3_t const pos3_t byte int forbiddenList_t* game_import_s::fb_list

Definition at line 229 of file game.h.

const char * game_import_s::file

Definition at line 298 of file game.h.

const char * game_import_s::fmt

Definition at line 181 of file game.h.

int const char* game_import_s::fmt

Definition at line 185 of file game.h.

int game_import_s::frame

Definition at line 214 of file game.h.

pathing_t const pos3_t game_import_s::from

Definition at line 228 of file game.h.

const pos3_t game_import_s::from

Definition at line 232 of file game.h.

const vec3_t float bool game_import_s::launched

Definition at line 226 of file game.h.

size_t game_import_s::length

Definition at line 279 of file game.h.

const vec3_t const int game_import_s::levelmask

Definition at line 223 of file game.h.

const char int game_import_s::line

Definition at line 298 of file game.h.

const GridBox const char** game_import_s::list

Definition at line 237 of file game.h.

pathing_t const pos3_t const pos3_t byte int game_import_s::maxTUs

Definition at line 229 of file game.h.

const char * game_import_s::name

Definition at line 202 of file game.h.

const vec3_t game_import_s::origin

Definition at line 199 of file game.h.

const AABB const edict_t* game_import_s::passent

Definition at line 209 of file game.h.

pathing_t * game_import_s::path

Definition at line 228 of file game.h.

const pos3_t game_import_s::pos

Definition at line 234 of file game.h.

int game_import_s::printlevel

Definition at line 185 of file game.h.

const vec3_t float bool bool game_import_s::rolled

Definition at line 226 of file game.h.

int game_import_s::seed

random seed

Definition at line 175 of file game.h.

Referenced by GetGameAPI().

int game_import_s::size

Definition at line 284 of file game.h.

const vec3_t float game_import_s::speed

Definition at line 226 of file game.h.

const vec3_t game_import_s::stop

Definition at line 223 of file game.h.

const pos3_t byte bool game_import_s::stored

Definition at line 231 of file game.h.

pathing_t const pos3_t const pos3_t game_import_s::targetPos

Definition at line 229 of file game.h.

const pos3_t game_import_s::to

Definition at line 231 of file game.h.

const vec3_t float bool bool vec3_t game_import_s::v0

Definition at line 226 of file game.h.

int* game_import_s::value

Definition at line 287 of file game.h.

const char int* game_import_s::value

Definition at line 288 of file game.h.

int game_import_s::value

Definition at line 290 of file game.h.

const pos3_t vec3_t game_import_s::vec

Definition at line 235 of file game.h.


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