Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

bg_public.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  animation_s
struct  gitem_s
struct  pmove_t

Defines

#define ANIM_TOGGLEBIT   128
#define ARENAS_PER_TIER   4
#define ARMOR_PROTECTION   0.66
#define CROUCH_VIEWHEIGHT   12
#define CS_BOTINFO   25
#define CS_FLAGSTATUS   23
#define CS_GAME_VERSION   20
#define CS_INTERMISSION   22
#define CS_ITEMS   27
#define CS_LEVEL_START_TIME   21
#define CS_LOCATIONS   (CS_PLAYERS+MAX_CLIENTS)
#define CS_MAX   (CS_PARTICLES+MAX_LOCATIONS)
#define CS_MESSAGE   3
#define CS_MODELS   32
#define CS_MOTD   4
#define CS_MUSIC   2
#define CS_PARTICLES   (CS_LOCATIONS+MAX_LOCATIONS)
#define CS_PLAYERS   (CS_SOUNDS+MAX_SOUNDS)
#define CS_SCORES1   6
#define CS_SCORES2   7
#define CS_SHADERSTATE   24
#define CS_SOUNDS   (CS_MODELS+MAX_MODELS)
#define CS_TEAMVOTE_NO   18
#define CS_TEAMVOTE_STRING   14
#define CS_TEAMVOTE_TIME   12
#define CS_TEAMVOTE_YES   16
#define CS_VOTE_NO   11
#define CS_VOTE_STRING   9
#define CS_VOTE_TIME   8
#define CS_VOTE_YES   10
#define CS_WARMUP   5
#define DEAD_VIEWHEIGHT   -16
#define DEFAULT_GRAVITY   800
#define DEFAULT_SHOTGUN_COUNT   11
#define DEFAULT_SHOTGUN_SPREAD   700
#define DEFAULT_VIEWHEIGHT   26
#define DF_FIXED_FOV   16
#define DF_NO_FALLING   8
#define DF_NO_FOOTSTEPS   32
#define EF_AWARD_ASSIST   0x00020000
#define EF_AWARD_CAP   0x00000800
#define EF_AWARD_DEFEND   0x00010000
#define EF_AWARD_DENIED   0x00040000
#define EF_AWARD_EXCELLENT   0x00000008
#define EF_AWARD_GAUNTLET   0x00000040
#define EF_AWARD_IMPRESSIVE   0x00008000
#define EF_BOUNCE   0x00000010
#define EF_BOUNCE_HALF   0x00000020
#define EF_CONNECTION   0x00002000
#define EF_DEAD   0x00000001
#define EF_FIRING   0x00000100
#define EF_KAMIKAZE   0x00000200
#define EF_MOVER_STOP   0x00000400
#define EF_NODRAW   0x00000080
#define EF_PLAYER_EVENT   0x00000010
#define EF_TALK   0x00001000
#define EF_TEAMVOTED   0x00080000
#define EF_TELEPORT_BIT   0x00000004
#define EF_VOTED   0x00004000
#define EV_EVENT_BIT1   0x00000100
#define EV_EVENT_BIT2   0x00000200
#define EV_EVENT_BITS   (EV_EVENT_BIT1|EV_EVENT_BIT2)
#define EVENT_VALID_MSEC   300
#define GAME_VERSION   "baseq3-1"
#define GIB_HEALTH   -40
#define ITEM_INDEX(x)   ((x)-bg_itemlist)
#define ITEM_RADIUS   15
#define KAMI_BOOMSPHERE_MAXRADIUS   720
#define KAMI_BOOMSPHEREMODEL_RADIUS   72
#define KAMI_EXPLODE_STARTTIME   250
#define KAMI_IMPLODE_ENDTIME   2250
#define KAMI_IMPLODE_STARTTIME   2000
#define KAMI_SHOCKWAVE2_ENDTIME   3000
#define KAMI_SHOCKWAVE2_MAXRADIUS   704
#define KAMI_SHOCKWAVE2_STARTTIME   2000
#define KAMI_SHOCKWAVE2FADE_STARTTIME   2500
#define KAMI_SHOCKWAVE_ENDTIME   2000
#define KAMI_SHOCKWAVE_MAXRADIUS   1320
#define KAMI_SHOCKWAVE_STARTTIME   0
#define KAMI_SHOCKWAVEFADE_STARTTIME   1500
#define KAMI_SHOCKWAVEMODEL_RADIUS   88
#define LIGHTNING_RANGE   768
#define MASK_ALL   (-1)
#define MASK_DEADSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP)
#define MASK_OPAQUE   (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA)
#define MASK_PLAYERSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY)
#define MASK_SHOT   (CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_CORPSE)
#define MASK_SOLID   (CONTENTS_SOLID)
#define MASK_WATER   (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME)
#define MAX_ARENAS   1024
#define MAX_ARENAS_TEXT   8192
#define MAX_BOTS   1024
#define MAX_BOTS_TEXT   8192
#define MAX_ITEM_MODELS   4
#define MAX_ITEMS   256
#define MAXTOUCH   32
#define MINS_Z   -24
#define PLAYEREVENT_DENIEDREWARD   0x0001
#define PLAYEREVENT_GAUNTLETREWARD   0x0002
#define PLAYEREVENT_HOLYSHIT   0x0004
#define PMF_ALL_TIMES   (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
#define PMF_BACKWARDS_JUMP   8
#define PMF_BACKWARDS_RUN   16
#define PMF_DUCKED   1
#define PMF_FOLLOW   4096
#define PMF_GRAPPLE_PULL   2048
#define PMF_INVULEXPAND   16384
#define PMF_JUMP_HELD   2
#define PMF_RESPAWNED   512
#define PMF_SCOREBOARD   8192
#define PMF_TIME_KNOCKBACK   64
#define PMF_TIME_LAND   32
#define PMF_TIME_WATERJUMP   256
#define PMF_USE_ITEM_HELD   1024
#define RANK_TIED_FLAG   0x4000
#define SCORE_NOT_PRESENT   -9999
#define TEAM_LOCATION_UPDATE_TIME   1000
#define TEAM_MAXOVERLAY   32
#define VOTE_TIME   30000

Typedefs

typedef animation_s animation_t
typedef gitem_s gitem_t

Enumerations

enum  animNumber_t {
  BOTH_DEATH1, BOTH_DEAD1, BOTH_DEATH2, BOTH_DEAD2,
  BOTH_DEATH3, BOTH_DEAD3, TORSO_GESTURE, TORSO_ATTACK,
  TORSO_ATTACK2, TORSO_DROP, TORSO_RAISE, TORSO_STAND,
  TORSO_STAND2, LEGS_WALKCR, LEGS_WALK, LEGS_RUN,
  LEGS_BACK, LEGS_SWIM, LEGS_JUMP, LEGS_LAND,
  LEGS_JUMPB, LEGS_LANDB, LEGS_IDLE, LEGS_IDLECR,
  LEGS_TURN, TORSO_GETFLAG, TORSO_GUARDBASE, TORSO_PATROL,
  TORSO_FOLLOWME, TORSO_AFFIRMATIVE, TORSO_NEGATIVE, MAX_ANIMATIONS,
  LEGS_BACKCR, LEGS_BACKWALK, FLAG_RUN, FLAG_STAND,
  FLAG_STAND2RUN, MAX_TOTALANIMATIONS
}
enum  entity_event_t {
  EV_NONE, EV_FOOTSTEP, EV_FOOTSTEP_METAL, EV_FOOTSPLASH,
  EV_FOOTWADE, EV_SWIM, EV_STEP_4, EV_STEP_8,
  EV_STEP_12, EV_STEP_16, EV_FALL_SHORT, EV_FALL_MEDIUM,
  EV_FALL_FAR, EV_JUMP_PAD, EV_JUMP, EV_WATER_TOUCH,
  EV_WATER_LEAVE, EV_WATER_UNDER, EV_WATER_CLEAR, EV_ITEM_PICKUP,
  EV_GLOBAL_ITEM_PICKUP, EV_NOAMMO, EV_CHANGE_WEAPON, EV_FIRE_WEAPON,
  EV_USE_ITEM0, EV_USE_ITEM1, EV_USE_ITEM2, EV_USE_ITEM3,
  EV_USE_ITEM4, EV_USE_ITEM5, EV_USE_ITEM6, EV_USE_ITEM7,
  EV_USE_ITEM8, EV_USE_ITEM9, EV_USE_ITEM10, EV_USE_ITEM11,
  EV_USE_ITEM12, EV_USE_ITEM13, EV_USE_ITEM14, EV_USE_ITEM15,
  EV_ITEM_RESPAWN, EV_ITEM_POP, EV_PLAYER_TELEPORT_IN, EV_PLAYER_TELEPORT_OUT,
  EV_GRENADE_BOUNCE, EV_GENERAL_SOUND, EV_GLOBAL_SOUND, EV_GLOBAL_TEAM_SOUND,
  EV_BULLET_HIT_FLESH, EV_BULLET_HIT_WALL, EV_MISSILE_HIT, EV_MISSILE_MISS,
  EV_MISSILE_MISS_METAL, EV_RAILTRAIL, EV_SHOTGUN, EV_BULLET,
  EV_PAIN, EV_DEATH1, EV_DEATH2, EV_DEATH3,
  EV_OBITUARY, EV_POWERUP_QUAD, EV_POWERUP_BATTLESUIT, EV_POWERUP_REGEN,
  EV_GIB_PLAYER, EV_SCOREPLUM, EV_PROXIMITY_MINE_STICK, EV_PROXIMITY_MINE_TRIGGER,
  EV_KAMIKAZE, EV_OBELISKEXPLODE, EV_OBELISKPAIN, EV_INVUL_IMPACT,
  EV_JUICED, EV_LIGHTNINGBOLT, EV_DEBUG_LINE, EV_STOPLOOPINGSOUND,
  EV_TAUNT, EV_TAUNT_YES, EV_TAUNT_NO, EV_TAUNT_FOLLOWME,
  EV_TAUNT_GETFLAG, EV_TAUNT_GUARDBASE, EV_TAUNT_PATROL
}
enum  entityType_t {
  ET_GENERAL, ET_PLAYER, ET_ITEM, ET_MISSILE,
  ET_MOVER, ET_BEAM, ET_PORTAL, ET_SPEAKER,
  ET_PUSH_TRIGGER, ET_TELEPORT_TRIGGER, ET_INVISIBLE, ET_GRAPPLE,
  ET_TEAM, ET_EVENTS
}
enum  gametype_t {
  GT_FFA, GT_TOURNAMENT, GT_SINGLE_PLAYER, GT_TEAM,
  GT_CTF, GT_1FCTF, GT_OBELISK, GT_HARVESTER,
  GT_MAX_GAME_TYPE
}
enum  gender_t { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER }
enum  global_team_sound_t {
  GTS_RED_CAPTURE, GTS_BLUE_CAPTURE, GTS_RED_RETURN, GTS_BLUE_RETURN,
  GTS_RED_TAKEN, GTS_BLUE_TAKEN, GTS_REDOBELISK_ATTACKED, GTS_BLUEOBELISK_ATTACKED,
  GTS_REDTEAM_SCORED, GTS_BLUETEAM_SCORED, GTS_REDTEAM_TOOK_LEAD, GTS_BLUETEAM_TOOK_LEAD,
  GTS_TEAMS_ARE_TIED, GTS_KAMIKAZE
}
enum  holdable_t {
  HI_NONE, HI_TELEPORTER, HI_MEDKIT, HI_KAMIKAZE,
  HI_PORTAL, HI_INVULNERABILITY, HI_NUM_HOLDABLE
}
enum  itemType_t {
  IT_BAD, IT_WEAPON, IT_AMMO, IT_ARMOR,
  IT_HEALTH, IT_POWERUP, IT_HOLDABLE, IT_PERSISTANT_POWERUP,
  IT_TEAM
}
enum  meansOfDeath_t {
  MOD_UNKNOWN, MOD_SHOTGUN, MOD_GAUNTLET, MOD_MACHINEGUN,
  MOD_GRENADE, MOD_GRENADE_SPLASH, MOD_ROCKET, MOD_ROCKET_SPLASH,
  MOD_PLASMA, MOD_PLASMA_SPLASH, MOD_RAILGUN, MOD_LIGHTNING,
  MOD_BFG, MOD_BFG_SPLASH, MOD_WATER, MOD_SLIME,
  MOD_LAVA, MOD_CRUSH, MOD_TELEFRAG, MOD_FALLING,
  MOD_SUICIDE, MOD_TARGET_LASER, MOD_TRIGGER_HURT, MOD_GRAPPLE
}
enum  persEnum_t {
  PERS_SCORE, PERS_HITS, PERS_RANK, PERS_TEAM,
  PERS_SPAWN_COUNT, PERS_PLAYEREVENTS, PERS_ATTACKER, PERS_ATTACKEE_ARMOR,
  PERS_KILLED, PERS_IMPRESSIVE_COUNT, PERS_EXCELLENT_COUNT, PERS_DEFEND_COUNT,
  PERS_ASSIST_COUNT, PERS_GAUNTLET_FRAG_COUNT, PERS_CAPTURES
}
enum  pmtype_t {
  PM_NORMAL, PM_NOCLIP, PM_SPECTATOR, PM_DEAD,
  PM_FREEZE, PM_INTERMISSION, PM_SPINTERMISSION
}
enum  powerup_t {
  PW_NONE, PW_QUAD, PW_BATTLESUIT, PW_HASTE,
  PW_INVIS, PW_REGEN, PW_FLIGHT, PW_REDFLAG,
  PW_BLUEFLAG, PW_NEUTRALFLAG, PW_SCOUT, PW_GUARD,
  PW_DOUBLER, PW_AMMOREGEN, PW_INVULNERABILITY, PW_NUM_POWERUPS
}
enum  statIndex_t {
  STAT_HEALTH, STAT_HOLDABLE_ITEM, STAT_WEAPONS, STAT_ARMOR,
  STAT_DEAD_YAW, STAT_CLIENTS_READY, STAT_MAX_HEALTH
}
enum  team_t {
  TEAM_FREE, TEAM_RED, TEAM_BLUE, TEAM_SPECTATOR,
  TEAM_NUM_TEAMS
}
enum  teamtask_t {
  TEAMTASK_NONE, TEAMTASK_OFFENSE, TEAMTASK_DEFENSE, TEAMTASK_PATROL,
  TEAMTASK_FOLLOW, TEAMTASK_RETRIEVE, TEAMTASK_ESCORT, TEAMTASK_CAMP
}
enum  weapon_t {
  WP_NONE, WP_GAUNTLET, WP_MACHINEGUN, WP_SHOTGUN,
  WP_GRENADE_LAUNCHER, WP_ROCKET_LAUNCHER, WP_LIGHTNING, WP_RAILGUN,
  WP_PLASMAGUN, WP_BFG, WP_GRAPPLING_HOOK, WP_NUM_WEAPONS
}
enum  weaponstate_t { WEAPON_READY, WEAPON_RAISING, WEAPON_DROPPING, WEAPON_FIRING }

