UFO: Alien Invasion
|
Common header file. More...
#include "../shared/ufotypes.h"
#include "../shared/shared.h"
#include "../shared/mathlib.h"
#include "../shared/defines.h"
#include "../common/list.h"
#include "inv_shared.h"
#include "chr_shared.h"
#include "q_sizes.h"
Go to the source code of this file.
Data Structures | |
struct | cvarlist_s |
struct | gametype_s |
class | TerrainDef |
Terrain property table entry Terrain is defined by the file map_earth_terrain.png in pics/geoscape. It is a map of the world where the different terrainTypes are drawn in different colors. The colors used in that map must have the exact RGB values as in the table, or they won't be recognized. More... | |
class | TerrainDefs |
struct | mapDef_s |
struct | csi_s |
The csi structure is the client-server-information structure which contains all the static data needed by the server and the client. More... | |
Macros | |
#define | TEAM_NO_ACTIVE -1 |
#define | TEAM_CIVILIAN 0 |
#define | TEAM_PHALANX 1 |
#define | TEAM_ALIEN 7 |
#define | TEAM_MAX_HUMAN TEAM_ALIEN - 1 |
#define | EVENT_INSTANTLY 0x80 |
#define | DOOR_ROTATION_ANGLE 90 |
#define | ST_RIGHT 0 |
The right hand should be used for shooting. More... | |
#define | ST_RIGHT_REACTION 1 |
The right hand reaction fire should be used for shooting. More... | |
#define | ST_LEFT 2 |
The left hand should be used for shooting. More... | |
#define | ST_LEFT_REACTION 3 |
The left hand reaction fire should be used for shooting. More... | |
#define | ST_HEADGEAR 4 |
The headgear slot item should be used when shooting/using the item in the slot. More... | |
#define | ST_NUM_SHOOT_TYPES 5 |
Amount of shoottypes available. More... | |
#define | IS_SHOT_REACTION(x) ((x) == ST_RIGHT_REACTION || (x) == ST_LEFT_REACTION) |
Determine whether the selected shoot type is for reaction fire. More... | |
#define | IS_SHOT_LEFT(x) ((x) == ST_LEFT || (x) == ST_LEFT_REACTION) |
Determine whether the selected shoot type is for the item in the left hand, either shooting or reaction fire. More... | |
#define | IS_SHOT_RIGHT(x) ((x) == ST_RIGHT || (x) == ST_RIGHT_REACTION) |
Determine whether the selected shoot type is for the item in the right hand, either shooting or reaction fire. More... | |
#define | IS_SHOT_HEADGEAR(x) ((x) == ST_HEADGEAR) |
Determine whether the selected shoot type is for the item in the headgear slot. More... | |
#define | SF_IMPACT 1 |
#define | SF_BODY 2 |
#define | SF_BOUNCING 4 |
#define | SF_BOUNCED 8 |
#define | SKIP_LOCAL_ENTITY (-1) |
#define | MAX_DEATH 3 |
#define | STATE_PUBLIC 0x00FF |
#define | STATE_DEAD 0x0003 |
#define | STATE_CROUCHED 0x0004 |
#define | STATE_PANIC 0x0008 |
#define | STATE_RAGE 0x0010 |
#define | STATE_INSANE 0x0020 |
#define | STATE_STUN 0x0043 |
#define | STATE_DAZED 0x0080 |
#define | STATE_REACTION 0x0300 |
#define | STATE_SHAKEN 0x0400 |
#define | STATE_XVI 0x0800 |
#define | GRAVITY 500.0 |
#define | MAX_SKILL 100 |
#define | MAX_MAXHP 255 |
#define | MIN_TU 39 |
#define | WEIGHT_LIGHT 0.2f |
#define | WEIGHT_HEAVY 0.5f |
#define | WEIGHT_NORMAL_PENALTY 0.3f |
#define | WEIGHT_HEAVY_PENALTY 0.6f |
#define | WEIGHT_FACTOR 1000.0f |
#define | GET_ENCUMBRANCE_PENALTY(weight, max) (1.0f - ((weight) > (max) * WEIGHT_FACTOR * WEIGHT_HEAVY ? WEIGHT_HEAVY_PENALTY : (weight) > (max) * WEIGHT_FACTOR * WEIGHT_LIGHT ? WEIGHT_NORMAL_PENALTY : 0.0f)) |
#define | GET_ACC(ab, sk, pn) ((pn) - (((float)(ab) - 10) / (MAX_SKILL / 2) + ((float)(sk) - 10) / (MAX_SKILL / 2)) / 2) |
#define | GET_MORALE(ab) (std::min((100 + (ab) * 150/MAX_SKILL), 255)) |
#define | GET_TU(ab, md) (MIN_TU * (md) + (ab) * 20 / MAX_SKILL) |
#define | DOOR_OPEN_REVERSE 4 |
#define | GET_SLIDING_DOOR_SHIFT_VECTOR(dir, speed, vecout) do { const bool reverse = (dir) & DOOR_OPEN_REVERSE; VectorClear(vecout); vecout[dir & 3] = reverse ? -speed : speed; } while (0); |
#define | MAX_TILESTRINGS 8 |
#define | MAX_CLIENTS 256 /* absolute limit */ |
#define | MAX_GENERAL (MAX_CLIENTS*2) /* general config strings */ |
#define | MAX_ENTITYSTRINGS 2 |
#define | CS_NAME 0 |
#define | CS_MAPTITLE 1 |
#define | CS_MAXCLIENTS 2 |
#define | CS_MAPCHECKSUM 3 |
#define | CS_MAXSOLDIERSPERTEAM 4 |
#define | CS_MAXSOLDIERSPERPLAYER 5 |
#define | CS_ENABLEMORALE 6 |
#define | CS_MAXTEAMS 7 |
#define | CS_PLAYERCOUNT 8 |
#define | CS_VERSION 9 |
#define | CS_UFOCHECKSUM 10 |
#define | CS_OBJECTAMOUNT 11 |
#define | CS_LIGHTMAP 12 |
#define | CS_MAPZONE 13 |
#define | CS_VICTORY_CONDITIONS 14 |
#define | CS_ENTITYSTRING 15 |
#define | CS_TILES (CS_ENTITYSTRING+MAX_ENTITYSTRINGS) |
#define | CS_POSITIONS (CS_TILES+MAX_TILESTRINGS) |
#define | CS_MODELS (CS_POSITIONS+MAX_TILESTRINGS) |
#define | CS_PLAYERNAMES (CS_MODELS+MAX_MODELS) |
#define | CS_GENERAL (CS_PLAYERNAMES+MAX_CLIENTS) |
#define | MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL) |
#define | MAX_GAMETYPES 16 |
#define | MAX_CVARLISTINGAMETYPE 16 |
#define | MAX_TERRAINDEFS 16 |
Terrain property table Terrain is defined by the file map_earth_terrain.png in pics/geoscape. It is a map of the world where the different terrainTypes are drawn in different colors. The colors used in that map must have the exact RGB values as in the table, or they won't be recognized. More... | |
#define | MapDef_ForeachCondition(var, condition) |
#define | MapDef_Foreach(var) MapDef_ForeachCondition(var, 1) |
#define | REJ_PASSWORD_REQUIRED_OR_INCORRECT "Password required or incorrect." |
Reject messages that are send to the client from the game module. More... | |
#define | BAD_RCON_PASSWORD "Bad rcon_password." |
#define | REJ_BANNED "Banned." |
#define | REJ_SERVER_FULL "Server is full." |
#define | REJ_SERVER_VERSION_MISMATCH "The server is running a different version of the game." |
#define | REJ_GAME_ALREADY_STARTED "Game has started already." |
#define | REJ_CONNECTION_REFUSED "Connection refused." |
#define | SV_CMD_CONNECT "connect" |
#define | SV_CMD_RCON "rcon" |
#define | SV_CMD_STATUS "status" |
#define | SV_CMD_TEAMINFO "teaminfo" |
#define | SV_CMD_INFO "info" |
#define | SV_CMD_PRINT "print" |
#define | SV_CMD_ACK "ack" |
#define | CL_CMD_PING "ping" |
#define | CL_CMD_ECHO "echo" |
#define | CL_PRECACHE "precache" |
#define | CL_SPAWNSOLDIERS "spawnsoldiers" |
#define | CL_STARTMATCH "startmatch" |
#define | CL_CMD_COMMAND "cmd" |
#define | CL_CMD_CLIENT_CONNECT "client_connect" |
#define | NET_STATE_NEW "new" |
#define | NET_STATE_BEGIN "begin" |
#define | NET_STATE_STARTMATCH "startmatch" |
#define | NET_STATE_DISCONNECT "disconnect" |
#define | NET_STATE_INFO "info" |
Typedefs | |
typedef int32_t | shoot_types_t |
Available shoot types - also see the ST_ constants. More... | |
typedef struct cvarlist_s | cvarlist_t |
typedef struct gametype_s | gametype_t |
typedef struct mapDef_s | mapDef_t |
typedef struct csi_s | csi_t |
The csi structure is the client-server-information structure which contains all the static data needed by the server and the client. More... | |
Functions | |
void | Sys_Error (const char *error,...) __attribute__((noreturn |
void | format (__printf__, 1, 2))) |
void | Com_Printf (const char *msg,...) __attribute__((format(__printf__ |
void void | Com_DPrintf (int level, const char *msg,...) __attribute__((format(__printf__ |
int | Com_GetMapDefNumber (void) |
mapDef_t * | Com_GetMapDefByIDX (int index) |
mapDef_t * | Com_GetMapDefinitionByID (const char *mapDefID) |
Variables | |
const char * | pa_format [PA_NUM_EVENTS] |
Player action format strings for netchannel transfer. More... | |
csi_t | csi |
Common header file.
Definition in file q_shared.h.
#define BAD_RCON_PASSWORD "Bad rcon_password." |
Definition at line 581 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), and SVC_RemoteCommand().
#define CL_CMD_CLIENT_CONNECT "client_connect" |
Definition at line 606 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), and SVC_DirectConnect().
#define CL_CMD_COMMAND "cmd" |
Definition at line 605 of file q_shared.h.
Referenced by CL_ConnectionlessPacket().
#define CL_CMD_ECHO "echo" |
Definition at line 598 of file q_shared.h.
Referenced by CL_ConnectionlessPacket().
#define CL_CMD_PING "ping" |
Definition at line 597 of file q_shared.h.
Referenced by CL_ConnectionlessPacket().
#define CL_PRECACHE "precache" |
Definition at line 601 of file q_shared.h.
Referenced by CL_InitLocal(), and SV_New_f().
#define CL_SPAWNSOLDIERS "spawnsoldiers" |
Definition at line 602 of file q_shared.h.
Referenced by CL_InitLocal(), and SV_CheckSpawnSoldiers().
#define CL_STARTMATCH "startmatch" |
Definition at line 603 of file q_shared.h.
Referenced by CL_InitLocal(), and SV_CheckStartMatch().
#define CS_ENABLEMORALE 6 |
enable the morale states in multiplayer
Definition at line 315 of file q_shared.h.
Referenced by SP_worldspawn().
#define CS_ENTITYSTRING 15 |
additional worldspawn settings
Definition at line 324 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), SV_GetConfigStringLength(), SV_Map(), SV_ParseUMP(), and TEST_F().
#define CS_GENERAL (CS_PLAYERNAMES+MAX_CLIENTS) |
Definition at line 329 of file q_shared.h.
Referenced by SV_GetConfigStringLength().
#define CS_LIGHTMAP 12 |
which lightmap to use
Definition at line 321 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), CL_ViewLoadMedia(), SP_light(), SP_misc_particle(), SP_misc_sound(), SP_worldspawn(), SV_Map(), SV_SetConfigString(), and SV_Status_f().
#define CS_MAPCHECKSUM 3 |
for catching cheater maps
Definition at line 312 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), SV_Map(), and SV_SetConfigString().
#define CS_MAPTITLE 1 |
display map title string - translated client side
Definition at line 310 of file q_shared.h.
Referenced by CL_LogEvent(), CL_ViewLoadMedia(), GAME_StartBattlescape(), and SV_Map().
#define CS_MAPZONE 13 |
for terrain texture replacement
Definition at line 322 of file q_shared.h.
Referenced by CL_ViewLoadMedia(), and SV_Map().
#define CS_MAXCLIENTS 2 |
Definition at line 311 of file q_shared.h.
Referenced by SP_worldspawn().
#define CS_MAXSOLDIERSPERPLAYER 5 |
max soldiers per player when in teamplay mode
Definition at line 314 of file q_shared.h.
Referenced by SP_worldspawn().
#define CS_MAXSOLDIERSPERTEAM 4 |
#define CS_MAXTEAMS 7 |
how many multiplayer teams for this map
Definition at line 316 of file q_shared.h.
Referenced by G_RunFrame(), and SP_worldspawn().
#define CS_MODELS (CS_POSITIONS+MAX_TILESTRINGS) |
Definition at line 327 of file q_shared.h.
Referenced by CL_ParseConfigString(), CL_ShowConfigstrings_f(), CL_ViewLoadMedia(), Com_CheckConfigStringIndex(), SV_GetConfigStringLength(), SV_ModelIndex(), SV_New_f(), and SV_PrintConfigStrings_f().
#define CS_NAME 0 |
config strings are a general means of communication from the server to all connected clients. Each config string can usually be at most MAX_TOKEN_CHARS characters, but some of them (eg. CS_TILES) can span a multiple of that.
Definition at line 309 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), CL_ViewLoadMedia(), SV_Map(), and SV_New_f().
#define CS_OBJECTAMOUNT 11 |
amount of defined objects in the script files
Definition at line 320 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), SV_Map(), and SV_SetConfigString().
#define CS_PLAYERCOUNT 8 |
amount of already connected players
Definition at line 317 of file q_shared.h.
Referenced by G_ClientBegin(), and G_ClientDisconnect().
#define CS_PLAYERNAMES (CS_MODELS+MAX_MODELS) |
Definition at line 328 of file q_shared.h.
Referenced by CL_ParseClientinfo(), CL_ParseConfigString(), G_ClientBegin(), G_ClientUserinfoChanged(), and SV_GetConfigStringLength().
#define CS_POSITIONS (CS_TILES+MAX_TILESTRINGS) |
Definition at line 326 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), CL_SetConfigString(), CL_ShowConfigstrings_f(), CL_ViewLoadMedia(), Com_CheckConfigStringIndex(), SV_GetConfigStringLength(), SV_Map(), SV_New_f(), SV_PrintConfigStrings_f(), SV_SetConfigString(), and UI_InitRadar().
#define CS_TILES (CS_ENTITYSTRING+MAX_ENTITYSTRINGS) |
Definition at line 325 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), CL_DownloadMap(), CL_SetConfigString(), CL_ShowConfigstrings_f(), CL_ViewLoadMedia(), Com_CheckConfigStringIndex(), SV_GetConfigStringLength(), SV_Map(), SV_New_f(), SV_PrintConfigStrings_f(), SV_SetConfigString(), and UI_InitRadar().
#define CS_UFOCHECKSUM 10 |
checksum of ufo files
Definition at line 319 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), SV_Map(), and SV_SetConfigString().
#define CS_VERSION 9 |
what is the servers version
Definition at line 318 of file q_shared.h.
Referenced by CL_CanMultiplayerStart(), and SV_Map().
#define CS_VICTORY_CONDITIONS 14 |
a list of msgids seperated by ,
Definition at line 323 of file q_shared.h.
Referenced by G_MissionAddVictoryMessage(), and GAME_InitMissionBriefing().
#define DOOR_OPEN_REVERSE 4 |
Definition at line 293 of file q_shared.h.
Referenced by Door_Use(), LET_RotateDoor(), SP_func_door(), and SP_func_door_sliding().
#define DOOR_ROTATION_ANGLE 90 |
Definition at line 187 of file q_shared.h.
Referenced by Door_Use(), and LET_RotateDoor().
#define EVENT_INSTANTLY 0x80 |
add this flag for instant event execution
Definition at line 73 of file q_shared.h.
Referenced by CL_ParseEvent(), G_EventActorAdd(), G_EventReset(), G_EventStart(), SV_AddEvent(), SV_QueueEvent(), and TEST_F().
#define GET_ACC | ( | ab, | |
sk, | |||
pn | |||
) | ((pn) - (((float)(ab) - 10) / (MAX_SKILL / 2) + ((float)(sk) - 10) / (MAX_SKILL / 2)) / 2) |
Definition at line 289 of file q_shared.h.
Referenced by CL_GetHitProbability(), and G_CalcEffectiveSpread().
#define GET_ENCUMBRANCE_PENALTY | ( | weight, | |
max | |||
) | (1.0f - ((weight) > (max) * WEIGHT_FACTOR * WEIGHT_HEAVY ? WEIGHT_HEAVY_PENALTY : (weight) > (max) * WEIGHT_FACTOR * WEIGHT_LIGHT ? WEIGHT_NORMAL_PENALTY : 0.0f)) |
Definition at line 287 of file q_shared.h.
Referenced by InventoryInterface::EquipActorNormal(), G_ActorCalculateMaxTU(), G_GetEarnedExperience(), HUD_UpdateActorLoad_f(), INV_UpdateActorLoad_f(), and InventoryInterface::PackAmmoAndWeapon().
#define GET_MORALE | ( | ab | ) | (std::min((100 + (ab) * 150/MAX_SKILL), 255)) |
Definition at line 290 of file q_shared.h.
Referenced by CHRSH_CharGenAbilitySkills(), G_ClientAssignDefaultActorValues(), G_EventActorAppear(), G_Morale(), G_MoraleBehaviour(), and G_TreatActor().
#define GET_SLIDING_DOOR_SHIFT_VECTOR | ( | dir, | |
speed, | |||
vecout | |||
) | do { const bool reverse = (dir) & DOOR_OPEN_REVERSE; VectorClear(vecout); vecout[dir & 3] = reverse ? -speed : speed; } while (0); |
Definition at line 294 of file q_shared.h.
Referenced by Door_SlidingUse(), and LET_SlideDoor().
Definition at line 291 of file q_shared.h.
Referenced by InventoryInterface::EquipActorNormal(), G_ActorCalculateMaxTU(), HUD_UpdateActorLoad_f(), INV_UpdateActorLoad_f(), and InventoryInterface::PackAmmoAndWeapon().
#define GRAVITY 500.0 |
Definition at line 276 of file q_shared.h.
Referenced by AI_CheckLineOfFire(), CL_TargetingGrenade(), Com_GrenadeTarget(), G_EventActorFall(), G_ShootGrenade(), and LE_AddGrenade().
#define IS_SHOT_HEADGEAR | ( | x | ) | ((x) == ST_HEADGEAR) |
Determine whether the selected shoot type is for the item in the headgear slot.
Definition at line 245 of file q_shared.h.
Referenced by AI_GetItemForShootType(), CL_ActorDoShoot(), CL_ActorStartShoot(), and G_PrepareShot().
#define IS_SHOT_LEFT | ( | x | ) | ((x) == ST_LEFT || (x) == ST_LEFT_REACTION) |
Determine whether the selected shoot type is for the item in the left hand, either shooting or reaction fire.
Definition at line 241 of file q_shared.h.
Referenced by AI_GetItemForShootType(), AI_IsHandForForShootTypeFree(), CL_ActorDoShoot(), and CL_ActorStartShoot().
#define IS_SHOT_REACTION | ( | x | ) | ((x) == ST_RIGHT_REACTION || (x) == ST_LEFT_REACTION) |
Determine whether the selected shoot type is for reaction fire.
Definition at line 239 of file q_shared.h.
Referenced by AI_GetItemForShootType(), and AI_IsHandForForShootTypeFree().
#define IS_SHOT_RIGHT | ( | x | ) | ((x) == ST_RIGHT || (x) == ST_RIGHT_REACTION) |
Determine whether the selected shoot type is for the item in the right hand, either shooting or reaction fire.
Definition at line 243 of file q_shared.h.
Referenced by AI_GetItemForShootType(), AI_IsHandForForShootTypeFree(), CL_ActorDoShoot(), CL_ActorGetMuzzle(), CL_ActorStartShoot(), G_EventInventoryAmmo(), G_PrepareShot(), and ReactionFire::shoot().
#define MapDef_Foreach | ( | var | ) | MapDef_ForeachCondition(var, 1) |
Definition at line 505 of file q_shared.h.
Referenced by Com_GetMapDefinitionByID(), TEST_F(), and UI_SelectMap_f().
#define MapDef_ForeachCondition | ( | var, | |
condition | |||
) |
Definition at line 501 of file q_shared.h.
Referenced by TEST_F(), and UI_RequestMapList_f().
#define MAX_CLIENTS 256 /* absolute limit */ |
Definition at line 299 of file q_shared.h.
Referenced by CL_ParseConfigString(), SV_GetConfigStringLength(), and GameTest::testCountSpawnpointsForMapInMultiplayerMode().
#define MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL) |
Definition at line 330 of file q_shared.h.
Referenced by CL_ShowConfigstrings_f(), Com_CheckConfigStringIndex(), SV_New_f(), and SV_PrintConfigStrings_f().
#define MAX_CVARLISTINGAMETYPE 16 |
Definition at line 335 of file q_shared.h.
Referenced by Com_ParseGameTypes().
#define MAX_DEATH 3 |
Definition at line 257 of file q_shared.h.
Referenced by Com_ParseTeam(), and G_ActorDie().
#define MAX_ENTITYSTRINGS 2 |
Definition at line 301 of file q_shared.h.
Referenced by SV_GetConfigStringLength().
#define MAX_GAMETYPES 16 |
#define MAX_GENERAL (MAX_CLIENTS*2) /* general config strings */ |
Definition at line 300 of file q_shared.h.
Referenced by SV_GetConfigStringLength().
#define MAX_MAXHP 255 |
Definition at line 279 of file q_shared.h.
Referenced by CHAR_UpdateSkills().
#define MAX_SKILL 100 |
Definition at line 278 of file q_shared.h.
Referenced by CHAR_UpdateSkills(), CHRSH_CharGenAbilitySkills(), CL_ActorGetSkillString(), and G_EventActorAppear().
#define MAX_TERRAINDEFS 16 |
Terrain property table Terrain is defined by the file map_earth_terrain.png in pics/geoscape. It is a map of the world where the different terrainTypes are drawn in different colors. The colors used in that map must have the exact RGB values as in the table, or they won't be recognized.
Definition at line 388 of file q_shared.h.
Referenced by TerrainDefs::add(), TerrainDefs::findByColor(), TerrainDefs::findByName(), and TerrainDefs::~TerrainDefs().
#define MAX_TILESTRINGS 8 |
Definition at line 298 of file q_shared.h.
Referenced by CL_SetConfigString(), SV_BuildMapStrings(), SV_Configstring(), SV_GetConfigStringLength(), SV_Map_f(), and SV_SetConfigString().
#define MIN_TU 39 |
Definition at line 280 of file q_shared.h.
#define NET_STATE_BEGIN "begin" |
Definition at line 609 of file q_shared.h.
Referenced by CL_RequestNextDownload().
#define NET_STATE_DISCONNECT "disconnect" |
Definition at line 611 of file q_shared.h.
Referenced by CL_Disconnect().
#define NET_STATE_INFO "info" |
Definition at line 612 of file q_shared.h.
#define NET_STATE_NEW "new" |
Definition at line 608 of file q_shared.h.
Referenced by CL_ConnectionlessPacket().
#define NET_STATE_STARTMATCH "startmatch" |
Definition at line 610 of file q_shared.h.
Referenced by GAME_StartMatch().
#define REJ_BANNED "Banned." |
Definition at line 582 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), and G_ClientConnect().
#define REJ_CONNECTION_REFUSED "Connection refused." |
Definition at line 586 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), and SVC_DirectConnect().
#define REJ_GAME_ALREADY_STARTED "Game has started already." |
Definition at line 585 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), and SVC_DirectConnect().
#define REJ_PASSWORD_REQUIRED_OR_INCORRECT "Password required or incorrect." |
Reject messages that are send to the client from the game module.
Definition at line 580 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), and G_ClientConnect().
#define REJ_SERVER_FULL "Server is full." |
Definition at line 583 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), G_ClientConnect(), and SVC_DirectConnect().
#define REJ_SERVER_VERSION_MISMATCH "The server is running a different version of the game." |
Definition at line 584 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), and SVC_DirectConnect().
#define SF_BODY 2 |
impact on actors
Definition at line 249 of file q_shared.h.
Referenced by CL_ActorShootHidden(), G_ShootGrenade(), G_ShootSingle(), LE_AddGrenade(), and LE_AddProjectile().
#define SF_BOUNCED 8 |
at least hit the ground once and can now start to bounce
Definition at line 251 of file q_shared.h.
Referenced by CL_ActorDoShoot(), CL_ActorDoShootTime(), CL_ActorDoThrow(), G_ShootGrenade(), and G_ShootSingle().
#define SF_BOUNCING 4 |
item should bounce around (like grenades)
Definition at line 250 of file q_shared.h.
Referenced by CL_ActorShootHidden(), G_ShootGrenade(), G_ShootSingle(), LE_AddGrenade(), and LE_AddProjectile().
#define SF_IMPACT 1 |
impact on none actor objects
Definition at line 248 of file q_shared.h.
Referenced by CL_ActorShootHidden(), G_ShootGrenade(), G_ShootSingle(), LE_AddGrenade(), and LE_AddProjectile().
#define SKIP_LOCAL_ENTITY (-1) |
Definition at line 255 of file q_shared.h.
Referenced by CL_ActorAppear(), CL_ActorDoShoot(), CL_ActorShootHidden(), G_EventActorAppear(), G_EventShoot(), G_EventShootHidden(), and LE_Get().
#define ST_HEADGEAR 4 |
The headgear slot item should be used when shooting/using the item in the slot.
Definition at line 231 of file q_shared.h.
Referenced by CL_ActorShoot().
#define ST_LEFT 2 |
The left hand should be used for shooting.
Definition at line 221 of file q_shared.h.
Referenced by actorL_throwgrenade(), AIL_positionshoot(), and CL_ActorShoot().
#define ST_LEFT_REACTION 3 |
The left hand reaction fire should be used for shooting.
Definition at line 226 of file q_shared.h.
Referenced by ReactionFire::tryToShoot().
#define ST_NUM_SHOOT_TYPES 5 |
Amount of shoottypes available.
Definition at line 236 of file q_shared.h.
Referenced by AI_FighterCalcActionScore(), AI_HasLineOfFire(), AIL_GetBestShot(), G_PrepareShot(), and ReactionFire::tryToShoot().
#define ST_RIGHT 0 |
The right hand should be used for shooting.
Definition at line 211 of file q_shared.h.
Referenced by actorL_throwgrenade(), AI_FighterCalcActionScore(), AI_HasLineOfFire(), AIL_GetBestShot(), AIL_positionshoot(), and CL_ActorShoot().
#define ST_RIGHT_REACTION 1 |
The right hand reaction fire should be used for shooting.
Definition at line 216 of file q_shared.h.
Referenced by ReactionFire::tryToShoot().
#define STATE_CROUCHED 0x0004 |
Definition at line 263 of file q_shared.h.
Referenced by AI_ActorThink(), AIL_crouch(), CL_ActorStandCrouch_f(), CL_ActorStateChange(), G_ClientGetFreeSpawnPointForActorSize(), G_ClientMove(), G_ClientStateChange(), G_ThinkActorGoCrouch(), Actor::isCrouched(), LE_GetAnim(), Actor::removeCrouched(), and Actor::setCrouched().
#define STATE_DAZED 0x0080 |
dazed and unable to move
Definition at line 269 of file q_shared.h.
Referenced by CL_ActorStateChange(), Actor::isDazed(), Actor::removeDazed(), and Actor::setDazed().
#define STATE_DEAD 0x0003 |
0 alive, 1-3 different deaths
Definition at line 262 of file q_shared.h.
Referenced by CL_ActorStateChange(), G_ClientDisconnect(), G_ClientGetFreeSpawnPointForActorSize(), Actor::isDead(), and Actor::isStunned().
#define STATE_INSANE 0x0020 |
Definition at line 267 of file q_shared.h.
Referenced by CL_ActorStateChange(), Actor::isInsane(), Actor::removeInsane(), and Actor::setInsane().
#define STATE_PANIC 0x0008 |
Definition at line 264 of file q_shared.h.
Referenced by CL_ActorStateChange(), Actor::isPanicked(), Actor::removePanicked(), and Actor::setPanicked().
#define STATE_PUBLIC 0x00FF |
mask to separate private flags from events
Definition at line 261 of file q_shared.h.
Referenced by G_EventActorAdd(), G_EventActorAppear(), and G_EventSendState().
#define STATE_RAGE 0x0010 |
pretty self-explaining
Definition at line 266 of file q_shared.h.
Referenced by CL_ActorStateChange(), Actor::isRaged(), Actor::removeRaged(), and Actor::setRaged().
#define STATE_REACTION 0x0300 |
reaction fire
Definition at line 272 of file q_shared.h.
Referenced by AI_InitPlayer(), AIL_reactionfire(), CL_ActorReservedTUs(), CL_ActorStateChange(), CL_GenerateCharacter(), G_ActorDieOrStun(), G_ClientStateChange(), G_MoraleBehaviour(), G_MoralePanic(), G_MoraleRage(), G_ReactionFireSettingsUpdate(), GAME_InitializeBattlescape(), HUD_DisplayImpossibleReaction(), HUD_DisplayPossibleReaction(), HUD_ToggleReaction_f(), HUD_UpdateButtons(), HUD_UpdateCursor(), HUD_UsableReactionTUs(), Actor::isReaction(), Actor::removeReaction(), and Actor::setReaction().
#define STATE_SHAKEN 0x0400 |
forced reaction fire
Definition at line 273 of file q_shared.h.
Referenced by CL_ActorStateChange(), Actor::isShaken(), Actor::removeShaken(), and Actor::setShaken().
#define STATE_STUN 0x0043 |
stunned - includes death
Definition at line 268 of file q_shared.h.
Referenced by CL_ActorStateChange(), G_ActorStun(), G_ClientGetFreeSpawnPointForActorSize(), Actor::isStunned(), Actor::removeStunned(), and Actor::setStunned().
#define STATE_XVI 0x0800 |
controlled by the other team
Definition at line 274 of file q_shared.h.
Referenced by Edict::isOpponent().
#define SV_CMD_ACK "ack" |
Definition at line 596 of file q_shared.h.
Referenced by CL_ConnectionlessPacket().
#define SV_CMD_CONNECT "connect" |
Definition at line 588 of file q_shared.h.
Referenced by CL_Connect(), SV_ConnectionlessPacket(), and TEST_F().
#define SV_CMD_INFO "info" |
Definition at line 592 of file q_shared.h.
Referenced by GAME_MP_PingServer(), SV_ConnectionlessPacket(), and SVC_Info().
#define SV_CMD_PRINT "print" |
Definition at line 593 of file q_shared.h.
Referenced by CL_ConnectionlessPacket(), Com_EndRedirect(), Com_vPrintf(), SVC_DirectConnect(), SVC_Info(), and SVC_Status().
#define SV_CMD_RCON "rcon" |
Definition at line 589 of file q_shared.h.
Referenced by GAME_MP_Rcon(), GAME_MP_RunFrame(), and SV_ConnectionlessPacket().
#define SV_CMD_STATUS "status" |
Definition at line 590 of file q_shared.h.
Referenced by GAME_MP_ServerInfo_f(), and SV_ConnectionlessPacket().
#define SV_CMD_TEAMINFO "teaminfo" |
Definition at line 591 of file q_shared.h.
Referenced by GAME_MP_HandleServerCommand(), GAME_MP_SelectTeam_Init_f(), and SV_ConnectionlessPacket().
#define TEAM_ALIEN 7 |
Definition at line 63 of file q_shared.h.
Referenced by AI_CheckForMissionTargets(), AI_CheckRespawn(), AI_CheckUsingDoor(), AI_CivilianCalcActionScore(), AI_GetHidingTeam(), AIL_GetAIType(), AIL_Init(), AIL_waypoints(), CHRSH_IsTeamDefAlien(), CL_ActorDie(), CL_ActorRevitalised(), Com_ParseValue(), Com_SetValue(), Com_ValueToStr(), G_ClientEndRound(), G_MatchEndCheck(), G_MatchSendResults(), G_MissionGetTeamString(), G_MissionThink(), G_PrintActorStats(), G_SetTeamForPlayer(), G_SpawnEntities(), G_UpdateCharacterBodycount(), G_UpdateHitScore(), GAME_Abort_f(), GAME_SK_Results(), Edict::isOpponent(), SP_alien_start(), TEST_F(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), and GameTest::testCountSpawnpointsForMapInSingleplayerMode().
#define TEAM_CIVILIAN 0 |
Definition at line 61 of file q_shared.h.
Referenced by AI_CheckUsingDoor(), AI_CivilianCalcActionScore(), AI_CreatePlayer(), AI_SetCharacterValues(), AI_SetStats(), AIL_GetAIType(), AIL_Init(), CL_ActorAppear(), CL_ActorDie(), CL_ActorRevitalised(), CL_AddActor(), CL_AddTargetingBox(), CL_AddUGV(), CL_CountVisibleEnemies(), CL_EntPerish(), CL_NextAlien_f(), CL_PrevAlien_f(), CL_TeamDefInitMenu(), Com_ParseValue(), Com_SetValue(), Com_ValueToStr(), G_GetEquipmentForAISpawn(), G_GetTeam(), G_IsMoraleEnabled(), G_PrintActorStats(), G_SetTeamForPlayer(), G_SpawnEntities(), G_UpdateCharacterBodycount(), G_UpdateHitScore(), GAME_CP_Results(), GAME_MP_TeamNum_f(), GAME_SK_Results(), Edict::isOpponent(), LET_StartPathMove(), SP_civilian_start(), SP_civilian_target(), SP_worldspawn(), SVCmd_AI_Add_f(), SVCmd_Win_f(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), and GameTest::testCountSpawnpointsForMapInSingleplayerMode().
#define TEAM_MAX_HUMAN TEAM_ALIEN - 1 |
Definition at line 64 of file q_shared.h.
Referenced by CL_SpawnParseEntitystring(), G_GetTeam(), and GameTest::testCountSpawnpointsForMapInMultiplayerMode().
#define TEAM_NO_ACTIVE -1 |
Definition at line 60 of file q_shared.h.
Referenced by G_ClientTeamInfo(), G_ClientUserinfoChanged(), G_GetNextActiveTeam(), G_MatchIsRunning(), G_SendInvisible(), G_SetTeamForPlayer(), G_SpawnEntities(), GAME_MP_ParseTeamInfoMessage(), and SVC_TeamInfo().
#define TEAM_PHALANX 1 |
Definition at line 62 of file q_shared.h.
Referenced by AI_CivilianCalcActionScore(), AI_PlayerRun(), AIL_GetAIType(), AIL_Init(), CHRSH_CharGenAbilitySkills(), CL_ActorDie(), CL_ActorRevitalised(), Com_ParseValue(), Com_SetValue(), Com_ValueToStr(), CP_ParseCampaign(), G_GetTeam(), G_MissionGetTeamString(), G_UpdateCharacterBodycount(), GAME_CP_CampaignDescription_f(), SP_2x2_start(), SP_human_start(), SP_misc_mission(), and GameTest::testCountSpawnpointsForMapInSingleplayerMode().
#define WEIGHT_FACTOR 1000.0f |
Definition at line 285 of file q_shared.h.
Referenced by InventoryInterface::EquipActorNormal(), G_GetEarnedExperience(), HUD_UpdateActorLoad_f(), INV_ItemDescription(), INV_UpdateActorLoad_f(), and InventoryInterface::PackAmmoAndWeapon().
#define WEIGHT_HEAVY 0.5f |
Definition at line 282 of file q_shared.h.
#define WEIGHT_HEAVY_PENALTY 0.6f |
Definition at line 284 of file q_shared.h.
#define WEIGHT_LIGHT 0.2f |
Definition at line 281 of file q_shared.h.
#define WEIGHT_NORMAL_PENALTY 0.3f |
Definition at line 283 of file q_shared.h.
Referenced by HUD_UpdateActorLoad_f(), and INV_UpdateActorLoad_f().
The csi structure is the client-server-information structure which contains all the static data needed by the server and the client.
typedef struct cvarlist_s cvarlist_t |
typedef struct gametype_s gametype_t |
typedef int32_t shoot_types_t |
Available shoot types - also see the ST_
constants.
Definition at line 206 of file q_shared.h.
enum camera_type_t |
Enumerator | |
---|---|
CAMERA_MOBILE | |
CAMERA_STATIONARY | |
CAMERA_MAX | |
CAMERA_ENSURE_32BIT |
Definition at line 178 of file q_shared.h.
enum entity_type_t |
Definition at line 145 of file q_shared.h.
enum event_t |
Possible event values.
Definition at line 79 of file q_shared.h.
enum player_action_t |
Enumerator | |
---|---|
PA_NULL | |
PA_TURN | |
PA_MOVE | |
PA_STATE | |
PA_SHOOT | |
PA_USE | |
PA_INVMOVE | |
PA_REACT_SELECT | |
PA_RESERVE_STATE | |
PA_NUM_EVENTS |
Definition at line 189 of file q_shared.h.
Definition at line 64 of file cl_game_campaign.cpp.
References cgi, csi, cgame_import_s::csi, index, and csi_s::mds.
Referenced by Com_ParseMapDefinition(), GAME_GetCurrentSelectedMap(), and UI_MapInfoGetNext().
mapDef_t* Com_GetMapDefinitionByID | ( | const char * | mapDefID | ) |
Definition at line 3620 of file scripts.cpp.
References Com_DPrintf(), DEBUG_SHARED, mapDef_s::id, MapDef_Foreach, and Q_streq.
Definition at line 60 of file cl_game_campaign.cpp.
References cgi, csi, cgame_import_s::csi, and csi_s::numMDs.
void Com_Printf | ( | const char * | msg, |
... | |||
) |
void format | ( | __printf__ | , |
1 | , | ||
2 | |||
) |
Referenced by G_ClientAction().
void Sys_Error | ( | const char * | error, |
... | |||
) |
csi_t csi |
Definition at line 39 of file common.cpp.
Referenced by CL_ActorAdd(), CL_ActorAppear(), CL_CanMultiplayerStart(), CL_InitAfter(), CL_PrecacheCharacterModels(), CL_TeamDefInitMenu(), CL_ViewLoadMedia(), CL_ViewPrecacheModels(), Com_AddObjectLinks(), Com_GetBodyTemplateByID(), Com_GetCharacterTemplateByID(), Com_GetMapDefByIDX(), Com_GetMapDefNumber(), Com_GetNameListByID(), Com_GetTeamDefinitionByID(), Com_GetUGVByID(), Com_GetUGVByIDSilent(), Com_ParseActorNames(), Com_ParseArmourOrResistance(), Com_ParseBodyTemplate(), Com_ParseCharacterTemplate(), Com_ParseDamageTypes(), Com_ParseEquipment(), Com_ParseGameTypes(), Com_ParseImplant(), Com_ParseInventory(), Com_ParseItem(), Com_ParseMapDefinition(), Com_ParseScripts(), Com_ParseTeam(), Com_ParseTerrainDefinition(), Com_ParseUGVs(), Com_ParseValue(), Com_ValueToStr(), GAME_ChangeEquip(), GAME_GetImportData(), GAME_LoadItem(), GAME_SaveTeam(), GAME_SetMode(), GAME_Spawn(), GAME_SwitchCurrentSelectedMap(), INV_EquipmentDefSanityCheck(), INV_GetEquipmentDefinitionByID(), INV_ItemDescription(), INV_UpdateObject_f(), LE_AddProjectile(), LET_Projectile(), PR_UpdateProductionList(), ResetInventoryList(), RS_InitTree(), S_PrecacheSamples(), SV_InitGameProgs(), SV_Map(), TEST_F(), TEST_Init(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_ContainerItemIteratorNext(), UI_ContainerNodeUpdateEquipment(), UI_MapInfo(), UI_MapInfoGetNext(), UI_RequestMapList_f(), and UI_SelectMap_f().
const char* pa_format[PA_NUM_EVENTS] |
Player action format strings for netchannel transfer.
Definition at line 34 of file q_shared.cpp.
Referenced by G_ClientAction(), and MSG_Write_PA().