Functions

void BG_AddPredictableEventToPlayerstate (int newEvent, int eventParm, playerState_t *ps)
qboolean BG_CanItemBeGrabbed (int gametype, const entityState_t *ent, const playerState_t *ps)
void BG_EvaluateTrajectory (const trajectory_t *tr, int atTime, vec3_t result)
void BG_EvaluateTrajectoryDelta (const trajectory_t *tr, int atTime, vec3_t result)
gitem_tBG_FindItem (const char *pickupName)
gitem_tBG_FindItemForHoldable (holdable_t pw)
gitem_tBG_FindItemForPowerup (powerup_t pw)
gitem_tBG_FindItemForWeapon (weapon_t weapon)
void BG_PlayerStateToEntityState (playerState_t *ps, entityState_t *s, qboolean snap)
void BG_PlayerStateToEntityStateExtraPolate (playerState_t *ps, entityState_t *s, int time, qboolean snap)
qboolean BG_PlayerTouchesItem (playerState_t *ps, entityState_t *item, int atTime)
void BG_TouchJumpPad (playerState_t *ps, entityState_t *jumppad)
void PM_UpdateViewAngles (playerState_t *ps, const usercmd_t *cmd)
void Pmove (pmove_t *pmove)

Variables

gitem_t bg_itemlist []
int bg_numItems


Define Documentation

#define ANIM_TOGGLEBIT   128
 

Definition at line 541 of file bg_public.h.

#define ARENAS_PER_TIER   4
 

Definition at line 709 of file bg_public.h.

Referenced by UI_LoadArenas(), UI_SPLevelMenu_LevelEvent(), UI_SPLevelMenu_SetMenuItems(), and UI_SPPostgameMenu_MenuDraw().

#define ARMOR_PROTECTION   0.66
 

Definition at line 32 of file bg_public.h.

Referenced by CG_GetColorForHealth(), and CheckArmor().

#define CROUCH_VIEWHEIGHT   12
 

Definition at line 51 of file bg_public.h.

#define CS_BOTINFO   25
 

Definition at line 81 of file bg_public.h.

Referenced by BotSetInfoConfigString().

#define CS_FLAGSTATUS   23
 

Definition at line 79 of file bg_public.h.

Referenced by CG_SetConfigValues(), and Team_SetFlagStatus().

#define CS_GAME_VERSION   20
 

Definition at line 76 of file bg_public.h.

Referenced by CG_Init(), and SP_worldspawn().

#define CS_INTERMISSION   22
 

Definition at line 78 of file bg_public.h.

Referenced by LogExit().

#define CS_ITEMS   27
 

Definition at line 83 of file bg_public.h.

Referenced by CG_RegisterGraphics(), CG_RegisterSounds(), and SaveRegisteredItems().

#define CS_LEVEL_START_TIME   21
 

Definition at line 77 of file bg_public.h.

Referenced by CG_Init(), CG_SetConfigValues(), and SP_worldspawn().

#define CS_LOCATIONS   (CS_PLAYERS+MAX_CLIENTS)
 

Definition at line 88 of file bg_public.h.

Referenced by CG_DrawNewTeamInfo(), CG_DrawPlayerLocation(), CG_DrawSelectedPlayerLocation(), CG_DrawTeamOverlay(), and target_location_linkup().

#define CS_MAX   (CS_PARTICLES+MAX_LOCATIONS)
 

Definition at line 91 of file bg_public.h.

#define CS_MESSAGE   3
 

Definition at line 61 of file bg_public.h.

Referenced by CG_DrawInformation(), and SP_worldspawn().

#define CS_MODELS   32
 

Definition at line 85 of file bg_public.h.

#define CS_MOTD   4
 

Definition at line 62 of file bg_public.h.

Referenced by CG_DrawInformation(), CG_DrawOldTourneyScoreboard(), and SP_worldspawn().

#define CS_MUSIC   2
 

Definition at line 60 of file bg_public.h.

Referenced by CG_StartMusic(), and SP_worldspawn().

#define CS_PARTICLES   (CS_LOCATIONS+MAX_LOCATIONS)
 

Definition at line 89 of file bg_public.h.

#define CS_PLAYERS   (CS_SOUNDS+MAX_SOUNDS)
 

Definition at line 87 of file bg_public.h.

Referenced by BotFirstClientInRankings(), BotIsFirstInRankings(), BotIsLastInRankings(), BotIsObserver(), BotLastClientInRankings(), BotNumActivePlayers(), BotNumTeamMates(), BotRandomOpponentName(), BotSameTeam(), BotSortTeamMatesByBaseTravelTime(), BotTeam(), BotTeamOrders(), BotTeamplayReport(), BotUpdateInfoConfigStrings(), CG_ConfigStringModified(), CG_DrawAttacker(), CG_ForceModelChange(), CG_LoadingClient(), CG_NewClientInfo(), CG_Obituary(), CG_RegisterClients(), ClientDisconnect(), ClientFromName(), ClientName(), ClientOnSameTeamFromName(), ClientSkin(), ClientUserinfoChanged(), InGame_MenuInit(), NumPlayersOnSameTeam(), Prepname(), UI_BuildPlayerList(), UI_RemoveBotsMenu_GetBots(), UI_RemoveBotsMenu_SetBotNames(), UI_SPPostgameMenu_MenuDrawScoreLine(), UI_TeamOrdersMenu_BuildBotList(), and UI_TeamOrdersMenu_f().

#define CS_SCORES1   6
 

Definition at line 64 of file bg_public.h.

Referenced by CalculateRanks(), and CG_SetConfigValues().

#define CS_SCORES2   7
 

Definition at line 65 of file bg_public.h.

Referenced by CalculateRanks(), and CG_SetConfigValues().

#define CS_SHADERSTATE   24
 

Definition at line 80 of file bg_public.h.

Referenced by CG_ShaderStateChanged(), G_RemapTeamShaders(), and G_UseTargets().

#define CS_SOUNDS   (CS_MODELS+MAX_MODELS)
 

Definition at line 86 of file bg_public.h.

#define CS_TEAMVOTE_NO   18
 

Definition at line 74 of file bg_public.h.

Referenced by CG_ConfigStringModified(), Cmd_CallTeamVote_f(), and Cmd_TeamVote_f().

#define CS_TEAMVOTE_STRING   14
 

Definition at line 72 of file bg_public.h.

Referenced by CG_ConfigStringModified(), and Cmd_CallTeamVote_f().

#define CS_TEAMVOTE_TIME   12
 

Definition at line 71 of file bg_public.h.

Referenced by CG_ConfigStringModified(), CheckTeamVote(), and Cmd_CallTeamVote_f().

#define CS_TEAMVOTE_YES   16
 

Definition at line 73 of file bg_public.h.

Referenced by CG_ConfigStringModified(), Cmd_CallTeamVote_f(), and Cmd_TeamVote_f().

#define CS_VOTE_NO   11
 

Definition at line 69 of file bg_public.h.

Referenced by Cmd_CallVote_f(), and Cmd_Vote_f().

#define CS_VOTE_STRING   9
 

Definition at line 67 of file bg_public.h.

Referenced by Cmd_CallVote_f().

#define CS_VOTE_TIME   8
 

Definition at line 66 of file bg_public.h.

Referenced by CheckVote(), and Cmd_CallVote_f().

#define CS_VOTE_YES   10
 

Definition at line 68 of file bg_public.h.

Referenced by Cmd_CallVote_f(), and Cmd_Vote_f().

#define CS_WARMUP   5
 

Definition at line 63 of file bg_public.h.

Referenced by CG_ParseWarmup(), CG_SetConfigValues(), CheckTournament(), SP_worldspawn(), and SV_MapRestart_f().

#define DEAD_VIEWHEIGHT   -16
 

Definition at line 52 of file bg_public.h.

#define DEFAULT_GRAVITY   800
 

Definition at line 30 of file bg_public.h.

Referenced by BG_EvaluateTrajectory(), and BG_EvaluateTrajectoryDelta().

#define DEFAULT_SHOTGUN_COUNT   11
 

Definition at line 39 of file bg_public.h.

#define DEFAULT_SHOTGUN_SPREAD   700
 

Definition at line 38 of file bg_public.h.

Referenced by CG_ShotgunPattern(), and ShotgunPattern().

#define DEFAULT_VIEWHEIGHT   26
 

Definition at line 50 of file bg_public.h.

#define DF_FIXED_FOV   16
 

Definition at line 658 of file bg_public.h.

#define DF_NO_FALLING   8
 

Definition at line 657 of file bg_public.h.

#define DF_NO_FOOTSTEPS   32
 

Definition at line 659 of file bg_public.h.

#define EF_AWARD_ASSIST   0x00020000
 

Definition at line 262 of file bg_public.h.

Referenced by ClientThink_real(), player_die(), Team_FragBonuses(), Team_TouchOurFlag(), and weapon_railgun_fire().

#define EF_AWARD_CAP   0x00000800
 

Definition at line 256 of file bg_public.h.

#define EF_AWARD_DEFEND   0x00010000
 

Definition at line 261 of file bg_public.h.

Referenced by ClientThink_real(), player_die(), Team_FragBonuses(), Team_TouchOurFlag(), and weapon_railgun_fire().

#define EF_AWARD_DENIED   0x00040000
 

Definition at line 263 of file bg_public.h.

#define EF_AWARD_EXCELLENT   0x00000008
 

Definition at line 247 of file bg_public.h.

Referenced by ClientThink_real(), G_RankReward(), player_die(), Team_FragBonuses(), Team_TouchOurFlag(), and weapon_railgun_fire().

#define EF_AWARD_GAUNTLET   0x00000040
 

Definition at line 251 of file bg_public.h.

Referenced by ClientThink_real(), player_die(), Team_FragBonuses(), Team_TouchOurFlag(), and weapon_railgun_fire().

#define EF_AWARD_IMPRESSIVE   0x00008000
 

Definition at line 260 of file bg_public.h.

Referenced by ClientThink_real(), G_RankReward(), player_die(), Team_FragBonuses(), Team_TouchOurFlag(), and weapon_railgun_fire().

#define EF_BOUNCE   0x00000010
 

Definition at line 249 of file bg_public.h.

Referenced by G_MissileImpact().

#define EF_BOUNCE_HALF   0x00000020
 

Definition at line 250 of file bg_public.h.

#define EF_CONNECTION   0x00002000
 

Definition at line 258 of file bg_public.h.

#define EF_DEAD   0x00000001
 

Definition at line 242 of file bg_public.h.

#define EF_FIRING   0x00000100
 

Definition at line 253 of file bg_public.h.

#define EF_KAMIKAZE   0x00000200
 

Definition at line 254 of file bg_public.h.

#define EF_MOVER_STOP   0x00000400
 

Definition at line 255 of file bg_public.h.

#define EF_NODRAW   0x00000080
 

Definition at line 252 of file bg_public.h.

#define EF_PLAYER_EVENT   0x00000010
 

Definition at line 248 of file bg_public.h.

#define EF_TALK   0x00001000
 

Definition at line 257 of file bg_public.h.

#define EF_TEAMVOTED   0x00080000
 

Definition at line 264 of file bg_public.h.

#define EF_TELEPORT_BIT   0x00000004
 

Definition at line 246 of file bg_public.h.

Referenced by ClientSpawn().

#define EF_VOTED   0x00004000
 

Definition at line 259 of file bg_public.h.

Referenced by ClientSpawn(), and SpectatorClientEndFrame().

#define EV_EVENT_BIT1   0x00000100
 

Definition at line 341 of file bg_public.h.

#define EV_EVENT_BIT2   0x00000200
 

Definition at line 342 of file bg_public.h.

#define EV_EVENT_BITS   (EV_EVENT_BIT1|EV_EVENT_BIT2)
 

Definition at line 343 of file bg_public.h.

#define EVENT_VALID_MSEC   300
 

Definition at line 345 of file bg_public.h.

#define GAME_VERSION   "baseq3-1"
 

Definition at line 28 of file bg_public.h.

Referenced by CG_Init(), and SP_worldspawn().

#define GIB_HEALTH   -40
 

Definition at line 31 of file bg_public.h.

Referenced by body_die(), and player_die().

#define ITEM_INDEX  )     ((x)-bg_itemlist)
 

Definition at line 651 of file bg_public.h.

Referenced by CG_DrawFlagModel().

#define ITEM_RADIUS   15
 

Definition at line 41 of file bg_public.h.

Referenced by FinishSpawningItem(), and LaunchItem().

#define KAMI_BOOMSPHERE_MAXRADIUS   720
 

Definition at line 736 of file bg_public.h.

#define KAMI_BOOMSPHEREMODEL_RADIUS   72
 

Definition at line 733 of file bg_public.h.

#define KAMI_EXPLODE_STARTTIME   250
 

Definition at line 724 of file bg_public.h.

#define KAMI_IMPLODE_ENDTIME   2250
 

Definition at line 726 of file bg_public.h.

#define KAMI_IMPLODE_STARTTIME   2000
 

Definition at line 725 of file bg_public.h.

#define KAMI_SHOCKWAVE2_ENDTIME   3000
 

Definition at line 730 of file bg_public.h.

#define KAMI_SHOCKWAVE2_MAXRADIUS   704
 

Definition at line 737 of file bg_public.h.

#define KAMI_SHOCKWAVE2_STARTTIME   2000
 

Definition at line 728 of file bg_public.h.

#define KAMI_SHOCKWAVE2FADE_STARTTIME   2500
 

Definition at line 729 of file bg_public.h.

#define KAMI_SHOCKWAVE_ENDTIME   2000
 

Definition at line 722 of file bg_public.h.

#define KAMI_SHOCKWAVE_MAXRADIUS   1320
 

Definition at line 735 of file bg_public.h.

#define KAMI_SHOCKWAVE_STARTTIME   0
 

Definition at line 720 of file bg_public.h.

#define KAMI_SHOCKWAVEFADE_STARTTIME   1500
 

Definition at line 721 of file bg_public.h.

#define KAMI_SHOCKWAVEMODEL_RADIUS   88
 

Definition at line 732 of file bg_public.h.

#define LIGHTNING_RANGE   768
 

Definition at line 43 of file bg_public.h.

Referenced by CG_LightningBolt(), and Weapon_LightningFire().

#define MASK_ALL   (-1)
 

Definition at line 662 of file bg_public.h.

#define MASK_DEADSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP)
 

Definition at line 665 of file bg_public.h.

#define MASK_OPAQUE   (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA)
 

Definition at line 667 of file bg_public.h.

#define MASK_PLAYERSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY)
 

Definition at line 664 of file bg_public.h.

Referenced by BotExportTest(), CG_PlayerShadow(), CG_PredictPlayerState(), ClientThink_real(), G_RunItem(), and SpectatorThink().

#define MASK_SHOT   (CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_CORPSE)
 

Definition at line 668 of file bg_public.h.

Referenced by AINode_Seek_ActivateEntity(), BotAimAtEnemy(), BotCheckAttack(), BotClearPath(), BotFuncButtonActivateGoal(), Bullet_Fire(), CG_LightningBolt(), CG_ShotgunPellet(), CheckGauntletAttack(), ShotgunPellet(), Weapon_LightningFire(), and weapon_railgun_fire().

#define MASK_SOLID   (CONTENTS_SOLID)
 

Definition at line 663 of file bg_public.h.

#define MASK_WATER   (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME)
 

Definition at line 666 of file bg_public.h.

#define MAX_ARENAS   1024
 

Definition at line 710 of file bg_public.h.

Referenced by G_LoadArenasFromFile(), G_ParseInfos(), UI_LoadArenasFromFile(), and UI_ParseInfos().

#define MAX_ARENAS_TEXT   8192
 

Definition at line 711 of file bg_public.h.

Referenced by G_LoadArenasFromFile(), and UI_LoadArenasFromFile().

#define MAX_BOTS   1024
 

Definition at line 713 of file bg_public.h.

Referenced by G_LoadBotsFromFile(), and UI_LoadBotsFromFile().

#define MAX_BOTS_TEXT   8192
 

Definition at line 714 of file bg_public.h.

Referenced by G_LoadBotsFromFile(), and UI_LoadBotsFromFile().

#define MAX_ITEM_MODELS   4
 

Definition at line 624 of file bg_public.h.

#define MAX_ITEMS   256
 

Definition at line 34 of file bg_public.h.

#define MAXTOUCH   32
 

Definition at line 159 of file bg_public.h.

#define MINS_Z   -24
 

Definition at line 49 of file bg_public.h.

Referenced by PM_CheckDuck(), and PM_SetWaterLevel().

#define PLAYEREVENT_DENIEDREWARD   0x0001
 

Definition at line 328 of file bg_public.h.

#define PLAYEREVENT_GAUNTLETREWARD   0x0002
 

Definition at line 329 of file bg_public.h.

#define PLAYEREVENT_HOLYSHIT   0x0004
 

Definition at line 330 of file bg_public.h.

#define PMF_ALL_TIMES   (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
 

Definition at line 157 of file bg_public.h.

#define PMF_BACKWARDS_JUMP   8
 

Definition at line 145 of file bg_public.h.

#define PMF_BACKWARDS_RUN   16
 

Definition at line 146 of file bg_public.h.

#define PMF_DUCKED   1
 

Definition at line 143 of file bg_public.h.

#define PMF_FOLLOW   4096
 

Definition at line 153 of file bg_public.h.

#define PMF_GRAPPLE_PULL   2048
 

Definition at line 152 of file bg_public.h.

#define PMF_INVULEXPAND   16384
 

Definition at line 155 of file bg_public.h.

#define PMF_JUMP_HELD   2
 

Definition at line 144 of file bg_public.h.

#define PMF_RESPAWNED   512
 

Definition at line 150 of file bg_public.h.

#define PMF_SCOREBOARD   8192
 

Definition at line 154 of file bg_public.h.

#define PMF_TIME_KNOCKBACK   64
 

Definition at line 148 of file bg_public.h.

#define PMF_TIME_LAND   32
 

Definition at line 147 of file bg_public.h.

#define PMF_TIME_WATERJUMP   256
 

Definition at line 149 of file bg_public.h.

Referenced by PM_GroundTrace().

#define PMF_USE_ITEM_HELD   1024
 

Definition at line 151 of file bg_public.h.

#define RANK_TIED_FLAG   0x4000
 

Definition at line 36 of file bg_public.h.

Referenced by SpawnModelsOnVictoryPads().

#define SCORE_NOT_PRESENT   -9999
 

Definition at line 45 of file bg_public.h.

Referenced by CalculateRanks().

#define TEAM_LOCATION_UPDATE_TIME   1000
 

Definition at line 554 of file bg_public.h.

#define TEAM_MAXOVERLAY   32
 

Definition at line 557 of file bg_public.h.

#define VOTE_TIME   30000
 

Definition at line 47 of file bg_public.h.

Referenced by CG_DrawTeamVote(), and CG_DrawVote().


Typedef Documentation

typedef struct animation_s animation_t
 

Referenced by CG_ParseAnimationFile(), CG_RunLerpFrame(), CG_SetLerpFrameAnimation(), UI_ParseAnimationFile(), UI_RunLerpFrame(), and UI_SetLerpFrameAnimation().

typedef struct gitem_s gitem_t
 

Referenced by BG_CanItemBeGrabbed(), BG_FindItem(), BG_FindItemForHoldable(), BG_FindItemForPowerup(), BG_FindItemForWeapon(), CG_DrawAreaPowerUp(), CG_DrawBlueFlagStatus(), CG_DrawFlagModel(), CG_DrawNewTeamInfo(), CG_DrawPowerups(), CG_DrawRedFlagStatus(), CG_DrawScores(), CG_DrawSelectedPlayerPowerup(), CG_DrawTeamOverlay(), CG_EntityEvent(), CG_Item(), CG_LoadingItem(), CG_OneFlagStatus(), CG_RegisterItemSounds(), CG_RegisterItemVisuals(), CG_RegisterWeapon(), CG_TouchItem(), CG_UseItem(), ClientEvents(), Cmd_Give_f(), Controls_InitWeapons(), Drop_Item(), G_CallSpawn(), G_CheckTeamItems(), G_ItemDisabled(), G_SpawnItem(), LaunchItem(), RegisterItem(), TossClientItems(), and UI_PlayerInfo_SetWeapon().


Enumeration Type Documentation

enum animNumber_t
 

Enumeration values:
BOTH_DEATH1 
BOTH_DEAD1 
BOTH_DEATH2 
BOTH_DEAD2 
BOTH_DEATH3 
BOTH_DEAD3 
TORSO_GESTURE 
TORSO_ATTACK 
TORSO_ATTACK2 
TORSO_DROP 
TORSO_RAISE 
TORSO_STAND 
TORSO_STAND2 
LEGS_WALKCR 
LEGS_WALK 
LEGS_RUN 
LEGS_BACK 
LEGS_SWIM 
LEGS_JUMP 
LEGS_LAND 
LEGS_JUMPB 
LEGS_LANDB 
LEGS_IDLE 
LEGS_IDLECR 
LEGS_TURN 
TORSO_GETFLAG 
TORSO_GUARDBASE 
TORSO_PATROL 
TORSO_FOLLOWME 
TORSO_AFFIRMATIVE 
TORSO_NEGATIVE 
MAX_ANIMATIONS 
LEGS_BACKCR 
LEGS_BACKWALK 
FLAG_RUN 
FLAG_STAND 
FLAG_STAND2RUN 
MAX_TOTALANIMATIONS 

Definition at line 473 of file bg_public.h.

00473              {
00474     BOTH_DEATH1,
00475     BOTH_DEAD1,
00476     BOTH_DEATH2,
00477     BOTH_DEAD2,
00478     BOTH_DEATH3,
00479     BOTH_DEAD3,
00480 
00481     TORSO_GESTURE,
00482 
00483     TORSO_ATTACK,
00484     TORSO_ATTACK2,
00485 
00486     TORSO_DROP,
00487     TORSO_RAISE,
00488 
00489     TORSO_STAND,
00490     TORSO_STAND2,
00491 
00492     LEGS_WALKCR,
00493     LEGS_WALK,
00494     LEGS_RUN,
00495     LEGS_BACK,
00496     LEGS_SWIM,
00497 
00498     LEGS_JUMP,
00499     LEGS_LAND,
00500 
00501     LEGS_JUMPB,
00502     LEGS_LANDB,
00503 
00504     LEGS_IDLE,
00505     LEGS_IDLECR,
00506 
00507     LEGS_TURN,
00508 
00509     TORSO_GETFLAG,
00510     TORSO_GUARDBASE,
00511     TORSO_PATROL,
00512     TORSO_FOLLOWME,
00513     TORSO_AFFIRMATIVE,
00514     TORSO_NEGATIVE,
00515 
00516     MAX_ANIMATIONS,
00517 
00518     LEGS_BACKCR,
00519     LEGS_BACKWALK,
00520     FLAG_RUN,
00521     FLAG_STAND,
00522     FLAG_STAND2RUN,
00523 
00524     MAX_TOTALANIMATIONS
00525 } animNumber_t;

enum entity_event_t
 

Enumeration values:
EV_NONE 
EV_FOOTSTEP 
EV_FOOTSTEP_METAL 
EV_FOOTSPLASH 
EV_FOOTWADE 
EV_SWIM 
EV_STEP_4 
EV_STEP_8 
EV_STEP_12 
EV_STEP_16 
EV_FALL_SHORT 
EV_FALL_MEDIUM 
EV_FALL_FAR 
EV_JUMP_PAD 
EV_JUMP 
EV_WATER_TOUCH 
EV_WATER_LEAVE 
EV_WATER_UNDER 
EV_WATER_CLEAR 
EV_ITEM_PICKUP 
EV_GLOBAL_ITEM_PICKUP 
EV_NOAMMO 
EV_CHANGE_WEAPON 
EV_FIRE_WEAPON 
EV_USE_ITEM0 
EV_USE_ITEM1 
EV_USE_ITEM2 
EV_USE_ITEM3 
EV_USE_ITEM4 
EV_USE_ITEM5 
EV_USE_ITEM6 
EV_USE_ITEM7 
EV_USE_ITEM8 
EV_USE_ITEM9 
EV_USE_ITEM10 
EV_USE_ITEM11 
EV_USE_ITEM12 
EV_USE_ITEM13 
EV_USE_ITEM14 
EV_USE_ITEM15 
EV_ITEM_RESPAWN 
EV_ITEM_POP 
EV_PLAYER_TELEPORT_IN 
EV_PLAYER_TELEPORT_OUT 
EV_GRENADE_BOUNCE 
EV_GENERAL_SOUND 
EV_GLOBAL_SOUND 
EV_GLOBAL_TEAM_SOUND 
EV_BULLET_HIT_FLESH 
EV_BULLET_HIT_WALL 
EV_MISSILE_HIT 
EV_MISSILE_MISS 
EV_MISSILE_MISS_METAL 
EV_RAILTRAIL 
EV_SHOTGUN 
EV_BULLET 
EV_PAIN 
EV_DEATH1 
EV_DEATH2 
EV_DEATH3 
EV_OBITUARY 
EV_POWERUP_QUAD 
EV_POWERUP_BATTLESUIT 
EV_POWERUP_REGEN 
EV_GIB_PLAYER 
EV_SCOREPLUM 
EV_PROXIMITY_MINE_STICK 
EV_PROXIMITY_MINE_TRIGGER 
EV_KAMIKAZE 
EV_OBELISKEXPLODE 
EV_OBELISKPAIN 
EV_INVUL_IMPACT 
EV_JUICED 
EV_LIGHTNINGBOLT 
EV_DEBUG_LINE 
EV_STOPLOOPINGSOUND 
EV_TAUNT 
EV_TAUNT_YES 
EV_TAUNT_NO 
EV_TAUNT_FOLLOWME 
EV_TAUNT_GETFLAG 
EV_TAUNT_GUARDBASE 
EV_TAUNT_PATROL 

Definition at line 347 of file bg_public.h.

00347              {
00348     EV_NONE,
00349 
00350     EV_FOOTSTEP,
00351     EV_FOOTSTEP_METAL,
00352     EV_FOOTSPLASH,
00353     EV_FOOTWADE,
00354     EV_SWIM,
00355 
00356     EV_STEP_4,
00357     EV_STEP_8,
00358     EV_STEP_12,
00359     EV_STEP_16,
00360 
00361     EV_FALL_SHORT,
00362     EV_FALL_MEDIUM,
00363     EV_FALL_FAR,
00364 
00365     EV_JUMP_PAD,            // boing sound at origin, jump sound on player
00366 
00367     EV_JUMP,
00368     EV_WATER_TOUCH, // foot touches
00369     EV_WATER_LEAVE, // foot leaves
00370     EV_WATER_UNDER, // head touches
00371     EV_WATER_CLEAR, // head leaves
00372 
00373     EV_ITEM_PICKUP,         // normal item pickups are predictable
00374     EV_GLOBAL_ITEM_PICKUP,  // powerup / team sounds are broadcast to everyone
00375 
00376     EV_NOAMMO,
00377     EV_CHANGE_WEAPON,
00378     EV_FIRE_WEAPON,
00379 
00380     EV_USE_ITEM0,
00381     EV_USE_ITEM1,
00382     EV_USE_ITEM2,
00383     EV_USE_ITEM3,
00384     EV_USE_ITEM4,
00385     EV_USE_ITEM5,
00386     EV_USE_ITEM6,
00387     EV_USE_ITEM7,
00388     EV_USE_ITEM8,
00389     EV_USE_ITEM9,
00390     EV_USE_ITEM10,
00391     EV_USE_ITEM11,
00392     EV_USE_ITEM12,
00393     EV_USE_ITEM13,
00394     EV_USE_ITEM14,
00395     EV_USE_ITEM15,
00396 
00397     EV_ITEM_RESPAWN,
00398     EV_ITEM_POP,
00399     EV_PLAYER_TELEPORT_IN,
00400     EV_PLAYER_TELEPORT_OUT,
00401 
00402     EV_GRENADE_BOUNCE,      // eventParm will be the soundindex
00403 
00404     EV_GENERAL_SOUND,
00405     EV_GLOBAL_SOUND,        // no attenuation
00406     EV_GLOBAL_TEAM_SOUND,
00407 
00408     EV_BULLET_HIT_FLESH,
00409     EV_BULLET_HIT_WALL,
00410 
00411     EV_MISSILE_HIT,
00412     EV_MISSILE_MISS,
00413     EV_MISSILE_MISS_METAL,
00414     EV_RAILTRAIL,
00415     EV_SHOTGUN,
00416     EV_BULLET,              // otherEntity is the shooter
00417 
00418     EV_PAIN,
00419     EV_DEATH1,
00420     EV_DEATH2,
00421     EV_DEATH3,
00422     EV_OBITUARY,
00423 
00424     EV_POWERUP_QUAD,
00425     EV_POWERUP_BATTLESUIT,
00426     EV_POWERUP_REGEN,
00427 
00428     EV_GIB_PLAYER,          // gib a previously living player
00429     EV_SCOREPLUM,           // score plum
00430 
00431 //#ifdef MISSIONPACK
00432     EV_PROXIMITY_MINE_STICK,
00433     EV_PROXIMITY_MINE_TRIGGER,
00434     EV_KAMIKAZE,            // kamikaze explodes
00435     EV_OBELISKEXPLODE,      // obelisk explodes
00436     EV_OBELISKPAIN,         // obelisk is in pain
00437     EV_INVUL_IMPACT,        // invulnerability sphere impact
00438     EV_JUICED,              // invulnerability juiced effect
00439     EV_LIGHTNINGBOLT,       // lightning bolt bounced of invulnerability sphere
00440 //#endif
00441 
00442     EV_DEBUG_LINE,
00443     EV_STOPLOOPINGSOUND,
00444     EV_TAUNT,
00445     EV_TAUNT_YES,
00446     EV_TAUNT_NO,
00447     EV_TAUNT_FOLLOWME,
00448     EV_TAUNT_GETFLAG,
00449     EV_TAUNT_GUARDBASE,
00450     EV_TAUNT_PATROL
00451 
00452 } entity_event_t;

enum entityType_t
 

Enumeration values:
ET_GENERAL 
ET_PLAYER 
ET_ITEM 
ET_MISSILE 
ET_MOVER 
ET_BEAM 
ET_PORTAL 
ET_SPEAKER 
ET_PUSH_TRIGGER 
ET_TELEPORT_TRIGGER 
ET_INVISIBLE 
ET_GRAPPLE 
ET_TEAM 
ET_EVENTS 

Definition at line 674 of file bg_public.h.

00674              {
00675     ET_GENERAL,
00676     ET_PLAYER,
00677     ET_ITEM,
00678     ET_MISSILE,
00679     ET_MOVER,
00680     ET_BEAM,
00681     ET_PORTAL,
00682     ET_SPEAKER,
00683     ET_PUSH_TRIGGER,
00684     ET_TELEPORT_TRIGGER,
00685     ET_INVISIBLE,
00686     ET_GRAPPLE,             // grapple hooked on wall
00687     ET_TEAM,
00688 
00689     ET_EVENTS               // any of the EV_* events can be added freestanding
00690                             // by setting eType to ET_EVENTS + eventNum
00691                             // this avoids having to set eFlags and eventNum
00692 } entityType_t;

enum gametype_t
 

Enumeration values:
GT_FFA 
GT_TOURNAMENT 
GT_SINGLE_PLAYER 
GT_TEAM 
GT_CTF 
GT_1FCTF 
GT_OBELISK 
GT_HARVESTER 
GT_MAX_GAME_TYPE 

Definition at line 97 of file bg_public.h.

00097              {
00098     GT_FFA,             // free for all
00099     GT_TOURNAMENT,      // one on one tournament
00100     GT_SINGLE_PLAYER,   // single player ffa
00101 
00102     //-- team games go after this --
00103 
00104     GT_TEAM,            // team deathmatch
00105     GT_CTF,             // capture the flag
00106     GT_1FCTF,
00107     GT_OBELISK,
00108     GT_HARVESTER,
00109     GT_MAX_GAME_TYPE
00110 } gametype_t;

enum gender_t
 

Enumeration values:
GENDER_MALE 
GENDER_FEMALE 
GENDER_NEUTER 

Definition at line 112 of file bg_public.h.

Referenced by CG_Obituary().

00112 { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER } gender_t;

enum global_team_sound_t
 

Enumeration values:
GTS_RED_CAPTURE 
GTS_BLUE_CAPTURE 
GTS_RED_RETURN 
GTS_BLUE_RETURN 
GTS_RED_TAKEN 
GTS_BLUE_TAKEN 
GTS_REDOBELISK_ATTACKED 
GTS_BLUEOBELISK_ATTACKED 
GTS_REDTEAM_SCORED 
GTS_BLUETEAM_SCORED 
GTS_REDTEAM_TOOK_LEAD 
GTS_BLUETEAM_TOOK_LEAD 
GTS_TEAMS_ARE_TIED 
GTS_KAMIKAZE 

Definition at line 455 of file bg_public.h.

00455              {
00456     GTS_RED_CAPTURE,
00457     GTS_BLUE_CAPTURE,
00458     GTS_RED_RETURN,
00459     GTS_BLUE_RETURN,
00460     GTS_RED_TAKEN,
00461     GTS_BLUE_TAKEN,
00462     GTS_REDOBELISK_ATTACKED,
00463     GTS_BLUEOBELISK_ATTACKED,
00464     GTS_REDTEAM_SCORED,
00465     GTS_BLUETEAM_SCORED,
00466     GTS_REDTEAM_TOOK_LEAD,
00467     GTS_BLUETEAM_TOOK_LEAD,
00468     GTS_TEAMS_ARE_TIED,
00469     GTS_KAMIKAZE
00470 } global_team_sound_t;

enum holdable_t
 

Enumeration values:
HI_NONE 
HI_TELEPORTER 
HI_MEDKIT 
HI_KAMIKAZE 
HI_PORTAL 
HI_INVULNERABILITY 
HI_NUM_HOLDABLE 

Definition at line 291 of file bg_public.h.

00291              {
00292     HI_NONE,
00293 
00294     HI_TELEPORTER,
00295     HI_MEDKIT,
00296     HI_KAMIKAZE,
00297     HI_PORTAL,
00298     HI_INVULNERABILITY,
00299 
00300     HI_NUM_HOLDABLE
00301 } holdable_t;

enum itemType_t
 

Enumeration values:
IT_BAD 
IT_WEAPON 
IT_AMMO 
IT_ARMOR 
IT_HEALTH 
IT_POWERUP 
IT_HOLDABLE 
IT_PERSISTANT_POWERUP 
IT_TEAM 

Definition at line 610 of file bg_public.h.

00610              {
00611     IT_BAD,
00612     IT_WEAPON,              // EFX: rotate + upscale + minlight
00613     IT_AMMO,                // EFX: rotate
00614     IT_ARMOR,               // EFX: rotate + minlight
00615     IT_HEALTH,              // EFX: static external sphere + rotating internal
00616     IT_POWERUP,             // instant on, timer based
00617                             // EFX: rotate + external ring that rotates
00618     IT_HOLDABLE,            // single use, holdable item
00619                             // EFX: rotate + bob
00620     IT_PERSISTANT_POWERUP,
00621     IT_TEAM
00622 } itemType_t;

enum meansOfDeath_t
 

Enumeration values:
MOD_UNKNOWN 
MOD_SHOTGUN 
MOD_GAUNTLET 
MOD_MACHINEGUN 
MOD_GRENADE 
MOD_GRENADE_SPLASH 
MOD_ROCKET 
MOD_ROCKET_SPLASH 
MOD_PLASMA 
MOD_PLASMA_SPLASH 
MOD_RAILGUN 
MOD_LIGHTNING 
MOD_BFG 
MOD_BFG_SPLASH 
MOD_WATER 
MOD_SLIME 
MOD_LAVA 
MOD_CRUSH 
MOD_TELEFRAG 
MOD_FALLING 
MOD_SUICIDE 
MOD_TARGET_LASER 
MOD_TRIGGER_HURT 
MOD_GRAPPLE 

Definition at line 572 of file bg_public.h.

00572              {
00573     MOD_UNKNOWN,
00574     MOD_SHOTGUN,
00575     MOD_GAUNTLET,
00576     MOD_MACHINEGUN,
00577     MOD_GRENADE,
00578     MOD_GRENADE_SPLASH,
00579     MOD_ROCKET,
00580     MOD_ROCKET_SPLASH,
00581     MOD_PLASMA,
00582     MOD_PLASMA_SPLASH,
00583     MOD_RAILGUN,
00584     MOD_LIGHTNING,
00585     MOD_BFG,
00586     MOD_BFG_SPLASH,
00587     MOD_WATER,
00588     MOD_SLIME,
00589     MOD_LAVA,
00590     MOD_CRUSH,
00591     MOD_TELEFRAG,
00592     MOD_FALLING,
00593     MOD_SUICIDE,
00594     MOD_TARGET_LASER,
00595     MOD_TRIGGER_HURT,
00596 #ifdef MISSIONPACK
00597     MOD_NAIL,
00598     MOD_CHAINGUN,
00599     MOD_PROXIMITY_MINE,
00600     MOD_KAMIKAZE,
00601     MOD_JUICED,
00602 #endif
00603     MOD_GRAPPLE
00604 } meansOfDeath_t;

enum persEnum_t
 

Enumeration values:
PERS_SCORE 
PERS_HITS 
PERS_RANK 
PERS_TEAM 
PERS_SPAWN_COUNT 
PERS_PLAYEREVENTS 
PERS_ATTACKER 
PERS_ATTACKEE_ARMOR 
PERS_KILLED 
PERS_IMPRESSIVE_COUNT 
PERS_EXCELLENT_COUNT 
PERS_DEFEND_COUNT 
PERS_ASSIST_COUNT 
PERS_GAUNTLET_FRAG_COUNT 
PERS_CAPTURES 

Definition at line 221 of file bg_public.h.

00221              {
00222     PERS_SCORE,                     // !!! MUST NOT CHANGE, SERVER AND GAME BOTH REFERENCE !!!
00223     PERS_HITS,                      // total points damage inflicted so damage beeps can sound on change
00224     PERS_RANK,                      // player rank or team rank
00225     PERS_TEAM,                      // player team
00226     PERS_SPAWN_COUNT,               // incremented every respawn
00227     PERS_PLAYEREVENTS,              // 16 bits that can be flipped for events
00228     PERS_ATTACKER,                  // clientnum of last damage inflicter
00229     PERS_ATTACKEE_ARMOR,            // health/armor of last person we attacked
00230     PERS_KILLED,                    // count of the number of times you died
00231     // player awards tracking
00232     PERS_IMPRESSIVE_COUNT,          // two railgun hits in a row
00233     PERS_EXCELLENT_COUNT,           // two successive kills in a short amount of time
00234     PERS_DEFEND_COUNT,              // defend awards
00235     PERS_ASSIST_COUNT,              // assist awards
00236     PERS_GAUNTLET_FRAG_COUNT,       // kills with the guantlet
00237     PERS_CAPTURES                   // captures
00238 } persEnum_t;

enum pmtype_t
 

Enumeration values:
PM_NORMAL 
PM_NOCLIP 
PM_SPECTATOR 
PM_DEAD 
PM_FREEZE 
PM_INTERMISSION 
PM_SPINTERMISSION 

Definition at line 125 of file bg_public.h.

00125              {
00126     PM_NORMAL,      // can accelerate and turn
00127     PM_NOCLIP,      // noclip movement
00128     PM_SPECTATOR,   // still run into walls
00129     PM_DEAD,        // no acceleration or turning, but free falling
00130     PM_FREEZE,      // stuck in place with no control
00131     PM_INTERMISSION,    // no movement or status bar
00132     PM_SPINTERMISSION   // no movement or status bar
00133 } pmtype_t;

enum powerup_t
 

Enumeration values:
PW_NONE 
PW_QUAD 
PW_BATTLESUIT 
PW_HASTE 
PW_INVIS 
PW_REGEN 
PW_FLIGHT 
PW_REDFLAG 
PW_BLUEFLAG 
PW_NEUTRALFLAG 
PW_SCOUT 
PW_GUARD 
PW_DOUBLER 
PW_AMMOREGEN 
PW_INVULNERABILITY 
PW_NUM_POWERUPS 

Definition at line 267 of file bg_public.h.

00267              {
00268     PW_NONE,
00269 
00270     PW_QUAD,
00271     PW_BATTLESUIT,
00272     PW_HASTE,
00273     PW_INVIS,
00274     PW_REGEN,
00275     PW_FLIGHT,
00276 
00277     PW_REDFLAG,
00278     PW_BLUEFLAG,
00279     PW_NEUTRALFLAG,
00280 
00281     PW_SCOUT,
00282     PW_GUARD,
00283     PW_DOUBLER,
00284     PW_AMMOREGEN,
00285     PW_INVULNERABILITY,
00286 
00287     PW_NUM_POWERUPS
00288 
00289 } powerup_t;

enum statIndex_t
 

Enumeration values:
STAT_HEALTH 
STAT_HOLDABLE_ITEM 
STAT_WEAPONS 
STAT_ARMOR 
STAT_DEAD_YAW 
STAT_CLIENTS_READY 
STAT_MAX_HEALTH 

Definition at line 203 of file bg_public.h.

00203              {
00204     STAT_HEALTH,
00205     STAT_HOLDABLE_ITEM,
00206 #ifdef MISSIONPACK
00207     STAT_PERSISTANT_POWERUP,
00208 #endif
00209     STAT_WEAPONS,                   // 16 bit fields
00210     STAT_ARMOR,             
00211     STAT_DEAD_YAW,                  // look this direction when dead (FIXME: get rid of?)
00212     STAT_CLIENTS_READY,             // bit mask of clients wishing to exit the intermission (FIXME: configstring?)
00213     STAT_MAX_HEALTH                 // health / armor limit, changable by handicap
00214 } statIndex_t;

enum team_t
 

Enumeration values:
TEAM_FREE 
TEAM_RED 
TEAM_BLUE 
TEAM_SPECTATOR 
TEAM_NUM_TEAMS 

Definition at line 544 of file bg_public.h.

Referenced by PickTeam(), and TeamCount().

00544              {
00545     TEAM_FREE,
00546     TEAM_RED,
00547     TEAM_BLUE,
00548     TEAM_SPECTATOR,
00549 
00550     TEAM_NUM_TEAMS
00551 } team_t;

enum teamtask_t
 

Enumeration values:
TEAMTASK_NONE 
TEAMTASK_OFFENSE 
TEAMTASK_DEFENSE 
TEAMTASK_PATROL 
TEAMTASK_FOLLOW 
TEAMTASK_RETRIEVE 
TEAMTASK_ESCORT 
TEAMTASK_CAMP 

Definition at line 560 of file bg_public.h.

00560              {
00561     TEAMTASK_NONE,
00562     TEAMTASK_OFFENSE, 
00563     TEAMTASK_DEFENSE,
00564     TEAMTASK_PATROL,
00565     TEAMTASK_FOLLOW,
00566     TEAMTASK_RETRIEVE,
00567     TEAMTASK_ESCORT,
00568     TEAMTASK_CAMP
00569 } teamtask_t;

enum weapon_t
 

Enumeration values:
WP_NONE 
WP_GAUNTLET 
WP_MACHINEGUN 
WP_SHOTGUN 
WP_GRENADE_LAUNCHER 
WP_ROCKET_LAUNCHER 
WP_LIGHTNING 
WP_RAILGUN 
WP_PLASMAGUN 
WP_BFG 
WP_GRAPPLING_HOOK 
WP_NUM_WEAPONS 

Definition at line 304 of file bg_public.h.

Referenced by CG_AddPlayerWeapon(), and UI_PlayerInfo_SetInfo().

00304              {
00305     WP_NONE,
00306 
00307     WP_GAUNTLET,
00308     WP_MACHINEGUN,
00309     WP_SHOTGUN,
00310     WP_GRENADE_LAUNCHER,
00311     WP_ROCKET_LAUNCHER,
00312     WP_LIGHTNING,
00313     WP_RAILGUN,
00314     WP_PLASMAGUN,
00315     WP_BFG,
00316     WP_GRAPPLING_HOOK,
00317 #ifdef MISSIONPACK
00318     WP_NAILGUN,
00319     WP_PROX_LAUNCHER,
00320     WP_CHAINGUN,
00321 #endif
00322 
00323     WP_NUM_WEAPONS
00324 } weapon_t;

enum weaponstate_t
 

Enumeration values:
WEAPON_READY 
WEAPON_RAISING 
WEAPON_DROPPING 
WEAPON_FIRING 

Definition at line 135 of file bg_public.h.

00135              {
00136     WEAPON_READY, 
00137     WEAPON_RAISING,
00138     WEAPON_DROPPING,
00139     WEAPON_FIRING
00140 } weaponstate_t;


Function Documentation

void BG_AddPredictableEventToPlayerstate int  newEvent,
int  eventParm,
playerState_t ps
 

Definition at line 1390 of file bg_misc.c.

References atof(), Com_Printf(), eventnames, playerState_s::eventParms, playerState_s::events, playerState_s::eventSequence, MAX_PS_EVENTS, playerState_t, playerState_s::pmove_framecount, and trap_Cvar_VariableStringBuffer().

Referenced by BG_TouchJumpPad(), CG_TouchItem(), G_AddPredictableEvent(), and PM_AddEvent().

01390                                                                                            {
01391 
01392 #ifdef _DEBUG
01393     {
01394         char buf[256];
01395         trap_Cvar_VariableStringBuffer("showevents", buf, sizeof(buf));
01396         if ( atof(buf) != 0 ) {
01397 #ifdef QAGAME
01398             Com_Printf(" game event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm);
01399 #else
01400             Com_Printf("Cgame event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm);
01401 #endif
01402         }
01403     }
01404 #endif
01405     ps->events[ps->eventSequence & (MAX_PS_EVENTS-1)] = newEvent;
01406     ps->eventParms[ps->eventSequence & (MAX_PS_EVENTS-1)] = eventParm;
01407     ps->eventSequence++;
01408 }

Here is the call graph for this function:

qboolean BG_CanItemBeGrabbed int  gametype,
const entityState_t ent,
const playerState_t ps
 

Definition at line 1039 of file bg_misc.c.

References playerState_s::ammo, bg_itemlist, Com_Error(), Com_Printf(), entityState_t, ERR_DROP, gametype, entityState_s::generic1, gitem_s::giTag, gitem_t, gitem_s::giType, IT_AMMO, IT_ARMOR, IT_BAD, IT_HEALTH, IT_HOLDABLE, IT_PERSISTANT_POWERUP, IT_POWERUP, IT_TEAM, IT_WEAPON, entityState_s::modelindex, entityState_s::modelindex2, playerState_s::persistant, playerState_t, playerState_s::powerups, PW_BLUEFLAG, PW_REDFLAG, qboolean, gitem_s::quantity, and playerState_s::stats.

Referenced by CG_TouchItem(), and Touch_Item().

01039                                                                                                 {
01040     gitem_t *item;
01041 #ifdef MISSIONPACK
01042     int     upperBound;
01043 #endif
01044 
01045     if ( ent->modelindex < 1 || ent->modelindex >= bg_numItems ) {
01046         Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: index out of range" );
01047     }
01048 
01049     item = &bg_itemlist[ent->modelindex];
01050 
01051     switch( item->giType ) {
01052     case IT_WEAPON:
01053         return qtrue;   // weapons are always picked up
01054 
01055     case IT_AMMO:
01056         if ( ps->ammo[ item->giTag ] >= 200 ) {
01057             return qfalse;      // can't hold any more
01058         }
01059         return qtrue;
01060 
01061     case IT_ARMOR:
01062 #ifdef MISSIONPACK
01063         if( bg_itemlist[ps->stats[STAT_PERSISTANT_POWERUP]].giTag == PW_SCOUT ) {
01064             return qfalse;
01065         }
01066 
01067         // we also clamp armor to the maxhealth for handicapping
01068         if( bg_itemlist[ps->stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) {
01069             upperBound = ps->stats[STAT_MAX_HEALTH];
01070         }
01071         else {
01072             upperBound = ps->stats[STAT_MAX_HEALTH] * 2;
01073         }
01074 
01075         if ( ps->stats[STAT_ARMOR] >= upperBound ) {
01076             return qfalse;
01077         }
01078 #else
01079         if ( ps->stats[STAT_ARMOR] >= ps->stats[STAT_MAX_HEALTH] * 2 ) {
01080             return qfalse;
01081         }
01082 #endif
01083         return qtrue;
01084 
01085     case IT_HEALTH:
01086         // small and mega healths will go over the max, otherwise
01087         // don't pick up if already at max
01088 #ifdef MISSIONPACK
01089         if( bg_itemlist[ps->stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) {
01090             upperBound = ps->stats[STAT_MAX_HEALTH];
01091         }
01092         else
01093 #endif
01094         if ( item->quantity == 5 || item->quantity == 100 ) {
01095             if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] * 2 ) {
01096                 return qfalse;
01097             }
01098             return qtrue;
01099         }
01100 
01101         if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] ) {
01102             return qfalse;
01103         }
01104         return qtrue;
01105 
01106     case IT_POWERUP:
01107         return qtrue;   // powerups are always picked up
01108 
01109 #ifdef MISSIONPACK
01110     case IT_PERSISTANT_POWERUP:
01111         // can only hold one item at a time
01112         if ( ps->stats[STAT_PERSISTANT_POWERUP] ) {
01113             return qfalse;
01114         }
01115 
01116         // check team only
01117         if( ( ent->generic1 & 2 ) && ( ps->persistant[PERS_TEAM] != TEAM_RED ) ) {
01118             return qfalse;
01119         }
01120         if( ( ent->generic1 & 4 ) && ( ps->persistant[PERS_TEAM] != TEAM_BLUE ) ) {
01121             return qfalse;
01122         }
01123 
01124         return qtrue;
01125 #endif
01126 
01127     case IT_TEAM: // team items, such as flags
01128 #ifdef MISSIONPACK      
01129         if( gametype == GT_1FCTF ) {
01130             // neutral flag can always be picked up
01131             if( item->giTag == PW_NEUTRALFLAG ) {
01132                 return qtrue;
01133             }
01134             if (ps->persistant[PERS_TEAM] == TEAM_RED) {
01135                 if (item->giTag == PW_BLUEFLAG  && ps->powerups[PW_NEUTRALFLAG] ) {
01136                     return qtrue;
01137                 }
01138             } else if (ps->persistant[PERS_TEAM] == TEAM_BLUE) {
01139                 if (item->giTag == PW_REDFLAG  && ps->powerups[PW_NEUTRALFLAG] ) {
01140                     return qtrue;
01141                 }
01142             }
01143         }
01144 #endif
01145         if( gametype == GT_CTF ) {
01146             // ent->modelindex2 is non-zero on items if they are dropped
01147             // we need to know this because we can pick up our dropped flag (and return it)
01148             // but we can't pick up our flag at base
01149             if (ps->persistant[PERS_TEAM] == TEAM_RED) {
01150                 if (item->giTag == PW_BLUEFLAG ||
01151                     (item->giTag == PW_REDFLAG && ent->modelindex2) ||
01152                     (item->giTag == PW_REDFLAG && ps->powerups[PW_BLUEFLAG]) )
01153                     return qtrue;
01154             } else if (ps->persistant[PERS_TEAM] == TEAM_BLUE) {
01155                 if (item->giTag == PW_REDFLAG ||
01156                     (item->giTag == PW_BLUEFLAG && ent->modelindex2) ||
01157                     (item->giTag == PW_BLUEFLAG && ps->powerups[PW_REDFLAG]) )
01158                     return qtrue;
01159             }
01160         }
01161 
01162 #ifdef MISSIONPACK
01163         if( gametype == GT_HARVESTER ) {
01164             return qtrue;
01165         }
01166 #endif
01167         return qfalse;
01168 
01169     case IT_HOLDABLE:
01170         // can only hold one item at a time
01171         if ( ps->stats[STAT_HOLDABLE_ITEM] ) {
01172             return qfalse;
01173         }
01174         return qtrue;
01175 
01176         case IT_BAD:
01177             Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: IT_BAD" );
01178         default:
01179 #ifndef Q3_VM
01180 #ifndef NDEBUG // bk0001204
01181           Com_Printf("BG_CanItemBeGrabbed: unknown enum %d\n", item->giType );
01182 #endif
01183 #endif
01184          break;
01185     }
01186 
01187     return qfalse;
01188 }

Here is the call graph for this function:

void BG_EvaluateTrajectory const trajectory_t tr,
int  atTime,
vec3_t  result
 

Definition at line 1198 of file bg_misc.c.

References Com_Error(), DEFAULT_GRAVITY, ERR_DROP, M_PI, sin(), tr, TR_GRAVITY, TR_INTERPOLATE, TR_LINEAR, TR_LINEAR_STOP, TR_SINE, TR_STATIONARY, VectorCopy, and VectorMA.

Referenced by BG_PlayerTouchesItem(), CG_AddFragment(), CG_AddMoveScaleFade(), CG_AdjustPositionForMover(), CG_BloodTrail(), CG_CalcEntityLerpPositions(), CG_CheckEvents(), CG_ClipMoveToEntities(), CG_GrappleTrail(), CG_InterpolateEntityPosition(), CG_PlasmaTrail(), CG_ResetPlayerEntity(), CG_RocketTrail(), G_ExplodeMissile(), G_MoverTeam(), G_RunItem(), G_RunMissile(), and SetMoverState().

01198                                                                                 {
01199     float       deltaTime;
01200     float       phase;
01201 
01202     switch( tr->trType ) {
01203     case TR_STATIONARY:
01204     case TR_INTERPOLATE:
01205         VectorCopy( tr->trBase, result );
01206         break;
01207     case TR_LINEAR:
01208         deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
01209         VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
01210         break;
01211     case TR_SINE:
01212         deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration;
01213         phase = sin( deltaTime * M_PI * 2 );
01214         VectorMA( tr->trBase, phase, tr->trDelta, result );
01215         break;
01216     case TR_LINEAR_STOP:
01217         if ( atTime > tr->trTime + tr->trDuration ) {
01218             atTime = tr->trTime + tr->trDuration;
01219         }
01220         deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
01221         if ( deltaTime < 0 ) {
01222             deltaTime = 0;
01223         }
01224         VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
01225         break;
01226     case TR_GRAVITY:
01227         deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
01228         VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
01229         result[2] -= 0.5 * DEFAULT_GRAVITY * deltaTime * deltaTime;     // FIXME: local gravity...
01230         break;
01231     default:
01232         Com_Error( ERR_DROP, "BG_EvaluateTrajectory: unknown trType: %i", tr->trTime );
01233         break;
01234     }
01235 }

Here is the call graph for this function:

void BG_EvaluateTrajectoryDelta const trajectory_t tr,
int  atTime,
vec3_t  result
 

Definition at line 1244 of file bg_misc.c.

References Com_Error(), cos(), DEFAULT_GRAVITY, ERR_DROP, M_PI, tr, TR_GRAVITY, TR_INTERPOLATE, TR_LINEAR, TR_LINEAR_STOP, TR_SINE, TR_STATIONARY, VectorClear, VectorCopy, and VectorScale.

Referenced by CG_Missile(), CG_ReflectVelocity(), G_BounceItem(), G_BounceMissile(), and G_MissileImpact().

01244                                                                                      {
01245     float   deltaTime;
01246     float   phase;
01247 
01248     switch( tr->trType ) {
01249     case TR_STATIONARY:
01250     case TR_INTERPOLATE:
01251         VectorClear( result );
01252         break;
01253     case TR_LINEAR:
01254         VectorCopy( tr->trDelta, result );
01255         break;
01256     case TR_SINE:
01257         deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration;
01258         phase = cos( deltaTime * M_PI * 2 );    // derivative of sin = cos
01259         phase *= 0.5;
01260         VectorScale( tr->trDelta, phase, result );
01261         break;
01262     case TR_LINEAR_STOP:
01263         if ( atTime > tr->trTime + tr->trDuration ) {
01264             VectorClear( result );
01265             return;
01266         }
01267         VectorCopy( tr->trDelta, result );
01268         break;
01269     case TR_GRAVITY:
01270         deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
01271         VectorCopy( tr->trDelta, result );
01272         result[2] -= DEFAULT_GRAVITY * deltaTime;       // FIXME: local gravity...
01273         break;
01274     default:
01275         Com_Error( ERR_DROP, "BG_EvaluateTrajectoryDelta: unknown trType: %i", tr->trTime );
01276         break;
01277     }
01278 }

Here is the call graph for this function:

gitem_t* BG_FindItem const char *  pickupName  ) 
 

Definition at line 992 of file bg_misc.c.

References bg_itemlist, gitem_s::classname, gitem_t, gitem_s::pickup_name, and Q_stricmp().

Referenced by ClearRegisteredItems(), ClientEvents(), Cmd_Give_f(), and G_CheckTeamItems().

00992                                                {
00993     gitem_t *it;
00994     
00995     for ( it = bg_itemlist + 1 ; it->classname ; it++ ) {
00996         if ( !Q_stricmp( it->pickup_name, pickupName ) )
00997             return it;
00998     }
00999 
01000     return NULL;
01001 }

Here is the call graph for this function:

gitem_t* BG_FindItemForHoldable holdable_t  pw  ) 
 

Definition at line 952 of file bg_misc.c.

References bg_itemlist, Com_Error(), ERR_DROP, gitem_s::giTag, gitem_t, gitem_s::giType, i, and IT_HOLDABLE.

Referenced by CG_UseItem().

00952                                                  {
00953     int     i;
00954 
00955     for ( i = 0 ; i < bg_numItems ; i++ ) {
00956         if ( bg_itemlist[i].giType == IT_HOLDABLE && bg_itemlist[i].giTag == pw ) {
00957             return &bg_itemlist[i];
00958         }
00959     }
00960 
00961     Com_Error( ERR_DROP, "HoldableItem not found" );
00962 
00963     return NULL;
00964 }

Here is the call graph for this function:

gitem_t* BG_FindItemForPowerup powerup_t  pw  ) 
 

Definition at line 931 of file bg_misc.c.

References bg_itemlist, gitem_s::giTag, gitem_t, gitem_s::giType, i, IT_POWERUP, and IT_TEAM.

Referenced by CG_DrawAreaPowerUp(), CG_DrawBlueFlagStatus(), CG_DrawFlagModel(), CG_DrawNewTeamInfo(), CG_DrawPowerups(), CG_DrawRedFlagStatus(), CG_DrawScores(), CG_DrawSelectedPlayerPowerup(), CG_DrawTeamOverlay(), CG_OneFlagStatus(), ClientEvents(), and TossClientItems().

00931                                                {
00932     int     i;
00933 
00934     for ( i = 0 ; i < bg_numItems ; i++ ) {
00935         if ( (bg_itemlist[i].giType == IT_POWERUP || 
00936                     bg_itemlist[i].giType == IT_TEAM ||
00937                     bg_itemlist[i].giType == IT_PERSISTANT_POWERUP) && 
00938             bg_itemlist[i].giTag == pw ) {
00939             return &bg_itemlist[i];
00940         }
00941     }
00942 
00943     return NULL;
00944 }

gitem_t* BG_FindItemForWeapon weapon_t  weapon  ) 
 

Definition at line 973 of file bg_misc.c.

References bg_itemlist, gitem_s::classname, Com_Error(), ERR_DROP, gitem_s::giTag, gitem_t, gitem_s::giType, and IT_WEAPON.

Referenced by ClearRegisteredItems(), InitShooter(), and TossClientItems().

00973                                                  {
00974     gitem_t *it;
00975     
00976     for ( it = bg_itemlist + 1 ; it->classname ; it++) {
00977         if ( it->giType == IT_WEAPON && it->giTag == weapon ) {
00978             return it;
00979         }
00980     }
00981 
00982     Com_Error( ERR_DROP, "Couldn't find item for weapon %i", weapon);
00983     return NULL;
00984 }

Here is the call graph for this function:

void BG_PlayerStateToEntityState playerState_t ps,
entityState_t s,
qboolean  snap
 

Definition at line 1458 of file bg_misc.c.

References entityState_s::angles2, entityState_s::apos, entityState_s::clientNum, playerState_s::clientNum, playerState_s::eFlags, entityState_s::eFlags, playerState_s::entityEventSequence, entityState_t, entityState_s::eType, entityState_s::event, entityState_s::eventParm, playerState_s::eventParms, playerState_s::events, playerState_s::eventSequence, playerState_s::externalEvent, playerState_s::externalEventParm, playerState_s::generic1, entityState_s::generic1, playerState_s::groundEntityNum, entityState_s::groundEntityNum, i, playerState_s::legsAnim, entityState_s::legsAnim, playerState_s::loopSound, entityState_s::loopSound, MAX_PS_EVENTS, playerState_s::movementDir, entityState_s::number, playerState_s::origin, playerState_t, PM_INTERMISSION, playerState_s::pm_type, entityState_s::pos, playerState_s::powerups, entityState_s::powerups, s, SnapVector, playerState_s::stats, playerState_s::torsoAnim, entityState_s::torsoAnim, trajectory_t::trBase, trajectory_t::trDelta, trajectory_t::trType, VectorCopy, playerState_s::velocity, playerState_s::viewangles, playerState_s::weapon, and entityState_s::weapon.

Referenced by CG_AddPacketEntities(), CG_SetInitialSnapshot(), CG_SetNextSnap(), CG_TransitionSnapshot(), ClientEndFrame(), ClientSpawn(), ClientThink_real(), SendPendingPredictableEvents(), and TeleportPlayer().

01458                                                                                        {
01459     int     i;
01460 
01461     if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) {
01462         s->eType = ET_INVISIBLE;
01463     } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) {
01464         s->eType = ET_INVISIBLE;
01465     } else {
01466         s->eType = ET_PLAYER;
01467     }
01468 
01469     s->number = ps->clientNum;
01470 
01471     s->pos.trType = TR_INTERPOLATE;
01472     VectorCopy( ps->origin, s->pos.trBase );
01473     if ( snap ) {
01474         SnapVector( s->pos.trBase );
01475     }
01476     // set the trDelta for flag direction
01477     VectorCopy( ps->velocity, s->pos.trDelta );
01478 
01479     s->apos.trType = TR_INTERPOLATE;
01480     VectorCopy( ps->viewangles, s->apos.trBase );
01481     if ( snap ) {
01482         SnapVector( s->apos.trBase );
01483     }
01484 
01485     s->angles2[YAW] = ps->movementDir;
01486     s->legsAnim = ps->legsAnim;
01487     s->torsoAnim = ps->torsoAnim;
01488     s->clientNum = ps->clientNum;       // ET_PLAYER looks here instead of at number
01489                                         // so corpses can also reference the proper config
01490     s->eFlags = ps->eFlags;
01491     if ( ps->stats[STAT_HEALTH] <= 0 ) {
01492         s->eFlags |= EF_DEAD;
01493     } else {
01494         s->eFlags &= ~EF_DEAD;
01495     }
01496 
01497     if ( ps->externalEvent ) {
01498         s->event = ps->externalEvent;
01499         s->eventParm = ps->externalEventParm;
01500     } else if ( ps->entityEventSequence < ps->eventSequence ) {
01501         int     seq;
01502 
01503         if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) {
01504             ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS;
01505         }
01506         seq = ps->entityEventSequence & (MAX_PS_EVENTS-1);
01507         s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 );
01508         s->eventParm = ps->eventParms[ seq ];
01509         ps->entityEventSequence++;
01510     }
01511 
01512     s->weapon = ps->weapon;
01513     s->groundEntityNum = ps->groundEntityNum;
01514 
01515     s->powerups = 0;
01516     for ( i = 0 ; i < MAX_POWERUPS ; i++ ) {
01517         if ( ps->powerups[ i ] ) {
01518             s->powerups |= 1 << i;
01519         }
01520     }
01521 
01522     s->loopSound = ps->loopSound;
01523     s->generic1 = ps->generic1;
01524 }

void BG_PlayerStateToEntityStateExtraPolate playerState_t ps,
entityState_t s,
int  time,
qboolean  snap
 

Definition at line 1534 of file bg_misc.c.

References entityState_s::angles2, entityState_s::apos, entityState_s::clientNum, playerState_s::clientNum, playerState_s::eFlags, entityState_s::eFlags, playerState_s::entityEventSequence, entityState_t, entityState_s::eType, entityState_s::event, entityState_s::eventParm, playerState_s::eventParms, playerState_s::events, playerState_s::eventSequence, playerState_s::externalEvent, playerState_s::externalEventParm, playerState_s::generic1, entityState_s::generic1, playerState_s::groundEntityNum, entityState_s::groundEntityNum, i, playerState_s::legsAnim, entityState_s::legsAnim, playerState_s::loopSound, entityState_s::loopSound, MAX_PS_EVENTS, playerState_s::movementDir, entityState_s::number, playerState_s::origin, playerState_t, PM_INTERMISSION, playerState_s::pm_type, entityState_s::pos, playerState_s::powerups, entityState_s::powerups, s, SnapVector, playerState_s::stats, playerState_s::torsoAnim, entityState_s::torsoAnim, trajectory_t::trBase, trajectory_t::trDelta, trajectory_t::trDuration, trajectory_t::trTime, trajectory_t::trType, VectorCopy, playerState_s::velocity, playerState_s::viewangles, playerState_s::weapon, and entityState_s::weapon.

Referenced by ClientEndFrame(), and ClientThink_real().

01534                                                                                                             {
01535     int     i;
01536 
01537     if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) {
01538         s->eType = ET_INVISIBLE;
01539     } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) {
01540         s->eType = ET_INVISIBLE;
01541     } else {
01542         s->eType = ET_PLAYER;
01543     }
01544 
01545     s->number = ps->clientNum;
01546 
01547     s->pos.trType = TR_LINEAR_STOP;
01548     VectorCopy( ps->origin, s->pos.trBase );
01549     if ( snap ) {
01550         SnapVector( s->pos.trBase );
01551     }
01552     // set the trDelta for flag direction and linear prediction
01553     VectorCopy( ps->velocity, s->pos.trDelta );
01554     // set the time for linear prediction
01555     s->pos.trTime = time;
01556     // set maximum extra polation time
01557     s->pos.trDuration = 50; // 1000 / sv_fps (default = 20)
01558 
01559     s->apos.trType = TR_INTERPOLATE;
01560     VectorCopy( ps->viewangles, s->apos.trBase );
01561     if ( snap ) {
01562         SnapVector( s->apos.trBase );
01563     }
01564 
01565     s->angles2[YAW] = ps->movementDir;
01566     s->legsAnim = ps->legsAnim;
01567     s->torsoAnim = ps->torsoAnim;
01568     s->clientNum = ps->clientNum;       // ET_PLAYER looks here instead of at number
01569                                         // so corpses can also reference the proper config
01570     s->eFlags = ps->eFlags;
01571     if ( ps->stats[STAT_HEALTH] <= 0 ) {
01572         s->eFlags |= EF_DEAD;
01573     } else {
01574         s->eFlags &= ~EF_DEAD;
01575     }
01576 
01577     if ( ps->externalEvent ) {
01578         s->event = ps->externalEvent;
01579         s->eventParm = ps->externalEventParm;
01580     } else if ( ps->entityEventSequence < ps->eventSequence ) {
01581         int     seq;
01582 
01583         if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) {
01584             ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS;
01585         }
01586         seq = ps->entityEventSequence & (MAX_PS_EVENTS-1);
01587         s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 );
01588         s->eventParm = ps->eventParms[ seq ];
01589         ps->entityEventSequence++;
01590     }
01591 
01592     s->weapon = ps->weapon;
01593     s->groundEntityNum = ps->groundEntityNum;
01594 
01595     s->powerups = 0;
01596     for ( i = 0 ; i < MAX_POWERUPS ; i++ ) {
01597         if ( ps->powerups[ i ] ) {
01598             s->powerups |= 1 << i;
01599         }
01600     }
01601 
01602     s->loopSound = ps->loopSound;
01603     s->generic1 = ps->generic1;
01604 }

qboolean BG_PlayerTouchesItem playerState_t ps,
entityState_t item,
int  atTime
 

Definition at line 1011 of file bg_misc.c.

References BG_EvaluateTrajectory(), entityState_t, playerState_s::origin, playerState_t, entityState_s::pos, qboolean, and vec3_t.

Referenced by CG_TouchItem(), and G_TouchTriggers().

01011                                                                                        {
01012     vec3_t      origin;
01013 
01014     BG_EvaluateTrajectory( &item->pos, atTime, origin );
01015 
01016     // we are ignoring ducked differences here
01017     if ( ps->origin[0] - origin[0] > 44
01018         || ps->origin[0] - origin[0] < -50
01019         || ps->origin[1] - origin[1] > 36
01020         || ps->origin[1] - origin[1] < -36
01021         || ps->origin[2] - origin[2] > 36
01022         || ps->origin[2] - origin[2] < -36 ) {
01023         return qfalse;
01024     }
01025 
01026     return qtrue;
01027 }

Here is the call graph for this function:

void BG_TouchJumpPad playerState_t ps,
entityState_t jumppad
 

Definition at line 1415 of file bg_misc.c.

References AngleNormalize180(), BG_AddPredictableEventToPlayerstate(), entityState_t, EV_JUMP_PAD, fabs(), playerState_s::jumppad_ent, playerState_s::jumppad_frame, entityState_s::number, entityState_s::origin2, p, PITCH, playerState_t, playerState_s::pm_type, playerState_s::pmove_framecount, playerState_s::powerups, vec3_t, vectoangles(), VectorCopy, and playerState_s::velocity.

Referenced by CG_TouchTriggerPrediction(), and trigger_push_touch().

01415                                                                   {
01416     vec3_t  angles;
01417     float p;
01418     int effectNum;
01419 
01420     // spectators don't use jump pads
01421     if ( ps->pm_type != PM_NORMAL ) {
01422         return;
01423     }
01424 
01425     // flying characters don't hit bounce pads
01426     if ( ps->powerups[PW_FLIGHT] ) {
01427         return;
01428     }
01429 
01430     // if we didn't hit this same jumppad the previous frame
01431     // then don't play the event sound again if we are in a fat trigger
01432     if ( ps->jumppad_ent != jumppad->number ) {
01433 
01434         vectoangles( jumppad->origin2, angles);
01435         p = fabs( AngleNormalize180( angles[PITCH] ) );
01436         if( p < 45 ) {
01437             effectNum = 0;
01438         } else {
01439             effectNum = 1;
01440         }
01441         BG_AddPredictableEventToPlayerstate( EV_JUMP_PAD, effectNum, ps );
01442     }
01443     // remember hitting this jumppad this frame
01444     ps->jumppad_ent = jumppad->number;
01445     ps->jumppad_frame = ps->pmove_framecount;
01446     // give the player the velocity from the jumppad
01447     VectorCopy( jumppad->origin2, ps->velocity );
01448 }

Here is the call graph for this function:

void PM_UpdateViewAngles playerState_t ps,
const usercmd_t cmd
 

Definition at line 1797 of file bg_pmove.c.

References usercmd_s::angles, playerState_s::delta_angles, i, playerState_t, PM_INTERMISSION, PM_SPECTATOR, playerState_s::pm_type, SHORT2ANGLE, playerState_s::stats, usercmd_t, and playerState_s::viewangles.

Referenced by CG_InterpolatePlayerState(), CG_PredictPlayerState(), and PmoveSingle().

01797                                                                     {
01798     short       temp;
01799     int     i;
01800 
01801     if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPINTERMISSION) {
01802         return;     // no view changes at all
01803     }
01804 
01805     if ( ps->pm_type != PM_SPECTATOR && ps->stats[STAT_HEALTH] <= 0 ) {
01806         return;     // no view changes at all
01807     }
01808 
01809     // circularly clamp the angles with deltas
01810     for (i=0 ; i<3 ; i++) {
01811         temp = cmd->angles[i] + ps->delta_angles[i];
01812         if ( i == PITCH ) {
01813             // don't let the player look up or down more than 90 degrees
01814             if ( temp > 16000 ) {
01815                 ps->delta_angles[i] = 16000 - cmd->angles[i];
01816                 temp = 16000;
01817             } else if ( temp < -16000 ) {
01818                 ps->delta_angles[i] = -16000 - cmd->angles[i];
01819                 temp = -16000;
01820             }
01821         }
01822         ps->viewangles[i] = SHORT2ANGLE(temp);
01823     }
01824 
01825 }

void Pmove pmove_t pmove  ) 
 

Definition at line 2026 of file bg_pmove.c.

References pmove_t::cmd, playerState_s::commandTime, playerState_s::pm_flags, pmove_t::pmove_fixed, playerState_s::pmove_framecount, pmove_t::pmove_msec, PmoveSingle(), pmove_t::ps, usercmd_s::serverTime, and usercmd_s::upmove.

Referenced by CG_PredictPlayerState(), ClientThink_real(), and SpectatorThink().

02026                             {
02027     int         finalTime;
02028 
02029     finalTime = pmove->cmd.serverTime;
02030 
02031     if ( finalTime < pmove->ps->commandTime ) {
02032         return; // should not happen
02033     }
02034 
02035     if ( finalTime > pmove->ps->commandTime + 1000 ) {
02036         pmove->ps->commandTime = finalTime - 1000;
02037     }
02038 
02039     pmove->ps->pmove_framecount = (pmove->ps->pmove_framecount+1) & ((1<<PS_PMOVEFRAMECOUNTBITS)-1);
02040 
02041     // chop the move up if it is too long, to prevent framerate
02042     // dependent behavior
02043     while ( pmove->ps->commandTime != finalTime ) {
02044         int     msec;
02045 
02046         msec = finalTime - pmove->ps->commandTime;
02047 
02048         if ( pmove->pmove_fixed ) {
02049             if ( msec > pmove->pmove_msec ) {
02050                 msec = pmove->pmove_msec;
02051             }
02052         }
02053         else {
02054             if ( msec > 66 ) {
02055                 msec = 66;
02056             }
02057         }
02058         pmove->cmd.serverTime = pmove->ps->commandTime + msec;
02059         PmoveSingle( pmove );
02060 
02061         if ( pmove->ps->pm_flags & PMF_JUMP_HELD ) {
02062             pmove->cmd.upmove = 20;
02063         }
02064     }
02065 
02066     //PM_CheckStuck();
02067 
02068 }

Here is the call graph for this function:


Variable Documentation

gitem_t bg_itemlist[]
 

Definition at line 44 of file bg_misc.c.

Referenced by BG_CanItemBeGrabbed(), BG_FindItem(), BG_FindItemForHoldable(), BG_FindItemForPowerup(), BG_FindItemForWeapon(), CG_DrawPickupItem(), CG_EntityEvent(), CG_Item(), CG_ItemPickup(), CG_LoadingItem(), CG_RegisterItemSounds(), CG_RegisterItemVisuals(), CG_RegisterWeapon(), CG_TouchItem(), ClientEndFrame(), ClientThink_real(), ClientTimerActions(), Controls_InitWeapons(), G_CallSpawn(), G_Damage(), Pickup_Armor(), Pickup_Health(), PM_Weapon(), and UI_PlayerInfo_SetWeapon().

int bg_numItems
 

Definition at line 923 of file bg_misc.c.

Referenced by CG_RegisterItemVisuals().


Generated on Thu Aug 25 13:47:02 2005 for Quake III Arena by  doxygen 1.3.9.1