codemp/game/bg_public.h File Reference

#include "bg_weapons.h"
#include "anims.h"
#include "bg_vehicles.h"
#include "../namespace_begin.h"
#include "../namespace_end.h"

Go to the source code of this file.

Data Structures

struct  animation_s
struct  animevent_s
struct  bgEntity_s
struct  bgLoadedAnim_t
struct  bgLoadedEvents_t
struct  gitem_s
struct  pmove_t
struct  saberMoveData_t

Defines

#define MAX_SPAWN_VARS   64
#define MAX_SPAWN_VARS_CHARS   4096
#define GAME_VERSION   "basejka-1"
#define STEPSIZE   18
#define DEFAULT_GRAVITY   800
#define GIB_HEALTH   -40
#define ARMOR_PROTECTION   0.50
#define ARMOR_REDUCTION_FACTOR   0.50
#define JUMP_VELOCITY   225
#define MAX_ITEMS   256
#define RANK_TIED_FLAG   0x4000
#define ITEM_RADIUS   15
#define SCORE_NOT_PRESENT   -9999
#define VOTE_TIME   30000
#define DEFAULT_MINS_2   -24
#define DEFAULT_MAXS_2   40
#define CROUCH_MAXS_2   16
#define STANDARD_VIEWHEIGHT_OFFSET   -4
#define MINS_Z   -24
#define DEFAULT_VIEWHEIGHT   (DEFAULT_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)
#define CROUCH_VIEWHEIGHT   (CROUCH_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)
#define DEAD_VIEWHEIGHT   -16
#define MAX_CLIENT_SCORE_SEND   20
#define CS_MUSIC   2
#define CS_MESSAGE   3
#define CS_MOTD   4
#define CS_WARMUP   5
#define CS_SCORES1   6
#define CS_SCORES2   7
#define CS_VOTE_TIME   8
#define CS_VOTE_STRING   9
#define CS_VOTE_YES   10
#define CS_VOTE_NO   11
#define CS_TEAMVOTE_TIME   12
#define CS_TEAMVOTE_STRING   14
#define CS_TEAMVOTE_YES   16
#define CS_TEAMVOTE_NO   18
#define CS_GAME_VERSION   20
#define CS_LEVEL_START_TIME   21
#define CS_INTERMISSION   22
#define CS_FLAGSTATUS   23
#define CS_SHADERSTATE   24
#define CS_BOTINFO   25
#define CS_ITEMS   27
#define CS_CLIENT_JEDIMASTER   28
#define CS_CLIENT_DUELWINNER   29
#define CS_CLIENT_DUELISTS   30
#define CS_CLIENT_DUELHEALTHS   31
#define CS_GLOBAL_AMBIENT_SET   32
#define CS_AMBIENT_SET   37
#define CS_SIEGE_STATE   (CS_AMBIENT_SET+MAX_AMBIENT_SETS)
#define CS_SIEGE_OBJECTIVES   (CS_SIEGE_STATE+1)
#define CS_SIEGE_TIMEOVERRIDE   (CS_SIEGE_OBJECTIVES+1)
#define CS_SIEGE_WINTEAM   (CS_SIEGE_TIMEOVERRIDE+1)
#define CS_SIEGE_ICONS   (CS_SIEGE_WINTEAM+1)
#define CS_MODELS   (CS_SIEGE_ICONS+1)
#define CS_SKYBOXORG   (CS_MODELS+MAX_MODELS)
#define CS_SOUNDS   (CS_SKYBOXORG+1)
#define CS_ICONS   (CS_SOUNDS+MAX_SOUNDS)
#define CS_PLAYERS   (CS_ICONS+MAX_ICONS)
#define CS_G2BONES   (CS_PLAYERS+MAX_CLIENTS)
#define CS_LOCATIONS   (CS_G2BONES+MAX_G2BONES)
#define CS_PARTICLES   (CS_LOCATIONS+MAX_LOCATIONS)
#define CS_EFFECTS   (CS_PARTICLES+MAX_LOCATIONS)
#define CS_LIGHT_STYLES   (CS_EFFECTS + MAX_FX)
#define CS_TERRAINS   (CS_LIGHT_STYLES + (MAX_LIGHT_STYLES*3))
#define CS_BSP_MODELS   (CS_TERRAINS + MAX_TERRAINS)
#define CS_MAX   (CS_BSP_MODELS + MAX_SUB_BSP)
#define G2_MODEL_PART   50
#define BG_NUM_TOGGLEABLE_SURFACES   31
#define MAX_CUSTOM_SIEGE_SOUNDS   30
#define TOSS_DEBOUNCE_TIME   5000
#define MAX_ANIM_FILES   16
#define MAX_ANIM_EVENTS   300
#define MAX_RANDOM_ANIM_SOUNDS   4
#define AED_ARRAY_SIZE   (MAX_RANDOM_ANIM_SOUNDS+3)
#define AED_SOUNDINDEX_START   0
#define AED_SOUNDINDEX_END   (MAX_RANDOM_ANIM_SOUNDS-1)
#define AED_SOUND_NUMRANDOMSNDS   (MAX_RANDOM_ANIM_SOUNDS)
#define AED_SOUND_PROBABILITY   (MAX_RANDOM_ANIM_SOUNDS+1)
#define AED_SOUNDCHANNEL   (MAX_RANDOM_ANIM_SOUNDS+2)
#define AED_FOOTSTEP_TYPE   0
#define AED_FOOTSTEP_PROBABILITY   1
#define AED_EFFECTINDEX   0
#define AED_BOLTINDEX   1
#define AED_EFFECT_PROBABILITY   2
#define AED_MODELINDEX   3
#define AED_FIRE_ALT   0
#define AED_FIRE_PROBABILITY   1
#define AED_MOVE_FWD   0
#define AED_MOVE_RT   1
#define AED_MOVE_UP   2
#define AED_SABER_SWING_SABERNUM   0
#define AED_SABER_SWING_TYPE   1
#define AED_SABER_SWING_PROBABILITY   2
#define AED_SABER_SPIN_SABERNUM   0
#define AED_SABER_SPIN_TYPE   1
#define AED_SABER_SPIN_PROBABILITY   2
#define PMF_DUCKED   1
#define PMF_JUMP_HELD   2
#define PMF_ROLLING   4
#define PMF_BACKWARDS_JUMP   8
#define PMF_BACKWARDS_RUN   16
#define PMF_TIME_LAND   32
#define PMF_TIME_KNOCKBACK   64
#define PMF_FIX_MINS   128
#define PMF_TIME_WATERJUMP   256
#define PMF_RESPAWNED   512
#define PMF_USE_ITEM_HELD   1024
#define PMF_UPDATE_ANIM   2048
#define PMF_FOLLOW   4096
#define PMF_SCOREBOARD   8192
#define PMF_STUCK_TO_WALL   16384
#define PMF_ALL_TIMES   (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
#define MAXTOUCH   32
#define SETANIM_TORSO   1
#define SETANIM_LEGS   2
#define SETANIM_BOTH   SETANIM_TORSO|SETANIM_LEGS
#define SETANIM_FLAG_NORMAL   0
#define SETANIM_FLAG_OVERRIDE   1
#define SETANIM_FLAG_HOLD   2
#define SETANIM_FLAG_RESTART   4
#define SETANIM_FLAG_HOLDLESS   8
#define EF_G2ANIMATING   (1<<0)
#define EF_DEAD   (1<<1)
#define EF_RADAROBJECT   (1<<2)
#define EF_TELEPORT_BIT   (1<<3)
#define EF_SHADER_ANIM   (1<<4)
#define EF_PLAYER_EVENT   (1<<5)
#define EF_RAG   (1<<6)
#define EF_PERMANENT   (1<<7)
#define EF_NODRAW   (1<<8)
#define EF_FIRING   (1<<9)
#define EF_ALT_FIRING   (1<<10)
#define EF_JETPACK_ACTIVE   (1<<11)
#define EF_NOT_USED_1   (1<<12)
#define EF_TALK   (1<<13)
#define EF_CONNECTION   (1<<14)
#define EF_NOT_USED_6   (1<<15)
#define EF_NOT_USED_2   (1<<16)
#define EF_NOT_USED_3   (1<<17)
#define EF_NOT_USED_4   (1<<18)
#define EF_BODYPUSH   (1<<19)
#define EF_DOUBLE_AMMO   (1<<20)
#define EF_SEEKERDRONE   (1<<21)
#define EF_MISSILE_STICK   (1<<22)
#define EF_ITEMPLACEHOLDER   (1<<23)
#define EF_SOUNDTRACKER   (1<<24)
#define EF_DROPPEDWEAPON   (1<<25)
#define EF_DISINTEGRATION   (1<<26)
#define EF_INVULNERABLE   (1<<27)
#define EF_CLIENTSMOOTH   (1<<28)
#define EF_JETPACK   (1<<29)
#define EF_JETPACK_FLAMING   (1<<30)
#define EF_NOT_USED_5   (1<<31)
#define EF2_HELD_BY_MONSTER   (1<<0)
#define EF2_USE_ALT_ANIM   (1<<1)
#define EF2_ALERTED   (1<<2)
#define EF2_GENERIC_NPC_FLAG   (1<<3)
#define EF2_FLYING   (1<<4)
#define EF2_HYPERSPACE   (1<<5)
#define EF2_BRACKET_ENTITY   (1<<6)
#define EF2_SHIP_DEATH   (1<<7)
#define EF2_NOT_USED_1   (1<<8)
#define PLAYEREVENT_DENIEDREWARD   0x0001
#define PLAYEREVENT_GAUNTLETREWARD   0x0002
#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 TEAM_LOCATION_UPDATE_TIME   1000
#define TEAM_MAXOVERLAY   32
#define MAX_ITEM_MODELS   4
#define ITEM_INDEX(x)   ((x)-bg_itemlist)
#define SABER_BLOCK_DUR   150
#define DF_NO_FALLING   8
#define DF_FIXED_FOV   16
#define DF_NO_FOOTSTEPS   32
#define MASK_ALL   (-1)
#define MASK_SOLID   (CONTENTS_SOLID|CONTENTS_TERRAIN)
#define MASK_PLAYERSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY|CONTENTS_TERRAIN)
#define MASK_NPCSOLID   (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_BODY|CONTENTS_TERRAIN)
#define MASK_DEADSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_TERRAIN)
#define MASK_WATER   (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME)
#define MASK_OPAQUE   (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA|CONTENTS_TERRAIN)
#define MASK_SHOT   (CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_CORPSE|CONTENTS_TERRAIN)
#define FX_STATE_OFF   0
#define FX_STATE_ONE_SHOT   1
#define FX_STATE_ONE_SHOT_LIMIT   10
#define FX_STATE_CONTINUOUS   20
#define ARENAS_PER_TIER   4
#define MAX_ARENAS   1024
#define MAX_ARENAS_TEXT   8192
#define MAX_BOTS   1024
#define MAX_BOTS_TEXT   8192
#define HYPERSPACE_TIME   4000
#define HYPERSPACE_TELEPORT_FRAC   0.75f
#define HYPERSPACE_SPEED   10000.0f
#define HYPERSPACE_TURN_RATE   45.0f

Typedefs

typedef int gametype_t
typedef animation_s animation_t
typedef animevent_s animevent_t
typedef bgEntity_s bgEntity_t
typedef int powerup_t
typedef int holdable_t
typedef int team_t
typedef int itemType_t
typedef gitem_s gitem_t
typedef int saberMoveName_t

Enumerations

enum  g2ModelParts_t {
  G2_MODELPART_HEAD = 10, G2_MODELPART_WAIST, G2_MODELPART_LARM, G2_MODELPART_RARM,
  G2_MODELPART_RHAND, G2_MODELPART_LLEG, G2_MODELPART_RLEG
}
enum  forceHandAnims_t {
  HANDEXTEND_NONE = 0, HANDEXTEND_FORCEPUSH, HANDEXTEND_FORCEPULL, HANDEXTEND_FORCE_HOLD,
  HANDEXTEND_SABERPULL, HANDEXTEND_CHOKE, HANDEXTEND_WEAPONREADY, HANDEXTEND_DODGE,
  HANDEXTEND_KNOCKDOWN, HANDEXTEND_DUELCHALLENGE, HANDEXTEND_TAUNT, HANDEXTEND_PRETHROW,
  HANDEXTEND_POSTTHROW, HANDEXTEND_PRETHROWN, HANDEXTEND_POSTTHROWN, HANDEXTEND_DRAGGING,
  HANDEXTEND_JEDITAUNT
}
enum  brokenLimb_t { BROKENLIMB_NONE = 0, BROKENLIMB_LARM, BROKENLIMB_RARM, NUM_BROKENLIMBS }
enum  {
  GT_FFA, GT_HOLOCRON, GT_JEDIMASTER, GT_DUEL,
  GT_POWERDUEL, GT_SINGLE_PLAYER, GT_TEAM, GT_SIEGE,
  GT_CTF, GT_CTY, GT_MAX_GAME_TYPE
}
enum  gender_t { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER }
enum  {
  SABERLOCK_TOP, SABERLOCK_SIDE, SABERLOCK_LOCK, SABERLOCK_BREAK,
  SABERLOCK_SUPERBREAK, SABERLOCK_WIN, SABERLOCK_LOSE
}
enum  { DIR_RIGHT, DIR_LEFT, DIR_FRONT, DIR_BACK }
enum  footstepType_t {
  FOOTSTEP_R, FOOTSTEP_L, FOOTSTEP_HEAVY_R, FOOTSTEP_HEAVY_L,
  NUM_FOOTSTEP_TYPES
}
enum  animEventType_t {
  AEV_NONE, AEV_SOUND, AEV_FOOTSTEP, AEV_EFFECT,
  AEV_FIRE, AEV_MOVE, AEV_SOUNDCHAN, AEV_SABER_SWING,
  AEV_SABER_SPIN, AEV_NUM_AEV
}
enum  pmtype_t {
  PM_NORMAL, PM_JETPACK, PM_FLOAT, PM_NOCLIP,
  PM_SPECTATOR, PM_DEAD, PM_FREEZE, PM_INTERMISSION,
  PM_SPINTERMISSION
}
enum  weaponstate_t {
  WEAPON_READY, WEAPON_RAISING, WEAPON_DROPPING, WEAPON_FIRING,
  WEAPON_CHARGING, WEAPON_CHARGING_ALT, WEAPON_IDLE
}
enum  {
  FORCE_MASTERY_UNINITIATED, FORCE_MASTERY_INITIATE, FORCE_MASTERY_PADAWAN, FORCE_MASTERY_JEDI,
  FORCE_MASTERY_JEDI_GUARDIAN, FORCE_MASTERY_JEDI_ADEPT, FORCE_MASTERY_JEDI_KNIGHT, FORCE_MASTERY_JEDI_MASTER,
  NUM_FORCE_MASTERY_LEVELS
}
enum  statIndex_t {
  STAT_HEALTH, STAT_HOLDABLE_ITEM, STAT_HOLDABLE_ITEMS, STAT_PERSISTANT_POWERUP,
  STAT_WEAPONS = 4, STAT_ARMOR, STAT_DEAD_YAW, STAT_CLIENTS_READY,
  STAT_MAX_HEALTH
}
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  effectTypes_t {
  EFFECT_NONE = 0, EFFECT_SMOKE, EFFECT_EXPLOSION, EFFECT_EXPLOSION_PAS,
  EFFECT_SPARK_EXPLOSION, EFFECT_EXPLOSION_TRIPMINE, EFFECT_EXPLOSION_DETPACK, EFFECT_EXPLOSION_FLECHETTE,
  EFFECT_STUNHIT, EFFECT_EXPLOSION_DEMP2ALT, EFFECT_EXPLOSION_TURRET, EFFECT_SPARKS,
  EFFECT_WATER_SPLASH, EFFECT_ACID_SPLASH, EFFECT_LAVA_SPLASH, EFFECT_LANDING_MUD,
  EFFECT_LANDING_SAND, EFFECT_LANDING_DIRT, EFFECT_LANDING_SNOW, EFFECT_LANDING_GRAVEL,
  EFFECT_MAX
}
enum  {
  PW_NONE, PW_QUAD, PW_BATTLESUIT, PW_PULL,
  PW_REDFLAG, PW_BLUEFLAG, PW_NEUTRALFLAG, PW_SHIELDHIT,
  PW_SPEEDBURST, PW_DISINT_4, PW_SPEED, PW_CLOAKED,
  PW_FORCE_ENLIGHTENED_LIGHT, PW_FORCE_ENLIGHTENED_DARK, PW_FORCE_BOON, PW_YSALAMIRI,
  PW_NUM_POWERUPS
}
enum  {
  HI_NONE, HI_SEEKER, HI_SHIELD, HI_MEDPAC,
  HI_MEDPAC_BIG, HI_BINOCULARS, HI_SENTRY_GUN, HI_JETPACK,
  HI_HEALTHDISP, HI_AMMODISP, HI_EWEB, HI_CLOAK,
  HI_NUM_HOLDABLE
}
enum  ctfMsg_t {
  CTFMESSAGE_FRAGGED_FLAG_CARRIER, CTFMESSAGE_FLAG_RETURNED, CTFMESSAGE_PLAYER_RETURNED_FLAG, CTFMESSAGE_PLAYER_CAPTURED_FLAG,
  CTFMESSAGE_PLAYER_GOT_FLAG
}
enum  pdSounds_t {
  PDSOUND_NONE, PDSOUND_PROTECTHIT, PDSOUND_PROTECT, PDSOUND_ABSORBHIT,
  PDSOUND_ABSORB, PDSOUND_FORCEJUMP, PDSOUND_FORCEGRIP
}
enum  entity_event_t {
  EV_NONE, EV_CLIENTJOIN, 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,
  EV_JUMP_PAD, EV_GHOUL2_MARK, EV_GLOBAL_DUEL, EV_PRIVATE_DUEL,
  EV_JUMP, EV_ROLL, EV_WATER_TOUCH, EV_WATER_LEAVE,
  EV_WATER_UNDER, EV_WATER_CLEAR, EV_ITEM_PICKUP, EV_GLOBAL_ITEM_PICKUP,
  EV_VEH_FIRE, EV_NOAMMO, EV_CHANGE_WEAPON, EV_FIRE_WEAPON,
  EV_ALT_FIRE, EV_SABER_ATTACK, EV_SABER_HIT, EV_SABER_BLOCK,
  EV_SABER_CLASHFLARE, EV_SABER_UNHOLSTER, EV_BECOME_JEDIMASTER, EV_DISRUPTOR_MAIN_SHOT,
  EV_DISRUPTOR_SNIPER_SHOT, EV_DISRUPTOR_SNIPER_MISS, EV_DISRUPTOR_HIT, EV_DISRUPTOR_ZOOMSOUND,
  EV_PREDEFSOUND, EV_TEAM_POWER, EV_SCREENSHAKE, EV_LOCALTIMER,
  EV_USE, 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_ITEMUSEFAIL, EV_ITEM_RESPAWN, EV_ITEM_POP,
  EV_PLAYER_TELEPORT_IN, EV_PLAYER_TELEPORT_OUT, EV_GRENADE_BOUNCE, EV_MISSILE_STICK,
  EV_PLAY_EFFECT, EV_PLAY_EFFECT_ID, EV_PLAY_PORTAL_EFFECT_ID, EV_PLAYDOORSOUND,
  EV_PLAYDOORLOOPSOUND, EV_BMODEL_SOUND, EV_MUTE_SOUND, EV_VOICECMD_SOUND,
  EV_GENERAL_SOUND, EV_GLOBAL_SOUND, EV_GLOBAL_TEAM_SOUND, EV_ENTITY_SOUND,
  EV_PLAY_ROFF, EV_GLASS_SHATTER, EV_DEBRIS, EV_MISC_MODEL_EXP,
  EV_CONC_ALT_IMPACT, EV_MISSILE_HIT, EV_MISSILE_MISS, EV_MISSILE_MISS_METAL,
  EV_BULLET, EV_PAIN, EV_DEATH1, EV_DEATH2,
  EV_DEATH3, EV_OBITUARY, EV_POWERUP_QUAD, EV_POWERUP_BATTLESUIT,
  EV_FORCE_DRAINED, EV_GIB_PLAYER, EV_SCOREPLUM, EV_CTFMESSAGE,
  EV_BODYFADE, EV_SIEGE_ROUNDOVER, EV_SIEGE_OBJECTIVECOMPLETE, EV_DESTROY_GHOUL2_INSTANCE,
  EV_DESTROY_WEAPON_MODEL, EV_GIVE_NEW_RANK, EV_SET_FREE_SABER, EV_SET_FORCE_DISABLE,
  EV_WEAPON_CHARGE, EV_WEAPON_CHARGE_ALT, EV_SHIELD_HIT, EV_DEBUG_LINE,
  EV_TESTLINE, EV_STOPLOOPINGSOUND, EV_STARTLOOPINGSOUND, EV_TAUNT,
  EV_ANGER1, EV_ANGER2, EV_ANGER3, EV_VICTORY1,
  EV_VICTORY2, EV_VICTORY3, EV_CONFUSE1, EV_CONFUSE2,
  EV_CONFUSE3, EV_PUSHED1, EV_PUSHED2, EV_PUSHED3,
  EV_CHOKE1, EV_CHOKE2, EV_CHOKE3, EV_FFWARN,
  EV_FFTURN, EV_CHASE1, EV_CHASE2, EV_CHASE3,
  EV_COVER1, EV_COVER2, EV_COVER3, EV_COVER4,
  EV_COVER5, EV_DETECTED1, EV_DETECTED2, EV_DETECTED3,
  EV_DETECTED4, EV_DETECTED5, EV_LOST1, EV_OUTFLANK1,
  EV_OUTFLANK2, EV_ESCAPING1, EV_ESCAPING2, EV_ESCAPING3,
  EV_GIVEUP1, EV_GIVEUP2, EV_GIVEUP3, EV_GIVEUP4,
  EV_LOOK1, EV_LOOK2, EV_SIGHT1, EV_SIGHT2,
  EV_SIGHT3, EV_SOUND1, EV_SOUND2, EV_SOUND3,
  EV_SUSPICIOUS1, EV_SUSPICIOUS2, EV_SUSPICIOUS3, EV_SUSPICIOUS4,
  EV_SUSPICIOUS5, EV_COMBAT1, EV_COMBAT2, EV_COMBAT3,
  EV_JDETECTED1, EV_JDETECTED2, EV_JDETECTED3, EV_TAUNT1,
  EV_TAUNT2, EV_TAUNT3, EV_JCHASE1, EV_JCHASE2,
  EV_JCHASE3, EV_JLOST1, EV_JLOST2, EV_JLOST3,
  EV_DEFLECT1, EV_DEFLECT2, EV_DEFLECT3, EV_GLOAT1,
  EV_GLOAT2, EV_GLOAT3, EV_PUSHFAIL, EV_SIEGESPEC
}
enum  global_team_sound_t {
  GTS_RED_CAPTURE, GTS_BLUE_CAPTURE, GTS_RED_RETURN, GTS_BLUE_RETURN,
  GTS_RED_TAKEN, GTS_BLUE_TAKEN, GTS_REDTEAM_SCORED, GTS_BLUETEAM_SCORED,
  GTS_REDTEAM_TOOK_LEAD, GTS_BLUETEAM_TOOK_LEAD, GTS_TEAMS_ARE_TIED
}
enum  {
  TEAM_FREE, TEAM_RED, TEAM_BLUE, TEAM_SPECTATOR,
  TEAM_NUM_TEAMS
}
enum  duelTeam_t { DUELTEAM_FREE, DUELTEAM_LONE, DUELTEAM_DOUBLE, DUELTEAM_SINGLE }
enum  teamtask_t {
  TEAMTASK_NONE, TEAMTASK_OFFENSE, TEAMTASK_DEFENSE, TEAMTASK_PATROL,
  TEAMTASK_FOLLOW, TEAMTASK_RETRIEVE, TEAMTASK_ESCORT, TEAMTASK_CAMP
}
enum  meansOfDeath_t {
  MOD_UNKNOWN, MOD_STUN_BATON, MOD_MELEE, MOD_SABER,
  MOD_BRYAR_PISTOL, MOD_BRYAR_PISTOL_ALT, MOD_BLASTER, MOD_TURBLAST,
  MOD_DISRUPTOR, MOD_DISRUPTOR_SPLASH, MOD_DISRUPTOR_SNIPER, MOD_BOWCASTER,
  MOD_REPEATER, MOD_REPEATER_ALT, MOD_REPEATER_ALT_SPLASH, MOD_DEMP2,
  MOD_DEMP2_ALT, MOD_FLECHETTE, MOD_FLECHETTE_ALT_SPLASH, MOD_ROCKET,
  MOD_ROCKET_SPLASH, MOD_ROCKET_HOMING, MOD_ROCKET_HOMING_SPLASH, MOD_THERMAL,
  MOD_THERMAL_SPLASH, MOD_TRIP_MINE_SPLASH, MOD_TIMED_MINE_SPLASH, MOD_DET_PACK_SPLASH,
  MOD_VEHICLE, MOD_CONC, MOD_CONC_ALT, MOD_FORCE_DARK,
  MOD_SENTRY, MOD_WATER, MOD_SLIME, MOD_LAVA,
  MOD_CRUSH, MOD_TELEFRAG, MOD_FALLING, MOD_SUICIDE,
  MOD_TARGET_LASER, MOD_TRIGGER_HURT, MOD_TEAM_CHANGE, MOD_MAX
}
enum  {
  IT_BAD, IT_WEAPON, IT_AMMO, IT_ARMOR,
  IT_HEALTH, IT_POWERUP, IT_HOLDABLE, IT_PERSISTANT_POWERUP,
  IT_TEAM
}
enum  entityType_t {
  ET_GENERAL, ET_PLAYER, ET_ITEM, ET_MISSILE,
  ET_SPECIAL, ET_HOLOCRON, ET_MOVER, ET_BEAM,
  ET_PORTAL, ET_SPEAKER, ET_PUSH_TRIGGER, ET_TELEPORT_TRIGGER,
  ET_INVISIBLE, ET_NPC, ET_TEAM, ET_BODY,
  ET_TERRAIN, ET_FX, ET_EVENTS
}
enum  {
  LS_INVALID = -1, LS_NONE = 0, LS_READY, LS_DRAW,
  LS_PUTAWAY, LS_A_TL2BR, LS_A_L2R, LS_A_BL2TR,
  LS_A_BR2TL, LS_A_R2L, LS_A_TR2BL, LS_A_T2B,
  LS_A_BACKSTAB, LS_A_BACK, LS_A_BACK_CR, LS_ROLL_STAB,
  LS_A_LUNGE, LS_A_JUMP_T__B_, LS_A_FLIP_STAB, LS_A_FLIP_SLASH,
  LS_JUMPATTACK_DUAL, LS_JUMPATTACK_ARIAL_LEFT, LS_JUMPATTACK_ARIAL_RIGHT, LS_JUMPATTACK_CART_LEFT,
  LS_JUMPATTACK_CART_RIGHT, LS_JUMPATTACK_STAFF_LEFT, LS_JUMPATTACK_STAFF_RIGHT, LS_BUTTERFLY_LEFT,
  LS_BUTTERFLY_RIGHT, LS_A_BACKFLIP_ATK, LS_SPINATTACK_DUAL, LS_SPINATTACK,
  LS_LEAP_ATTACK, LS_SWOOP_ATTACK_RIGHT, LS_SWOOP_ATTACK_LEFT, LS_TAUNTAUN_ATTACK_RIGHT,
  LS_TAUNTAUN_ATTACK_LEFT, LS_KICK_F, LS_KICK_B, LS_KICK_R,
  LS_KICK_L, LS_KICK_S, LS_KICK_BF, LS_KICK_RL,
  LS_KICK_F_AIR, LS_KICK_B_AIR, LS_KICK_R_AIR, LS_KICK_L_AIR,
  LS_STABDOWN, LS_STABDOWN_STAFF, LS_STABDOWN_DUAL, LS_DUAL_SPIN_PROTECT,
  LS_STAFF_SOULCAL, LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL,
  LS_UPSIDE_DOWN_ATTACK, LS_PULL_ATTACK_STAB, LS_PULL_ATTACK_SWING, LS_SPINATTACK_ALORA,
  LS_DUAL_FB, LS_DUAL_LR, LS_HILT_BASH, LS_S_TL2BR,
  LS_S_L2R, LS_S_BL2TR, LS_S_BR2TL, LS_S_R2L,
  LS_S_TR2BL, LS_S_T2B, LS_R_TL2BR, LS_R_L2R,
  LS_R_BL2TR, LS_R_BR2TL, LS_R_R2L, LS_R_TR2BL,
  LS_R_T2B, LS_T1_BR__R, LS_T1_BR_TR, LS_T1_BR_T_,
  LS_T1_BR_TL, LS_T1_BR__L, LS_T1_BR_BL, LS_T1__R_BR,
  LS_T1__R_TR, LS_T1__R_T_, LS_T1__R_TL, LS_T1__R__L,
  LS_T1__R_BL, LS_T1_TR_BR, LS_T1_TR__R, LS_T1_TR_T_,
  LS_T1_TR_TL, LS_T1_TR__L, LS_T1_TR_BL, LS_T1_T__BR,
  LS_T1_T___R, LS_T1_T__TR, LS_T1_T__TL, LS_T1_T___L,
  LS_T1_T__BL, LS_T1_TL_BR, LS_T1_TL__R, LS_T1_TL_TR,
  LS_T1_TL_T_, LS_T1_TL__L, LS_T1_TL_BL, LS_T1__L_BR,
  LS_T1__L__R, LS_T1__L_TR, LS_T1__L_T_, LS_T1__L_TL,
  LS_T1__L_BL, LS_T1_BL_BR, LS_T1_BL__R, LS_T1_BL_TR,
  LS_T1_BL_T_, LS_T1_BL_TL, LS_T1_BL__L, LS_B1_BR,
  LS_B1__R, LS_B1_TR, LS_B1_T_, LS_B1_TL,
  LS_B1__L, LS_B1_BL, LS_D1_BR, LS_D1__R,
  LS_D1_TR, LS_D1_T_, LS_D1_TL, LS_D1__L,
  LS_D1_BL, LS_D1_B_, LS_V1_BR, LS_V1__R,
  LS_V1_TR, LS_V1_T_, LS_V1_TL, LS_V1__L,
  LS_V1_BL, LS_V1_B_, LS_H1_T_, LS_H1_TR,
  LS_H1_TL, LS_H1_BR, LS_H1_B_, LS_H1_BL,
  LS_K1_T_, LS_K1_TR, LS_K1_TL, LS_K1_BR,
  LS_K1_BL, LS_PARRY_UP, LS_PARRY_UR, LS_PARRY_UL,
  LS_PARRY_LR, LS_PARRY_LL, LS_REFLECT_UP, LS_REFLECT_UR,
  LS_REFLECT_UL, LS_REFLECT_LR, LS_REFLECT_LL, LS_MOVE_MAX
}
enum  saberQuadrant_t {
  Q_BR, Q_R, Q_TR, Q_T,
  Q_TL, Q_L, Q_BL, Q_B,
  Q_NUM_QUADS
}

Functions

void PM_UpdateViewAngles (playerState_t *ps, const usercmd_t *cmd)
void Pmove (pmove_t *pmove)
float vectoyaw (const vec3_t vec)
gitem_tBG_FindItem (const char *classname)
gitem_tBG_FindItemForWeapon (weapon_t weapon)
gitem_tBG_FindItemForPowerup (powerup_t pw)
gitem_tBG_FindItemForHoldable (holdable_t pw)
qboolean BG_CanItemBeGrabbed (int gametype, const entityState_t *ent, const playerState_t *ps)
bgEntity_tPM_BGEntForNum (int num)
qboolean BG_KnockDownable (playerState_t *ps)
qboolean BG_LegalizedForcePowers (char *powerOut, int maxRank, qboolean freeSaber, int teamForce, int gametype, int fpDisabled)
void BG_IK_MoveArm (void *ghoul2, int lHandBolt, int time, entityState_t *ent, int basePose, vec3_t desiredPos, qboolean *ikInProgress, vec3_t origin, vec3_t angles, vec3_t scale, int blendTime, qboolean forceHalt)
void BG_G2PlayerAngles (void *ghoul2, int motionBolt, entityState_t *cent, int time, vec3_t cent_lerpOrigin, vec3_t cent_lerpAngles, vec3_t legs[3], vec3_t legsAngles, qboolean *tYawing, qboolean *tPitching, qboolean *lYawing, float *tYawAngle, float *tPitchAngle, float *lYawAngle, int frametime, vec3_t turAngles, vec3_t modelScale, int ciLegs, int ciTorso, int *corrTime, vec3_t lookAngles, vec3_t lastHeadAngles, int lookTime, entityState_t *emplaced, int *crazySmoothFactor)
void BG_G2ATSTAngles (void *ghoul2, int time, vec3_t cent_lerpAngles)
int BG_AnimLength (int index, animNumber_t anim)
qboolean BG_InSpecialJump (int anim)
qboolean BG_InSaberStandAnim (int anim)
qboolean BG_InReboundJump (int anim)
qboolean BG_InReboundHold (int anim)
qboolean BG_InReboundRelease (int anim)
qboolean BG_InBackFlip (int anim)
qboolean BG_DirectFlippingAnim (int anim)
qboolean BG_SaberInAttack (int move)
qboolean BG_SaberInSpecial (int move)
qboolean BG_KickMove (int move)
qboolean BG_SaberInIdle (int move)
qboolean BG_FlippingAnim (int anim)
qboolean BG_SpinningSaberAnim (int anim)
qboolean BG_SaberInSpecialAttack (int anim)
qboolean BG_SaberInKata (int saberMove)
qboolean BG_InKataAnim (int anim)
qboolean BG_KickingAnim (int anim)
int BG_InGrappleMove (int anim)
int BG_BrokenParryForAttack (int move)
int BG_BrokenParryForParry (int move)
int BG_KnockawayForParry (int move)
qboolean BG_InRoll (playerState_t *ps, int anim)
qboolean BG_InDeathAnim (int anim)
qboolean BG_InSaberLockOld (int anim)
qboolean BG_InSaberLock (int anim)
void BG_SaberStartTransAnim (int clientNum, int saberAnimLevel, int weapon, int anim, float *animSpeed, int broken)
void BG_ForcePowerDrain (playerState_t *ps, forcePowers_t forcePower, int overrideAmt)
void BG_EvaluateTrajectory (const trajectory_t *tr, int atTime, vec3_t result)
void BG_EvaluateTrajectoryDelta (const trajectory_t *tr, int atTime, vec3_t result)
void BG_AddPredictableEventToPlayerstate (int newEvent, int eventParm, playerState_t *ps)
void BG_TouchJumpPad (playerState_t *ps, entityState_t *jumppad)
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_InitAnimsets (void)
void BG_ClearAnimsets (void)
int BG_ParseAnimationFile (const char *filename, animation_t *animSet, qboolean isHumanoid)
int BG_ParseAnimationEvtFile (const char *as_filename, int animFileIndex, int eventFileIndex)
qboolean BG_HasAnimation (int animIndex, int animation)
int BG_PickAnim (int animIndex, int minAnim, int maxAnim)
int BG_GetItemIndexByTag (int tag, int type)
qboolean BG_IsItemSelectable (playerState_t *ps, int item)
qboolean BG_HasYsalamiri (int gametype, playerState_t *ps)
qboolean BG_CanUseFPNow (int gametype, playerState_t *ps, int time, forcePowers_t power)
void * BG_Alloc (int size)
void * BG_AllocUnaligned (int size)
void * BG_TempAlloc (int size)
void BG_TempFree (int size)
char * BG_StringAlloc (const char *source)
qboolean BG_OutOfMemory (void)
void BG_BLADE_ActivateTrail (bladeInfo_t *blade, float duration)
void BG_BLADE_DeactivateTrail (bladeInfo_t *blade, float duration)
void BG_SI_Activate (saberInfo_t *saber)
void BG_SI_Deactivate (saberInfo_t *saber)
void BG_SI_BladeActivate (saberInfo_t *saber, int iBlade, qboolean bActive)
qboolean BG_SI_Active (saberInfo_t *saber)
void BG_SI_SetLength (saberInfo_t *saber, float length)
void BG_SI_SetDesiredLength (saberInfo_t *saber, float len, int bladeNum)
void BG_SI_SetLengthGradual (saberInfo_t *saber, int time)
float BG_SI_Length (saberInfo_t *saber)
float BG_SI_LengthMax (saberInfo_t *saber)
void BG_SI_ActivateTrail (saberInfo_t *saber, float duration)
void BG_SI_DeactivateTrail (saberInfo_t *saber, float duration)
void BG_AttachToRancor (void *ghoul2, float rancYaw, vec3_t rancOrigin, int time, qhandle_t *modelList, vec3_t modelScale, qboolean inMouth, vec3_t out_origin, vec3_t out_angles, vec3_t out_axis[3])

Variables

const char * bg_customSiegeSoundNames [MAX_CUSTOM_SIEGE_SOUNDS]
const char * bgToggleableSurfaces [BG_NUM_TOGGLEABLE_SURFACES]
const int bgToggleableSurfaceDebris [BG_NUM_TOGGLEABLE_SURFACES]
vec3_t WP_MuzzlePoint [WP_NUM_WEAPONS]
int forcePowerSorted [NUM_FORCE_POWERS]
qboolean BGPAFtextLoaded
animation_t bgHumanoidAnimations [MAX_TOTALANIMATIONS]
stringID_table_t animEventTypeTable [MAX_ANIM_EVENTS+1]
stringID_table_t footstepTypeTable [NUM_FOOTSTEP_TYPES+1]
bgLoadedAnim_t bgAllAnims [MAX_ANIM_FILES]
bgLoadedEvents_t bgAllEvents [MAX_ANIM_FILES]
int bgNumAnimEvents
char * forceMasteryLevels [NUM_FORCE_MASTERY_LEVELS]
int forceMasteryPoints [NUM_FORCE_MASTERY_LEVELS]
int bgForcePowerCost [NUM_FORCE_POWERS][NUM_FORCE_POWER_LEVELS]
pmove_tpm
gitem_t bg_itemlist []
int bg_numItems
saberMoveData_t saberMoveData [LS_MOVE_MAX]
int WeaponReadyAnim [WP_NUM_WEAPONS]
int WeaponAttackAnim [WP_NUM_WEAPONS]
int forcePowerDarkLight [NUM_FORCE_POWERS]


Define Documentation

#define AED_ARRAY_SIZE   (MAX_RANDOM_ANIM_SOUNDS+3)
 

Definition at line 272 of file bg_public.h.

Referenced by BG_ParseAnimationEvtFile().

#define AED_BOLTINDEX   1
 

Definition at line 285 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo().

#define AED_EFFECT_PROBABILITY   2
 

Definition at line 286 of file bg_public.h.

Referenced by CG_PlayerAnimEvents(), and ParseAnimationEvtBlock().

#define AED_EFFECTINDEX   0
 

Definition at line 284 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_FIRE_ALT   0
 

Definition at line 289 of file bg_public.h.

Referenced by ParseAnimationEvtBlock().

#define AED_FIRE_PROBABILITY   1
 

Definition at line 290 of file bg_public.h.

Referenced by CG_PlayerAnimEvents(), and ParseAnimationEvtBlock().

#define AED_FOOTSTEP_PROBABILITY   1
 

Definition at line 282 of file bg_public.h.

Referenced by CG_PlayerAnimEvents(), and ParseAnimationEvtBlock().

#define AED_FOOTSTEP_TYPE   0
 

Definition at line 281 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_MODELINDEX   3
 

Definition at line 287 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo().

#define AED_MOVE_FWD   0
 

Definition at line 292 of file bg_public.h.

Referenced by ParseAnimationEvtBlock().

#define AED_MOVE_RT   1
 

Definition at line 293 of file bg_public.h.

Referenced by ParseAnimationEvtBlock().

#define AED_MOVE_UP   2
 

Definition at line 294 of file bg_public.h.

Referenced by ParseAnimationEvtBlock().

#define AED_SABER_SPIN_PROBABILITY   2
 

Definition at line 302 of file bg_public.h.

Referenced by CG_PlayerAnimEvents(), and ParseAnimationEvtBlock().

#define AED_SABER_SPIN_SABERNUM   0
 

Definition at line 300 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_SABER_SPIN_TYPE   1
 

Definition at line 301 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_SABER_SWING_PROBABILITY   2
 

Definition at line 298 of file bg_public.h.

Referenced by CG_PlayerAnimEvents(), and ParseAnimationEvtBlock().

#define AED_SABER_SWING_SABERNUM   0
 

Definition at line 296 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_SABER_SWING_TYPE   1
 

Definition at line 297 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_SOUND_NUMRANDOMSNDS   (MAX_RANDOM_ANIM_SOUNDS)
 

Definition at line 276 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_SOUND_PROBABILITY   (MAX_RANDOM_ANIM_SOUNDS+1)
 

Definition at line 277 of file bg_public.h.

Referenced by CG_PlayerAnimEvents(), and ParseAnimationEvtBlock().

#define AED_SOUNDCHANNEL   (MAX_RANDOM_ANIM_SOUNDS+2)
 

Definition at line 279 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define AED_SOUNDINDEX_END   (MAX_RANDOM_ANIM_SOUNDS-1)
 

Definition at line 275 of file bg_public.h.

Referenced by ParseAnimationEvtBlock().

#define AED_SOUNDINDEX_START   0
 

Definition at line 274 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo(), and ParseAnimationEvtBlock().

#define ARENAS_PER_TIER   4
 

Definition at line 1670 of file bg_public.h.

#define ARMOR_PROTECTION   0.50
 

Definition at line 26 of file bg_public.h.

Referenced by CG_ColorForHealth(), CG_GetColorForHealth(), and CheckArmor().

#define ARMOR_REDUCTION_FACTOR   0.50
 

Definition at line 27 of file bg_public.h.

Referenced by CheckArmor().

#define BG_NUM_TOGGLEABLE_SURFACES   31
 

Definition at line 138 of file bg_public.h.

Referenced by CG_G2Animated(), and NPC_SetSurfaceOnOff().

#define CROUCH_MAXS_2   16
 

Definition at line 43 of file bg_public.h.

Referenced by ClientSpawn(), G_DriveATST(), NPC_ParseParms(), SP_waypoint(), and SP_waypoint_small().

#define CROUCH_VIEWHEIGHT   (CROUCH_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)
 

Definition at line 48 of file bg_public.h.

Referenced by CG_CalcMuzzlePoint().

#define CS_AMBIENT_SET   37
 

Definition at line 90 of file bg_public.h.

Referenced by CG_EntityEvent(), CG_PlayDoorLoopSound(), CG_PlayDoorSound(), and G_SoundSetIndex().

#define CS_BOTINFO   25
 

Definition at line 80 of file bg_public.h.

#define CS_BSP_MODELS   (CS_TERRAINS + MAX_TERRAINS)
 

Definition at line 118 of file bg_public.h.

Referenced by G_BSPIndex().

#define CS_CLIENT_DUELHEALTHS   31
 

Definition at line 87 of file bg_public.h.

Referenced by CheckTournament(), and G_InitGame().

#define CS_CLIENT_DUELISTS   30
 

Definition at line 86 of file bg_public.h.

Referenced by CG_SetConfigValues(), CheckIntermissionExit(), CheckTournament(), and G_InitGame().

#define CS_CLIENT_DUELWINNER   29
 

Definition at line 85 of file bg_public.h.

Referenced by AdjustTournamentScores(), BeginIntermission(), CalculateRanks(), CG_SetConfigValues(), CheckIntermissionExit(), and G_InitGame().

#define CS_CLIENT_JEDIMASTER   28
 

Definition at line 84 of file bg_public.h.

Referenced by CG_SetConfigValues(), G_InitGame(), JMSaberTouch(), and ThrowSaberToAttacker().

#define CS_EFFECTS   (CS_PARTICLES+MAX_LOCATIONS)
 

Definition at line 113 of file bg_public.h.

Referenced by CG_EntityEvent(), and G_EffectIndex().

#define CS_FLAGSTATUS   23
 

Definition at line 78 of file bg_public.h.

Referenced by CG_SetConfigValues(), and Team_SetFlagStatus().

#define CS_G2BONES   (CS_PLAYERS+MAX_CLIENTS)
 

Definition at line 106 of file bg_public.h.

Referenced by CG_G2ServerBoneAngles(), and G_BoneIndex().

#define CS_GAME_VERSION   20
 

Definition at line 75 of file bg_public.h.

Referenced by CG_Init(), and SP_worldspawn().

#define CS_GLOBAL_AMBIENT_SET   32
 

Definition at line 88 of file bg_public.h.

Referenced by CG_DrawActiveFrame(), multi_trigger_run(), and SP_worldspawn().

#define CS_ICONS   (CS_SOUNDS+MAX_SOUNDS)
 

Definition at line 101 of file bg_public.h.

Referenced by G_IconIndex().

#define CS_INTERMISSION   22
 

Definition at line 77 of file bg_public.h.

Referenced by LogExit().

#define CS_ITEMS   27
 

Definition at line 82 of file bg_public.h.

Referenced by SaveRegisteredItems().

#define CS_LEVEL_START_TIME   21
 

Definition at line 76 of file bg_public.h.

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

#define CS_LIGHT_STYLES   (CS_EFFECTS + MAX_FX)
 

Definition at line 114 of file bg_public.h.

Referenced by CG_SetLightstyle(), and SP_worldspawn().

#define CS_LOCATIONS   (CS_G2BONES+MAX_G2BONES)
 

Definition at line 111 of file bg_public.h.

Referenced by CG_DrawNewTeamInfo().

#define CS_MAX   (CS_BSP_MODELS + MAX_SUB_BSP)
 

Definition at line 120 of file bg_public.h.

#define CS_MESSAGE   3
 

Definition at line 60 of file bg_public.h.

Referenced by CG_DrawInformation(), and SP_worldspawn().

#define CS_MODELS   (CS_SIEGE_ICONS+1)
 

Definition at line 98 of file bg_public.h.

Referenced by CG_G2AnimEntModelLoad(), CG_Player(), G_ModelIndex(), and TurretClientRun().

#define CS_MOTD   4
 

Definition at line 61 of file bg_public.h.

Referenced by CG_DrawInformation(), and SP_worldspawn().

#define CS_MUSIC   2
 

Definition at line 59 of file bg_public.h.

Referenced by CG_StartMusic(), SP_worldspawn(), and target_play_music_use().

#define CS_PARTICLES   (CS_LOCATIONS+MAX_LOCATIONS)
 

Definition at line 112 of file bg_public.h.

#define CS_PLAYERS   (CS_ICONS+MAX_ICONS)
 

Definition at line 102 of file bg_public.h.

Referenced by CG_DrawSiegeInfo(), CG_LoadingClient(), CG_NewClientInfo(), ClientDisconnect(), and ClientUserinfoChanged().

#define CS_SCORES1   6
 

Definition at line 63 of file bg_public.h.

Referenced by CalculateRanks(), and CG_SetConfigValues().

#define CS_SCORES2   7
 

Definition at line 64 of file bg_public.h.

Referenced by CalculateRanks(), and CG_SetConfigValues().

#define CS_SHADERSTATE   24
 

Definition at line 79 of file bg_public.h.

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

#define CS_SIEGE_ICONS   (CS_SIEGE_WINTEAM+1)
 

Definition at line 96 of file bg_public.h.

#define CS_SIEGE_OBJECTIVES   (CS_SIEGE_STATE+1)
 

Definition at line 93 of file bg_public.h.

Referenced by G_SiegeSetObjectiveComplete(), and InitSiegeMode().

#define CS_SIEGE_STATE   (CS_AMBIENT_SET+MAX_AMBIENT_SETS)
 

Definition at line 92 of file bg_public.h.

Referenced by SiegeBeginRound(), SiegeCheckTimers(), and SiegeRoundComplete().

#define CS_SIEGE_TIMEOVERRIDE   (CS_SIEGE_OBJECTIVES+1)
 

Definition at line 94 of file bg_public.h.

Referenced by InitSiegeMode().

#define CS_SIEGE_WINTEAM   (CS_SIEGE_TIMEOVERRIDE+1)
 

Definition at line 95 of file bg_public.h.

Referenced by SiegeSetCompleteData().

#define CS_SKYBOXORG   (CS_MODELS+MAX_MODELS)
 

Definition at line 99 of file bg_public.h.

Referenced by CG_DrawActiveFrame(), and SP_misc_skyportal().

#define CS_SOUNDS   (CS_SKYBOXORG+1)
 

Definition at line 100 of file bg_public.h.

Referenced by CG_EntityEvent(), and G_SoundIndex().

#define CS_TEAMVOTE_NO   18
 

Definition at line 73 of file bg_public.h.

Referenced by Cmd_CallTeamVote_f(), and Cmd_TeamVote_f().

#define CS_TEAMVOTE_STRING   14
 

Definition at line 71 of file bg_public.h.

Referenced by Cmd_CallTeamVote_f().

#define CS_TEAMVOTE_TIME   12
 

Definition at line 70 of file bg_public.h.

Referenced by CheckTeamVote(), and Cmd_CallTeamVote_f().

#define CS_TEAMVOTE_YES   16
 

Definition at line 72 of file bg_public.h.

Referenced by Cmd_CallTeamVote_f(), and Cmd_TeamVote_f().

#define CS_TERRAINS   (CS_LIGHT_STYLES + (MAX_LIGHT_STYLES*3))
 

Definition at line 117 of file bg_public.h.

Referenced by CG_ParseServerinfo(), and SP_terrain().

#define CS_VOTE_NO   11
 

Definition at line 68 of file bg_public.h.

Referenced by Cmd_CallVote_f(), and Cmd_Vote_f().

#define CS_VOTE_STRING   9
 

Definition at line 66 of file bg_public.h.

Referenced by Cmd_CallVote_f().

#define CS_VOTE_TIME   8
 

Definition at line 65 of file bg_public.h.

Referenced by CheckVote(), and Cmd_CallVote_f().

#define CS_VOTE_YES   10
 

Definition at line 67 of file bg_public.h.

Referenced by Cmd_CallVote_f(), and Cmd_Vote_f().

#define CS_WARMUP   5
 

Definition at line 62 of file bg_public.h.

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

#define DEAD_VIEWHEIGHT   -16
 

Definition at line 49 of file bg_public.h.

#define DEFAULT_GRAVITY   800
 

Definition at line 24 of file bg_public.h.

Referenced by BG_EvaluateTrajectory(), and BG_EvaluateTrajectoryDelta().

#define DEFAULT_MAXS_2   40
 

Definition at line 42 of file bg_public.h.

Referenced by BotTrace_Strafe(), CG_BuildSolidList(), CG_CalcEntityLerpPositions(), CG_DrawAutoMap(), CG_EntityEvent(), ClientSpawn(), G_DriveATST(), G_RMGPathing(), misc_faller_create(), NAVNEW_TestNodeConnectionBlocked(), NPC_ParseParms(), SP_waypoint(), SP_waypoint_small(), VEH_TryEject(), and waypoint_testDirection().

#define DEFAULT_MINS_2   -24
 

Definition at line 41 of file bg_public.h.

Referenced by BG_VehicleAdjustBBoxForOrientation(), CG_BuildSolidList(), CG_CalcEntityLerpPositions(), CG_CalcVehicleMuzzlePoint(), CG_DrawAutoMap(), CG_EntityEvent(), G_RMGPathing(), misc_faller_create(), NAVNEW_TestNodeConnectionBlocked(), NPC_ParseParms(), SP_waypoint(), SP_waypoint_small(), VEH_TryEject(), waypoint_testDirection(), and WP_VehCheckTraceFromCamPos().

#define DEFAULT_VIEWHEIGHT   (DEFAULT_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)
 

Definition at line 47 of file bg_public.h.

Referenced by CG_CalcMuzzlePoint().

#define DF_FIXED_FOV   16
 

Definition at line 1163 of file bg_public.h.

#define DF_NO_FALLING   8
 

Definition at line 1162 of file bg_public.h.

Referenced by ClientEvents().

#define DF_NO_FOOTSTEPS   32
 

Definition at line 1164 of file bg_public.h.

Referenced by CG_PredictPlayerState(), and ClientThink_real().

#define EF2_ALERTED   (1<<2)
 

Definition at line 618 of file bg_public.h.

Referenced by Rancor_CheckRoar().

#define EF2_BRACKET_ENTITY   (1<<6)
 

Definition at line 622 of file bg_public.h.

Referenced by finish_spawning_turretG2().

#define EF2_FLYING   (1<<4)
 

Definition at line 620 of file bg_public.h.

Referenced by Boba_Flying(), Boba_FlyStart(), Boba_FlyStop(), Boba_StopKnockdown(), ClientThink_real(), Interrogator_die(), NPC_MoveToGoal(), NPC_ParseParms(), NPC_SetMiscDefaultData(), PM_SetSpecialMoveValues(), and WP_SaberStartMissileBlockCheck().

#define EF2_GENERIC_NPC_FLAG   (1<<3)
 

Definition at line 619 of file bg_public.h.

Referenced by CG_Player(), G_HeldByMonster(), and NPC_BSRancor_Default().

#define EF2_HELD_BY_MONSTER   (1<<0)
 

Definition at line 616 of file bg_public.h.

Referenced by CG_Player(), ClientThink_real(), NPC_ClearLookTarget(), NPC_RemoveBody(), NPC_SetLookTarget(), NPC_TempLookTarget(), Rancor_Bite(), Rancor_DropVictim(), Rancor_Smash(), Rancor_Swing(), WP_SaberRadiusDamage(), and WP_SaberStartMissileBlockCheck().

#define EF2_HYPERSPACE   (1<<5)
 

Definition at line 621 of file bg_public.h.

Referenced by CG_Player(), hyperspace_touch(), PM_VehFaceHyperspacePoint(), and SP_func_static().

#define EF2_NOT_USED_1   (1<<8)
 

Definition at line 624 of file bg_public.h.

#define EF2_SHIP_DEATH   (1<<7)
 

Definition at line 623 of file bg_public.h.

Referenced by CG_Player(), ClientThink_real(), MaintainBodyQueue(), and player_die().

#define EF2_USE_ALT_ANIM   (1<<1)
 

Definition at line 617 of file bg_public.h.

Referenced by NPC_BSRancor_Default(), NPC_BSWampa_Default(), and Wampa_Move().

#define EF_ALT_FIRING   (1<<10)
 

Definition at line 583 of file bg_public.h.

Referenced by CG_AddPlayerWeapon(), CG_EntityEvent(), CreateMissile(), G_MissileImpact(), PM_AdjustAttackStates(), PmoveSingle(), WP_DisruptorAltFire(), and WP_FireVehicleWeapon().

#define EF_BODYPUSH   (1<<19)
 

Definition at line 596 of file bg_public.h.

Referenced by CG_Player(), and ClientThink_real().

#define EF_CLIENTSMOOTH   (1<<28)
 

Definition at line 607 of file bg_public.h.

Referenced by G_SpecialSpawnItem(), misc_faller_create(), and SP_misc_siege_item().

#define EF_CONNECTION   (1<<14)
 

Definition at line 589 of file bg_public.h.

Referenced by ClientEndFrame().

#define EF_DEAD   (1<<1)
 

Definition at line 561 of file bg_public.h.

Referenced by BG_FighterUpdate(), BG_G2PlayerAngles(), BG_PlayerStateToEntityState(), BG_PlayerStateToEntityStateExtraPolate(), CG_CalcEntityLerpPositions(), CG_CheckPlayerG2Weapons(), CG_DrawPlayerShield(), CG_DrawPlayerSphere(), CG_DrawSiegeInfo(), CG_G2Animated(), CG_G2PlayerHeadAnims(), CG_Player(), CG_ResetPlayerEntity(), DoFall(), G_Damage(), ItemUse_Jetpack(), ItemUse_UseCloak(), multi_trigger(), P_DamageFeedback(), PM_ItemUsable(), WP_ForcePowersUpdate(), and WP_ForcePowerUsable().

#define EF_DISINTEGRATION   (1<<26)
 

Definition at line 604 of file bg_public.h.

Referenced by body_die(), CG_Player(), ClientThink_real(), CorpsePhysics(), PmoveSingle(), and WP_DisruptorAltFire().

#define EF_DOUBLE_AMMO   (1<<20)
 

Definition at line 598 of file bg_public.h.

Referenced by ammo_generic_power_converter_use(), CG_DrawSiegeInfo(), CG_ParseSiegeExtendedDataEntry(), and ClientSpawn().

#define EF_DROPPEDWEAPON   (1<<25)
 

Definition at line 603 of file bg_public.h.

Referenced by BG_CanItemBeGrabbed(), and LaunchItem().

#define EF_FIRING   (1<<9)
 

Definition at line 582 of file bg_public.h.

Referenced by CG_AddPlayerWeapon(), CG_AddViewWeapon(), ClientIntermissionThink(), ClientThink_real(), laserTrapStick(), laserTrapThink(), PM_AdjustAttackStates(), and PmoveSingle().

#define EF_G2ANIMATING   (1<<0)
 

Definition at line 560 of file bg_public.h.

Referenced by EWeb_SetBoneAnim(), and TurboLaser_SetBoneAnim().

#define EF_INVULNERABLE   (1<<27)
 

Definition at line 605 of file bg_public.h.

Referenced by CG_Player(), ClientEvents(), ClientSpawn(), ClientThink_real(), DoGripAction(), ForceDrainDamage(), ForceLightningDamage(), ForceThrow(), G_CheapWeaponFire(), G_Damage(), JMSaberTouch(), and WP_SaberPositionUpdate().

#define EF_ITEMPLACEHOLDER   (1<<23)
 

Definition at line 601 of file bg_public.h.

Referenced by RespawnItem(), and Touch_Item().

#define EF_JETPACK   (1<<29)
 

Definition at line 609 of file bg_public.h.

Referenced by CG_Player(), and ClientThink_real().

#define EF_JETPACK_ACTIVE   (1<<11)
 

Definition at line 584 of file bg_public.h.

Referenced by CG_G2MarkEvent(), CG_Player(), CG_VehicleWeaponImpact(), ClientThink_real(), G_RunMissile(), and WP_FireVehicleWeapon().

#define EF_JETPACK_FLAMING   (1<<30)
 

Definition at line 610 of file bg_public.h.

Referenced by CG_Player(), ClientThink_real(), and PmoveSingle().

#define EF_MISSILE_STICK   (1<<22)
 

Definition at line 600 of file bg_public.h.

Referenced by CreateLaserTrap(), ForceThrow(), funcBBrushDieGo(), G_MissileImpact(), G_RunMissile(), and WP_SaberStartMissileBlockCheck().

#define EF_NODRAW   (1<<8)
 

Definition at line 581 of file bg_public.h.

Referenced by CG_Player(), ClientThink_real(), CorpsePhysics(), CreateShield(), Disappear(), FinishSpawningItem(), ForceThrow(), func_usable_use(), func_wait_return_solid(), FX_DrawPortableShield(), JMSaberThink(), JMSaberTouch(), NPC_Begin(), NPC_BSRemove(), NPC_CheckInvestigate(), NPC_ClearGoal(), NPC_PickEnemy(), NPC_SearchForWeapons(), NPC_Spawn_Do(), PlaceShield(), PmoveSingle(), Q3_GetFloat(), Rancor_Attack(), Rancor_DropVictim(), RespawnItem(), ShieldGoNotSolid(), ShieldGoSolid(), SiegeItemUse(), SP_func_usable(), SP_func_wall(), SP_misc_siege_item(), ThrowSaberToAttacker(), Touch_Item(), use_wall(), and WP_SaberInitBladeData().

#define EF_NOT_USED_1   (1<<12)
 

Definition at line 586 of file bg_public.h.

#define EF_NOT_USED_2   (1<<16)
 

Definition at line 592 of file bg_public.h.

#define EF_NOT_USED_3   (1<<17)
 

Definition at line 593 of file bg_public.h.

#define EF_NOT_USED_4   (1<<18)
 

Definition at line 594 of file bg_public.h.

#define EF_NOT_USED_5   (1<<31)
 

Definition at line 612 of file bg_public.h.

#define EF_NOT_USED_6   (1<<15)
 

Definition at line 590 of file bg_public.h.

#define EF_PERMANENT   (1<<7)
 

Definition at line 579 of file bg_public.h.

Referenced by CG_AddSaberBlade(), SP_func_static(), SP_misc_bsp(), SP_target_speaker(), and SP_terrain().

#define EF_PLAYER_EVENT   (1<<5)
 

Definition at line 570 of file bg_public.h.

Referenced by CG_CheckEvents(), and SendPendingPredictableEvents().

#define EF_RADAROBJECT   (1<<2)
 

Definition at line 564 of file bg_public.h.

Referenced by CG_DrawRadar(), SiegeIconUse(), SiegeItemUse(), siegeTriggerUse(), SP_func_rotating(), SP_info_siege_objective(), SP_info_siege_radaricon(), SP_misc_ammo_floor_unit(), SP_misc_model_health_power_converter(), SP_misc_shield_floor_unit(), SP_misc_siege_item(), SP_misc_turretG2(), and WP_FireVehicleWeapon().

#define EF_RAG   (1<<6)
 

Definition at line 576 of file bg_public.h.

Referenced by CG_CalcEntityLerpPositions(), CG_G2Animated(), CG_Player(), CG_RagDoll(), ClientCommand(), hurt_touch(), misc_faller_create(), and TryUse().

#define EF_SEEKERDRONE   (1<<21)
 

Definition at line 599 of file bg_public.h.

Referenced by BG_PlayerStateToEntityState(), BG_PlayerStateToEntityStateExtraPolate(), CG_Player(), G_ItemUsable(), ItemUse_Seeker(), PM_ItemUsable(), and SeekerDroneUpdate().

#define EF_SHADER_ANIM   (1<<4)
 

Definition at line 568 of file bg_public.h.

Referenced by func_usable_use(), G_EntIsRemovableUsable(), SP_func_door(), SP_func_static(), SP_func_usable(), SP_misc_turretG2(), turretG2_base_use(), turretG2_die(), and turretG2_respawn().

#define EF_SOUNDTRACKER   (1<<24)
 

Definition at line 602 of file bg_public.h.

Referenced by CG_EntityEvent(), CG_UpdateSoundTrackers(), G_FreeEntity(), G_MuteSound(), G_RunFrame(), and G_Sound().

#define EF_TALK   (1<<13)
 

Definition at line 588 of file bg_public.h.

Referenced by ClientIntermissionThink(), and PmoveSingle().

#define EF_TELEPORT_BIT   (1<<3)
 

Definition at line 566 of file bg_public.h.

Referenced by ClientSpawn(), and TeleportPlayer().

#define EV_EVENT_BIT1   0x00000100
 

Definition at line 728 of file bg_public.h.

Referenced by G_AddEvent().

#define EV_EVENT_BIT2   0x00000200
 

Definition at line 729 of file bg_public.h.

#define EV_EVENT_BITS   (EV_EVENT_BIT1|EV_EVENT_BIT2)
 

Definition at line 730 of file bg_public.h.

Referenced by CG_CheckEvents(), CG_EntityEvent(), and G_AddEvent().

#define EVENT_VALID_MSEC   300
 

Definition at line 732 of file bg_public.h.

Referenced by G_RunFrame().

#define FX_STATE_CONTINUOUS   20
 

Definition at line 1183 of file bg_public.h.

Referenced by fx_runner_think().

#define FX_STATE_OFF   0
 

Definition at line 1180 of file bg_public.h.

Referenced by fx_runner_use(), and SP_fx_runner().

#define FX_STATE_ONE_SHOT   1
 

Definition at line 1181 of file bg_public.h.

Referenced by fx_runner_use().

#define FX_STATE_ONE_SHOT_LIMIT   10
 

Definition at line 1182 of file bg_public.h.

Referenced by fx_runner_use().

#define G2_MODEL_PART   50
 

Definition at line 136 of file bg_public.h.

Referenced by G_BounceMissile(), G_DeflectMissile(), G_Dismember(), G_MissileImpact(), G_ReflectMissile(), and G_RunMissile().

#define GAME_VERSION   "basejka-1"
 

Definition at line 20 of file bg_public.h.

Referenced by CG_Init(), and SP_worldspawn().

#define GIB_HEALTH   -40
 

Definition at line 25 of file bg_public.h.

Referenced by BG_PlayerStateToEntityState(), BG_PlayerStateToEntityStateExtraPolate(), body_die(), and player_die().

#define HYPERSPACE_SPEED   10000.0f
 

Definition at line 1679 of file bg_public.h.

#define HYPERSPACE_TELEPORT_FRAC   0.75f
 

Definition at line 1678 of file bg_public.h.

Referenced by hyperspace_touch(), and PM_VehFaceHyperspacePoint().

#define HYPERSPACE_TIME   4000
 

Definition at line 1677 of file bg_public.h.

Referenced by hyperspace_touch(), PM_UpdateViewAngles(), PM_VehFaceHyperspacePoint(), PmoveSingle(), and shipboundary_touch().

#define HYPERSPACE_TURN_RATE   45.0f
 

Definition at line 1680 of file bg_public.h.

#define ITEM_INDEX  )     ((x)-bg_itemlist)
 

Definition at line 1150 of file bg_public.h.

Referenced by CG_DrawFlagModel().

#define ITEM_RADIUS   15
 

Definition at line 35 of file bg_public.h.

Referenced by LaunchItem().

#define JUMP_VELOCITY   225
 

Definition at line 29 of file bg_public.h.

Referenced by Jedi_SaberBlockGo(), and WP_GetVelocityForForceJump().

#define MASK_ALL   (-1)
 

Definition at line 1168 of file bg_public.h.

#define MASK_DEADSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_TERRAIN)
 

Definition at line 1172 of file bg_public.h.

Referenced by SP_waypoint(), and SP_waypoint_small().

#define MASK_NPCSOLID   (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_BODY|CONTENTS_TERRAIN)
 

Definition at line 1171 of file bg_public.h.

Referenced by BG_FighterUpdate(), NAV_FindClosestWaypointForPoint2(), NAVNEW_TestNodeConnectionBlocked(), NPC_Begin(), NPC_Spawn_Do(), and NPC_SpotWouldTelefrag().

#define MASK_OPAQUE   (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA|CONTENTS_TERRAIN)
 

Definition at line 1174 of file bg_public.h.

Referenced by CanSee(), G_ClearLOS(), G_FindLocalInterestPoint(), and TryUse().

#define MASK_PLAYERSOLID   (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY|CONTENTS_TERRAIN)
 

Definition at line 1170 of file bg_public.h.

Referenced by BotTrace_Duck(), BotTrace_Jump(), BotTrace_Strafe(), CalcEntitySpot(), CanGetToVectorTravel(), CG_CalcEntityLerpPositions(), CG_G2MarkEvent(), CG_G2SaberEffects(), CG_PredictPlayerState(), CG_SaberCompWork(), CheckForFriendInLOF(), ClientCommand(), ClientSpawn(), ClientThink_real(), Cmd_EngageDuel_f(), Do_Strike(), DoGripAction(), EWeb_Create(), EWebPositionUser(), ForceGrip(), ForceTelepathyCheckDirectNPCTarget(), ForceThrow(), G_ItemUsable(), G_RunItem(), MakeDeadSaber(), misc_faller_create(), PM_AdjustAngleForWallJump(), PM_AdjustAngleForWallRun(), PM_AdjustAngleForWallRunUp(), PM_CanBackstab(), PM_CheckStabDown(), PM_ItemUsable(), PM_RocketLock(), PM_SomeoneInFront(), PM_WeaponLightsaber(), saberFirstThrown(), SaberUpdateSelf(), SiegeItemUse(), SP_misc_siege_item(), SpectatorThink(), WP_SaberInitBladeData(), WP_SaberPositionUpdate(), WP_SaberStartMissileBlockCheck(), and WPOrgVisible().

#define MASK_SHOT   (CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_CORPSE|CONTENTS_TERRAIN)
 

Definition at line 1175 of file bg_public.h.

Referenced by Boba_FireDecide(), Boba_FireFlameThrower(), CanShoot(), CreateLaserTrap(), CreateShield(), drop_charge(), EWebFire(), FireVehicleWeapon(), ForceShootDrain(), ForceShootLightning(), ForceThrow(), G_ItemUsable(), Howler_TryDamage(), ImperialProbe_FireBlaster(), Jedi_FindEnemyInCone(), laserTrapThink(), maglock_link(), Mark1_FireBlaster(), Mark1_FireRocket(), Mark1Dead_FireBlaster(), Mark1Dead_FireRocket(), Mark2_FireBlaster(), MineMonster_TryDamage(), NPC_BSAdvanceFight(), NPC_BSGM_Attack(), NPC_BSSniper_Attack(), NPC_CheckCanAttack(), NPC_ClearShot(), NPC_ShotEntity(), pas_adjust_enemy(), PlaceShield(), PM_ItemUsable(), Remote_Fire(), Seeker_Fire(), Sentry_Fire(), Sniper_FaceEnemy(), turret_base_think(), turretG2_base_think(), VEH_TurretThink(), WP_DisruptorAltFire(), WP_FireBlasterMissile(), WP_FireEmplacedMissile(), WP_FireGenericBlasterMissile(), WP_FireMelee(), WP_FireStunBaton(), WP_FireThermalDetonator(), WP_FireTurboLaserMissile(), WP_FireTurretMissile(), WP_FireVehicleWeapon(), and WP_SaberPositionUpdate().

#define MASK_SOLID   (CONTENTS_SOLID|CONTENTS_TERRAIN)
 

Definition at line 1169 of file bg_public.h.

Referenced by BotFallbackNavigation(), BotSurfaceNear(), CanDamage(), CanGetToVector(), CG_AddSaberBlade(), CG_DrawAutoMap(), CG_EntityEvent(), CG_RagDoll(), CheckForFunc(), ConnectTrail(), CTFFlagMovement(), DoorBlockingSection(), EntityVisibleBox(), FinishSpawningItem(), FlagObjects(), G_Dismember(), G_EstimateCamPos(), G_ItemUsable(), G_RMGPathing(), G_SpecialSpawnItem(), G_TestEntityPosition(), GetNearestBadThing(), GetNewFlagPoint(), ImperialProbe_Strafe(), ImperialProbe_Wait(), Interrogator_Strafe(), ItemUse_Sentry(), MeleeCombatHandling(), NPC_Probe_Pain(), NPC_SpawnType(), OrgVisible(), OrgVisibleBox(), OrgVisibleCurve(), pitch_roll_for_slope(), PlaceShield(), PM_GroundDistance(), PM_ItemUsable(), PM_pitch_roll_for_slope(), PM_WalkableGroundDistance(), Remote_Strafe(), SaberCombatHandling(), saberFirstThrown(), saberKnockDown(), Seeker_Strafe(), SeekerDroneUpdate(), Sentry_Strafe(), SiegeTakesPriority(), SP_emplaced_gun(), SP_info_jedimaster_start(), SP_misc_ammo_floor_unit(), SP_misc_holocron(), SP_misc_model_ammo_power_converter(), SP_misc_model_health_power_converter(), SP_misc_model_shield_power_converter(), SP_misc_shield_floor_unit(), StrafeTracing(), W_TraceSetStart(), and WPOrgVisible().

#define MASK_WATER   (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME)
 

Definition at line 1173 of file bg_public.h.

#define MAX_ANIM_EVENTS   300
 

Definition at line 256 of file bg_public.h.

Referenced by BG_ParseAnimationEvtFile(), CG_PlayerAnimEvents(), CheckAnimFrameForEventType(), and ParseAnimationEvtBlock().

#define MAX_ANIM_FILES   16
 

Definition at line 255 of file bg_public.h.

Referenced by BG_AnimsetAlloc(), BG_ParseAnimationEvtFile(), and UI_AnimsetAlloc().

#define MAX_ARENAS   1024
 

Definition at line 1671 of file bg_public.h.

Referenced by G_ParseInfos(), and UI_ParseInfos().

#define MAX_ARENAS_TEXT   8192
 

Definition at line 1672 of file bg_public.h.

#define MAX_BOTS   1024
 

Definition at line 1674 of file bg_public.h.

#define MAX_BOTS_TEXT   8192
 

Definition at line 1675 of file bg_public.h.

#define MAX_CLIENT_SCORE_SEND   20
 

Definition at line 51 of file bg_public.h.

Referenced by DeathmatchScoreboardMessage().

#define MAX_CUSTOM_SIEGE_SOUNDS   30
 

Definition at line 140 of file bg_public.h.

Referenced by CG_GetStringForVoiceSound(), CG_LoadCISounds(), and G_InitGame().

#define MAX_ITEM_MODELS   4
 

Definition at line 1118 of file bg_public.h.

Referenced by CG_DestroyAllGhoul2().

#define MAX_ITEMS   256
 

Definition at line 31 of file bg_public.h.

Referenced by CG_DestroyAllGhoul2(), and SaveRegisteredItems().

#define MAX_RANDOM_ANIM_SOUNDS   4
 

Definition at line 271 of file bg_public.h.

Referenced by ParseAnimationEvtBlock().

#define MAX_SPAWN_VARS   64
 

Definition at line 16 of file bg_public.h.

Referenced by CG_ParseSpawnVars(), and G_ParseSpawnVars().

#define MAX_SPAWN_VARS_CHARS   4096
 

Definition at line 17 of file bg_public.h.

Referenced by CG_AddSpawnVarToken(), and G_AddSpawnVarToken().

#define MAXTOUCH   32
 

Definition at line 421 of file bg_public.h.

Referenced by PM_AddTouchEnt().

#define MINS_Z   -24
 

Definition at line 46 of file bg_public.h.

Referenced by PM_CheckFixMins().

#define PLAYEREVENT_DENIEDREWARD   0x0001
 

Definition at line 716 of file bg_public.h.

Referenced by CG_CheckLocalSounds(), and Pickup_Powerup().

#define PLAYEREVENT_GAUNTLETREWARD   0x0002
 

Definition at line 717 of file bg_public.h.

Referenced by CG_CheckLocalSounds(), and player_die().

#define PMF_ALL_TIMES   (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
 

Definition at line 419 of file bg_public.h.

#define PMF_BACKWARDS_JUMP   8
 

Definition at line 406 of file bg_public.h.

#define PMF_BACKWARDS_RUN   16
 

Definition at line 407 of file bg_public.h.

Referenced by PmoveSingle().

#define PMF_DUCKED   1
 

Definition at line 403 of file bg_public.h.

Referenced by emplaced_gun_use(), Jedi_SaberBlockGo(), NPC_CheckEnemyStealth(), PM_CheckFixMins(), PM_SaberAttackForMovement(), PM_SetSaberMove(), PM_WeaponLightsaber(), and WP_SabersCheckLock().

#define PMF_FIX_MINS   128
 

Definition at line 410 of file bg_public.h.

Referenced by PM_CheckDualForwardJumpDuck(), and PM_CheckFixMins().

#define PMF_FOLLOW   4096
 

Definition at line 415 of file bg_public.h.

Referenced by CG_CheckPlayerG2Weapons(), CG_DrawAutoMap(), CG_DrawRadar(), CG_EntityEvent(), CG_NextForcePower_f(), CG_NextInventory_f(), CG_NextWeapon_f(), CG_Player(), CG_PredictPlayerState(), CG_PrevForcePower_f(), CG_PrevInventory_f(), CG_PrevWeapon_f(), CG_Weapon_f(), CG_WeaponClean_f(), CheckExitRules(), ClientThink_real(), DownedSaberThink(), G_CheckClientIdle(), G_RunFrame(), NPC_SomeoneLookingAtMe(), NPC_Think(), SaberUpdateSelf(), SiegeBeginRound(), SiegeItemThink(), SpectatorClientEndFrame(), StopFollowing(), Touch_Multi(), TryUse(), Use_Target_Escapetrig(), WP_ForcePowersUpdate(), WP_ForcePowerUsable(), and WP_SaberStartMissileBlockCheck().

#define PMF_JUMP_HELD   2
 

Definition at line 404 of file bg_public.h.

Referenced by PM_AdjustAngleForWallJump(), PM_AdjustAngleForWallRunUp(), PM_ForceJumpingUp(), PM_SaberAttackForMovement(), Pmove(), PmoveSingle(), StandardBotAI(), and WP_ForcePowersUpdate().

#define PMF_RESPAWNED   512
 

Definition at line 412 of file bg_public.h.

Referenced by ClientSpawn(), NPC_Begin(), PM_AdjustAttackStates(), and PmoveSingle().

#define PMF_ROLLING   4
 

Definition at line 405 of file bg_public.h.

#define PMF_SCOREBOARD   8192
 

Definition at line 416 of file bg_public.h.

Referenced by CG_DrawActive(), and SpectatorClientEndFrame().

#define PMF_STUCK_TO_WALL   16384
 

Definition at line 417 of file bg_public.h.

Referenced by ForceThrow(), G_Damage(), G_LetGoOfWall(), player_die(), PM_AdjustAngleForWallJump(), PM_ClipVelocity(), PM_GrabWallForJump(), PM_SlideMove(), PmoveSingle(), and WP_ForcePowerUsable().

#define PMF_TIME_KNOCKBACK   64
 

Definition at line 409 of file bg_public.h.

Referenced by ClientSpawn(), G_ApplyKnockback(), G_Damage(), G_Throw(), Jedi_SaberBlockGo(), NPC_Begin(), PM_AdjustAngleForWallJump(), TeleportPlayer(), and WP_ResistForcePush().

#define PMF_TIME_LAND   32
 

Definition at line 408 of file bg_public.h.

#define PMF_TIME_WATERJUMP   256
 

Definition at line 411 of file bg_public.h.

Referenced by PmoveSingle().

#define PMF_UPDATE_ANIM   2048
 

Definition at line 414 of file bg_public.h.

#define PMF_USE_ITEM_HELD   1024
 

Definition at line 413 of file bg_public.h.

Referenced by G_ItemUsable(), and PM_ItemUsable().

#define RANK_TIED_FLAG   0x4000
 

Definition at line 33 of file bg_public.h.

Referenced by CalculateRanks(), and CG_PlaceString().

#define SABER_BLOCK_DUR   150
 

Definition at line 1157 of file bg_public.h.

#define SCORE_NOT_PRESENT   -9999
 

Definition at line 37 of file bg_public.h.

Referenced by CalculateRanks().

#define SETANIM_BOTH   SETANIM_TORSO|SETANIM_LEGS
 

Definition at line 500 of file bg_public.h.

Referenced by AnimateRiders(), ATST_Idle(), ClientSpawn(), Cmd_DebugSetBodyAnim_f(), G_BreakArm(), G_CheckClientIdle(), G_DriveATST(), G_SpecialRollGetup(), G_VehicleAttachDroidUnit(), GM_StartGloat(), Howler_Attack(), ImperialProbe_AttackDecision(), ImperialProbe_Hunt(), ImperialProbe_Patrol(), Initialize(), Jedi_Ambush(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), Mark1_BlasterAttack(), Mark1_die(), Mark1_Idle(), Mark2_AttackDecision(), MineMonster_Attack(), NPC_Begin(), NPC_BSGM_Attack(), NPC_BSJump(), NPC_BSSearch(), NPC_BSST_Patrol(), NPC_BSWander(), NPC_ChoosePainAnimation(), NPC_Droid_Pain(), NPC_Howler_Pain(), NPC_Mark1_Pain(), NPC_MineMonster_Pain(), NPC_Probe_Pain(), NPC_Rancor_Pain(), NPC_Sentry_Pain(), NPC_Wampa_Pain(), player_die(), PM_AdjustAngleForWallJump(), PM_AdjustAngleForWallRun(), PM_AdjustAngleForWallRunUp(), PM_GrabWallForJump(), PM_SaberLockLoseAnim(), PM_SaberLockResultAnim(), PM_SaberLockWinAnim(), PM_SetSaberMove(), PM_VehicleWeaponAnimate(), PmoveSingle(), R2D2_TurnAnims(), Rancor_Attack(), Rancor_Bite(), Rancor_CheckRoar(), Rancor_Swing(), Sentry_Fire(), Sentry_Idle(), Sentry_RangedAttack(), sentry_use(), StandardSetBodyAnim(), TryGrapple(), Wampa_Attack(), Wampa_CheckRoar(), Wampa_Slash(), WP_ResistForcePush(), and WP_SaberPositionUpdate().

#define SETANIM_FLAG_HOLD   2
 

Definition at line 504 of file bg_public.h.

Referenced by AnimateRiders(), BG_SetAnimFinal(), Boba_DoFlameThrower(), ClientCommand(), ClientSpawn(), EWebPositionUser(), G_BreakArm(), G_CheckClientIdle(), G_RunFrame(), G_SpecialRollGetup(), G_VehicleAttachDroidUnit(), GM_StartGloat(), Howler_Attack(), ImperialProbe_Hunt(), Jedi_Ambush(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), Mark1_BlasterAttack(), Mark1_die(), Mark1_RocketAttack(), Mark2_AttackDecision(), MineMonster_Attack(), NPC_BSDefault(), NPC_BSGM_Attack(), NPC_BSJump(), NPC_BSST_Patrol(), NPC_ChoosePainAnimation(), NPC_Droid_Pain(), NPC_GM_StartLaser(), NPC_Howler_Pain(), NPC_Jedi_Pain(), NPC_Mark1_Pain(), NPC_MineMonster_Pain(), NPC_Probe_Pain(), NPC_Rancor_Pain(), NPC_Sentry_Pain(), NPC_Wampa_Pain(), player_die(), PM_AdjustAngleForWallJump(), PM_AdjustAngleForWallRun(), PM_AdjustAngleForWallRunUp(), PM_GrabWallForJump(), PM_SaberLockLoseAnim(), PM_SaberLockResultAnim(), PM_SaberLockWinAnim(), PM_VehicleWeaponAnimate(), PM_WeaponLightsaber(), PmoveSingle(), R2D2_TurnAnims(), Rancor_Attack(), Rancor_Bite(), Rancor_CheckRoar(), Rancor_Swing(), Sentry_Fire(), Sentry_Idle(), Sentry_RangedAttack(), sentry_use(), Touch_Multi(), TryGrapple(), TryHeal(), TryUse(), Wampa_Attack(), Wampa_CheckRoar(), Wampa_Slash(), WP_ResistForcePush(), and WP_SaberPositionUpdate().

#define SETANIM_FLAG_HOLDLESS   8
 

Definition at line 506 of file bg_public.h.

Referenced by AnimateRiders(), BG_SetAnimFinal(), ClientCommand(), and ClientSpawn().

#define SETANIM_FLAG_NORMAL   0
 

Definition at line 502 of file bg_public.h.

Referenced by AnimateRiders(), ATST_Idle(), ImperialProbe_AttackDecision(), ImperialProbe_Patrol(), Initialize(), Mark1_Idle(), NPC_Begin(), NPC_BSSearch(), NPC_BSWander(), NPC_ExecuteBState(), PM_VehicleWeaponAnimate(), and PM_WeaponLightsaber().

#define SETANIM_FLAG_OVERRIDE   1
 

Definition at line 503 of file bg_public.h.

Referenced by AnimateRiders(), BG_SetAnim(), BG_SetAnimFinal(), Boba_DoFlameThrower(), ClientCommand(), ClientSpawn(), EWebPositionUser(), G_BreakArm(), G_CheckClientIdle(), G_DriveATST(), G_RunFrame(), G_SpecialRollGetup(), G_VehicleAttachDroidUnit(), GM_StartGloat(), Howler_Attack(), ImperialProbe_Hunt(), Jedi_Ambush(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), Mark1_BlasterAttack(), Mark1_die(), Mark1_RocketAttack(), Mark2_AttackDecision(), MineMonster_Attack(), NPC_BSGM_Attack(), NPC_BSJump(), NPC_BSST_Patrol(), NPC_ChoosePainAnimation(), NPC_Droid_Pain(), NPC_GM_StartLaser(), NPC_Howler_Pain(), NPC_Jedi_Pain(), NPC_Mark1_Pain(), NPC_MineMonster_Pain(), NPC_Probe_Pain(), NPC_Rancor_Pain(), NPC_Sentry_Pain(), NPC_Wampa_Pain(), player_die(), PM_AdjustAngleForWallJump(), PM_AdjustAngleForWallRun(), PM_AdjustAngleForWallRunUp(), PM_BeginWeaponChange(), PM_FinishWeaponChange(), PM_GrabWallForJump(), PM_SaberLockLoseAnim(), PM_SaberLockResultAnim(), PM_SaberLockWinAnim(), PM_SetSaberMove(), PM_VehicleWeaponAnimate(), PM_WeaponLightsaber(), PmoveSingle(), R2D2_TurnAnims(), Rancor_Attack(), Rancor_Bite(), Rancor_CheckRoar(), Rancor_Swing(), Sentry_Fire(), Sentry_Idle(), Sentry_RangedAttack(), sentry_use(), Touch_Multi(), TryGrapple(), TryHeal(), TryUse(), Wampa_Attack(), Wampa_CheckRoar(), Wampa_Slash(), WP_ResistForcePush(), and WP_SaberPositionUpdate().

#define SETANIM_FLAG_RESTART   4
 

Definition at line 505 of file bg_public.h.

Referenced by AnimateRiders(), BG_SetAnim(), BG_SetAnimFinal(), player_die(), PM_AdjustAngleForWallJump(), PM_GrabWallForJump(), PM_SetSaberMove(), and PM_VehicleWeaponAnimate().

#define SETANIM_LEGS   2
 

Definition at line 499 of file bg_public.h.

Referenced by BG_FlipPart(), BG_SetAnim(), BG_SetAnimFinal(), EWebPositionUser(), Jedi_CheckFlipEvasions(), NPC_BSJump(), NPC_ChoosePainAnimation(), NPC_Jedi_Pain(), PM_AdjustAngleForWallJump(), PM_SetSaberMove(), and PM_WeaponLightsaber().

#define SETANIM_TORSO   1
 

Definition at line 498 of file bg_public.h.

Referenced by BG_FlipPart(), BG_SetAnim(), BG_SetAnimFinal(), BG_StartTorsoAnim(), Boba_DoFlameThrower(), ClientSpawn(), G_RunFrame(), Mark1_RocketAttack(), NPC_BSDefault(), NPC_BSGM_Attack(), NPC_BSST_Patrol(), NPC_ExecuteBState(), NPC_GM_StartLaser(), NPC_Jedi_Pain(), PM_BeginWeaponChange(), PM_FinishWeaponChange(), PM_SetSaberMove(), PM_WeaponLightsaber(), Rancor_Attack(), Touch_Multi(), TryHeal(), TryUse(), and WP_ResistForcePush().

#define STANDARD_VIEWHEIGHT_OFFSET   -4
 

Definition at line 44 of file bg_public.h.

Referenced by G_DriveATST().

#define STEPSIZE   18
 

Definition at line 22 of file bg_public.h.

Referenced by NAV_CheckAhead(), NAV_ClearPathToPoint(), NAV_TestBestNode(), NAVNEW_PushBlocker(), NAVNEW_SidestepBlocker(), NAVNEW_TestNodeConnectionBlocked(), NPC_MoveDirClear(), PM_StepSlideMove(), and waypoint_testDirection().

#define TEAM_LOCATION_UPDATE_TIME   1000
 

Definition at line 1028 of file bg_public.h.

Referenced by CheckTeamStatus().

#define TEAM_MAXOVERLAY   32
 

Definition at line 1031 of file bg_public.h.

Referenced by TeamplayInfoMessage().

#define TOSS_DEBOUNCE_TIME   5000
 

Definition at line 181 of file bg_public.h.

Referenced by ItemUse_UseDisp().

#define VOTE_TIME   30000
 

Definition at line 39 of file bg_public.h.

Referenced by CheckTeamVote(), and CheckVote().


Typedef Documentation

typedef struct animation_s animation_t
 

Referenced by BG_AnimsetAlloc(), BG_AnimsetFree(), BG_HasAnimation(), BG_ParseAnimationEvtFile(), BG_ParseAnimationFile(), BG_SetAnim(), BG_SetAnimFinal(), CG_NewClientInfo(), CG_PlayerAnimEvents(), CG_RagDoll(), G_UpdateClientAnims(), ItemParse_asset_model_go(), ParseAnimationEvtBlock(), PM_SaberLocked(), UI_AnimsetAlloc(), and UI_ParseAnimationFile().

typedef struct animevent_s animevent_t
 

Referenced by BG_ParseAnimationEvtFile(), CG_PlayerAnimEventDo(), CG_PlayerAnimEvents(), CheckAnimFrameForEventType(), and ParseAnimationEvtBlock().

typedef struct bgEntity_s bgEntity_t
 

Referenced by BG_AdjustClientSpeed(), BG_VehTraceFromCamPos(), Board(), CG_G2AnimEntModelLoad(), CG_Player(), CG_PmoveClientPointerUpdate(), CG_PredictPlayerState(), ClientDisconnect(), ClientThink_real(), Eject(), ForceGrip(), ForceThrow(), NPC_Begin(), NPC_Spawn_Do(), NPC_Use(), player_die(), PM_AdjustAttackStates(), PM_BGEntForNum(), PM_CanBackstab(), PM_CheckStabDown(), PM_HoverTrace(), PM_pitch_roll_for_slope(), PM_RocketLock(), PM_SaberLocked(), PM_SetSpecialMoveValues(), PM_SlideMove(), PM_SomeoneInFront(), PM_StepSlideMove(), PM_VehFaceHyperspacePoint(), PM_VehForcedTurning(), PM_VehicleImpact(), PM_VehicleViewAngles(), PM_VehicleWeaponAnimate(), PM_WeaponLightsaber(), PmoveSingle(), SetParent(), SetPilot(), SpectatorThink(), TryUse(), ValidateBoard(), and WP_VehCheckTraceFromCamPos().

typedef int gametype_t
 

Definition at line 199 of file bg_public.h.

typedef struct gitem_s gitem_t
 

Referenced by BG_CanItemBeGrabbed(), BG_FindItem(), BG_FindItemForAmmo(), BG_FindItemForHoldable(), BG_FindItemForPowerup(), BG_FindItemForWeapon(), CG_DrawFlagModel(), CG_DrawNewTeamInfo(), CG_EntityEvent(), CG_Init(), CG_InitG2Weapons(), CG_LoadingItem(), CG_RegisterItemVisuals(), CG_RegisterWeapon(), Cmd_Give_f(), Drop_Item(), G_CallSpawn(), G_CheckTeamItems(), G_DriveATST(), G_ItemDisabled(), G_PrecacheDispensers(), G_SpawnItem(), G_SpecialSpawnItem(), ItemUse_UseDisp(), LaunchItem(), NPC_PrecacheWeapons(), PlaceShield(), RegisterItem(), SP_gametype_item(), TossClientItems(), TossClientWeapon(), and UI_SiegeSetCvarsForClass().

typedef int holdable_t
 

Definition at line 704 of file bg_public.h.

Referenced by BG_FindItemForHoldable().

typedef int itemType_t
 

Definition at line 1116 of file bg_public.h.

typedef int powerup_t
 

Definition at line 684 of file bg_public.h.

Referenced by BG_FindItemForPowerup().

typedef int saberMoveName_t
 

Definition at line 1480 of file bg_public.h.

Referenced by PM_AttackMoveForQuad(), PM_CheckPullAttack(), PM_CheckStabDown(), PM_SaberAttackForMovement(), PM_SaberBackflipAttackMove(), PM_SaberFlipOverAttackMove(), PM_SaberJumpAttackMove(), PM_SaberJumpAttackMove2(), PM_SaberLungeAttackMove(), and PM_WeaponLightsaber().

typedef int team_t
 

Definition at line 1017 of file bg_public.h.

Referenced by AI_DistributeAttack(), AI_GetGroupSize(), CG_GetClassCount(), CG_GetTeamCount(), CG_GetTeamNonScoreCount(), G_ReadSessionData(), G_TeamCommand(), NPC_Kill_f(), NPC_Pain(), NPC_ParseParms(), NPC_Precache(), NPC_PrecacheWeapons(), NPC_WeaponsForTeam(), PickTeam(), SelectCTFSpawnPoint(), SelectInitialSpawnPoint(), SelectRandomFurthestSpawnPoint(), SelectRandomTeamSpawnPoint(), SelectSiegeSpawnPoint(), SelectSpawnPoint(), and TeamCount().


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
PW_NONE 
PW_QUAD 
PW_BATTLESUIT 
PW_PULL 
PW_REDFLAG 
PW_BLUEFLAG 
PW_NEUTRALFLAG 
PW_SHIELDHIT 
PW_SPEEDBURST 
PW_DISINT_4 
PW_SPEED 
PW_CLOAKED 
PW_FORCE_ENLIGHTENED_LIGHT 
PW_FORCE_ENLIGHTENED_DARK 
PW_FORCE_BOON 
PW_YSALAMIRI 
PW_NUM_POWERUPS 

Definition at line 652 of file bg_public.h.

00652              {
00653         PW_NONE,
00654 
00655         PW_QUAD,
00656         PW_BATTLESUIT,
00657         PW_PULL,
00658         //PW_INVIS, //rww - removed
00659         //PW_REGEN, //rww - removed
00660         //PW_FLIGHT, //rww - removed
00661 
00662         PW_REDFLAG,
00663         PW_BLUEFLAG,
00664         PW_NEUTRALFLAG,
00665 
00666         PW_SHIELDHIT,
00667 
00668         //PW_SCOUT, //rww - removed
00669         //PW_GUARD, //rww - removed
00670         //PW_DOUBLER, //rww - removed
00671         //PW_AMMOREGEN, //rww - removed
00672         PW_SPEEDBURST,
00673         PW_DISINT_4,
00674         PW_SPEED,
00675         PW_CLOAKED,
00676         PW_FORCE_ENLIGHTENED_LIGHT,
00677         PW_FORCE_ENLIGHTENED_DARK,
00678         PW_FORCE_BOON,
00679         PW_YSALAMIRI,
00680 
00681         PW_NUM_POWERUPS
00682 
00683 };

anonymous enum
 

Enumeration values:
HI_NONE 
HI_SEEKER 
HI_SHIELD 
HI_MEDPAC 
HI_MEDPAC_BIG 
HI_BINOCULARS 
HI_SENTRY_GUN 
HI_JETPACK 
HI_HEALTHDISP 
HI_AMMODISP 
HI_EWEB 
HI_CLOAK 
HI_NUM_HOLDABLE 

Definition at line 686 of file bg_public.h.

00686              {
00687         HI_NONE,
00688 
00689         HI_SEEKER,
00690         HI_SHIELD,
00691         HI_MEDPAC,
00692         HI_MEDPAC_BIG,
00693         HI_BINOCULARS,
00694         HI_SENTRY_GUN,
00695         HI_JETPACK,
00696 
00697         HI_HEALTHDISP,
00698         HI_AMMODISP,
00699         HI_EWEB,
00700         HI_CLOAK,
00701 
00702         HI_NUM_HOLDABLE
00703 };

anonymous enum
 

Enumeration values:
TEAM_FREE 
TEAM_RED 
TEAM_BLUE 
TEAM_SPECTATOR 
TEAM_NUM_TEAMS 

Definition at line 1009 of file bg_public.h.

01009              {
01010         TEAM_FREE,
01011         TEAM_RED,
01012         TEAM_BLUE,
01013         TEAM_SPECTATOR,
01014 
01015         TEAM_NUM_TEAMS
01016 };

anonymous enum
 

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

Definition at line 1103 of file bg_public.h.

01103              {
01104         IT_BAD,
01105         IT_WEAPON,                              // EFX: rotate + upscale + minlight
01106         IT_AMMO,                                // EFX: rotate
01107         IT_ARMOR,                               // EFX: rotate + minlight
01108         IT_HEALTH,                              // EFX: static external sphere + rotating internal
01109         IT_POWERUP,                             // instant on, timer based
01110                                                         // EFX: rotate + external ring that rotates
01111         IT_HOLDABLE,                    // single use, holdable item
01112                                                         // EFX: rotate + bob
01113         IT_PERSISTANT_POWERUP,
01114         IT_TEAM
01115 };

anonymous enum
 

Enumeration values:
LS_INVALID 
LS_NONE 
LS_READY 
LS_DRAW 
LS_PUTAWAY 
LS_A_TL2BR 
LS_A_L2R 
LS_A_BL2TR 
LS_A_BR2TL 
LS_A_R2L 
LS_A_TR2BL 
LS_A_T2B 
LS_A_BACKSTAB 
LS_A_BACK 
LS_A_BACK_CR 
LS_ROLL_STAB 
LS_A_LUNGE 
LS_A_JUMP_T__B_ 
LS_A_FLIP_STAB 
LS_A_FLIP_SLASH 
LS_JUMPATTACK_DUAL 
LS_JUMPATTACK_ARIAL_LEFT 
LS_JUMPATTACK_ARIAL_RIGHT 
LS_JUMPATTACK_CART_LEFT 
LS_JUMPATTACK_CART_RIGHT 
LS_JUMPATTACK_STAFF_LEFT 
LS_JUMPATTACK_STAFF_RIGHT 
LS_BUTTERFLY_LEFT 
LS_BUTTERFLY_RIGHT 
LS_A_BACKFLIP_ATK 
LS_SPINATTACK_DUAL 
LS_SPINATTACK 
LS_LEAP_ATTACK 
LS_SWOOP_ATTACK_RIGHT 
LS_SWOOP_ATTACK_LEFT 
LS_TAUNTAUN_ATTACK_RIGHT 
LS_TAUNTAUN_ATTACK_LEFT 
LS_KICK_F 
LS_KICK_B 
LS_KICK_R 
LS_KICK_L 
LS_KICK_S 
LS_KICK_BF 
LS_KICK_RL 
LS_KICK_F_AIR 
LS_KICK_B_AIR 
LS_KICK_R_AIR 
LS_KICK_L_AIR 
LS_STABDOWN 
LS_STABDOWN_STAFF 
LS_STABDOWN_DUAL 
LS_DUAL_SPIN_PROTECT 
LS_STAFF_SOULCAL 
LS_A1_SPECIAL 
LS_A2_SPECIAL 
LS_A3_SPECIAL 
LS_UPSIDE_DOWN_ATTACK 
LS_PULL_ATTACK_STAB 
LS_PULL_ATTACK_SWING 
LS_SPINATTACK_ALORA 
LS_DUAL_FB 
LS_DUAL_LR 
LS_HILT_BASH 
LS_S_TL2BR 
LS_S_L2R 
LS_S_BL2TR 
LS_S_BR2TL 
LS_S_R2L 
LS_S_TR2BL 
LS_S_T2B 
LS_R_TL2BR 
LS_R_L2R 
LS_R_BL2TR 
LS_R_BR2TL 
LS_R_R2L 
LS_R_TR2BL 
LS_R_T2B 
LS_T1_BR__R 
LS_T1_BR_TR 
LS_T1_BR_T_ 
LS_T1_BR_TL 
LS_T1_BR__L 
LS_T1_BR_BL 
LS_T1__R_BR 
LS_T1__R_TR 
LS_T1__R_T_ 
LS_T1__R_TL 
LS_T1__R__L 
LS_T1__R_BL 
LS_T1_TR_BR 
LS_T1_TR__R 
LS_T1_TR_T_ 
LS_T1_TR_TL 
LS_T1_TR__L 
LS_T1_TR_BL 
LS_T1_T__BR 
LS_T1_T___R 
LS_T1_T__TR 
LS_T1_T__TL 
LS_T1_T___L 
LS_T1_T__BL 
LS_T1_TL_BR 
LS_T1_TL__R 
LS_T1_TL_TR 
LS_T1_TL_T_ 
LS_T1_TL__L 
LS_T1_TL_BL 
LS_T1__L_BR 
LS_T1__L__R 
LS_T1__L_TR 
LS_T1__L_T_ 
LS_T1__L_TL 
LS_T1__L_BL 
LS_T1_BL_BR 
LS_T1_BL__R 
LS_T1_BL_TR 
LS_T1_BL_T_ 
LS_T1_BL_TL 
LS_T1_BL__L 
LS_B1_BR 
LS_B1__R 
LS_B1_TR 
LS_B1_T_ 
LS_B1_TL 
LS_B1__L 
LS_B1_BL 
LS_D1_BR 
LS_D1__R 
LS_D1_TR 
LS_D1_T_ 
LS_D1_TL 
LS_D1__L 
LS_D1_BL 
LS_D1_B_ 
LS_V1_BR 
LS_V1__R 
LS_V1_TR 
LS_V1_T_ 
LS_V1_TL 
LS_V1__L 
LS_V1_BL 
LS_V1_B_ 
LS_H1_T_ 
LS_H1_TR 
LS_H1_TL 
LS_H1_BR 
LS_H1_B_ 
LS_H1_BL 
LS_K1_T_ 
LS_K1_TR 
LS_K1_TL 
LS_K1_BR 
LS_K1_BL 
LS_PARRY_UP 
LS_PARRY_UR 
LS_PARRY_UL 
LS_PARRY_LR 
LS_PARRY_LL 
LS_REFLECT_UP 
LS_REFLECT_UR 
LS_REFLECT_UL 
LS_REFLECT_LR 
LS_REFLECT_LL 
LS_MOVE_MAX 

Definition at line 1287 of file bg_public.h.

01287              {
01288         //totally invalid
01289         LS_INVALID      = -1,
01290         // Invalid, or saber not armed
01291         LS_NONE         = 0,
01292 
01293         // General movements with saber
01294         LS_READY,
01295         LS_DRAW,
01296         LS_PUTAWAY,
01297 
01298         // Attacks
01299         LS_A_TL2BR,//4
01300         LS_A_L2R,
01301         LS_A_BL2TR,
01302         LS_A_BR2TL,
01303         LS_A_R2L,
01304         LS_A_TR2BL,
01305         LS_A_T2B,
01306         LS_A_BACKSTAB,
01307         LS_A_BACK,
01308         LS_A_BACK_CR,
01309         LS_ROLL_STAB,
01310         LS_A_LUNGE,
01311         LS_A_JUMP_T__B_,
01312         LS_A_FLIP_STAB,
01313         LS_A_FLIP_SLASH,
01314         LS_JUMPATTACK_DUAL,
01315         LS_JUMPATTACK_ARIAL_LEFT,
01316         LS_JUMPATTACK_ARIAL_RIGHT,
01317         LS_JUMPATTACK_CART_LEFT,
01318         LS_JUMPATTACK_CART_RIGHT,
01319         LS_JUMPATTACK_STAFF_LEFT,
01320         LS_JUMPATTACK_STAFF_RIGHT,
01321         LS_BUTTERFLY_LEFT,
01322         LS_BUTTERFLY_RIGHT,
01323         LS_A_BACKFLIP_ATK,
01324         LS_SPINATTACK_DUAL,
01325         LS_SPINATTACK,
01326         LS_LEAP_ATTACK,
01327         LS_SWOOP_ATTACK_RIGHT,
01328         LS_SWOOP_ATTACK_LEFT,
01329         LS_TAUNTAUN_ATTACK_RIGHT,
01330         LS_TAUNTAUN_ATTACK_LEFT,
01331         LS_KICK_F,
01332         LS_KICK_B,
01333         LS_KICK_R,
01334         LS_KICK_L,
01335         LS_KICK_S,
01336         LS_KICK_BF,
01337         LS_KICK_RL,
01338         LS_KICK_F_AIR,
01339         LS_KICK_B_AIR,
01340         LS_KICK_R_AIR,
01341         LS_KICK_L_AIR,
01342         LS_STABDOWN,
01343         LS_STABDOWN_STAFF,
01344         LS_STABDOWN_DUAL,
01345         LS_DUAL_SPIN_PROTECT,
01346         LS_STAFF_SOULCAL,
01347         LS_A1_SPECIAL,
01348         LS_A2_SPECIAL,
01349         LS_A3_SPECIAL,
01350         LS_UPSIDE_DOWN_ATTACK,
01351         LS_PULL_ATTACK_STAB,
01352         LS_PULL_ATTACK_SWING,
01353         LS_SPINATTACK_ALORA,
01354         LS_DUAL_FB,
01355         LS_DUAL_LR,
01356         LS_HILT_BASH,
01357 
01358         //starts
01359         LS_S_TL2BR,//26
01360         LS_S_L2R,
01361         LS_S_BL2TR,//# Start of attack chaining to SLASH LR2UL
01362         LS_S_BR2TL,//# Start of attack chaining to SLASH LR2UL
01363         LS_S_R2L,
01364         LS_S_TR2BL,
01365         LS_S_T2B,
01366 
01367         //returns
01368         LS_R_TL2BR,//33
01369         LS_R_L2R,
01370         LS_R_BL2TR,
01371         LS_R_BR2TL,
01372         LS_R_R2L,
01373         LS_R_TR2BL,
01374         LS_R_T2B,
01375 
01376         //transitions
01377         LS_T1_BR__R,//40
01378         LS_T1_BR_TR,
01379         LS_T1_BR_T_,
01380         LS_T1_BR_TL,
01381         LS_T1_BR__L,
01382         LS_T1_BR_BL,
01383         LS_T1__R_BR,//46
01384         LS_T1__R_TR,
01385         LS_T1__R_T_,
01386         LS_T1__R_TL,
01387         LS_T1__R__L,
01388         LS_T1__R_BL,
01389         LS_T1_TR_BR,//52
01390         LS_T1_TR__R,
01391         LS_T1_TR_T_,
01392         LS_T1_TR_TL,
01393         LS_T1_TR__L,
01394         LS_T1_TR_BL,
01395         LS_T1_T__BR,//58
01396         LS_T1_T___R,
01397         LS_T1_T__TR,
01398         LS_T1_T__TL,
01399         LS_T1_T___L,
01400         LS_T1_T__BL,
01401         LS_T1_TL_BR,//64
01402         LS_T1_TL__R,
01403         LS_T1_TL_TR,
01404         LS_T1_TL_T_,
01405         LS_T1_TL__L,
01406         LS_T1_TL_BL,
01407         LS_T1__L_BR,//70
01408         LS_T1__L__R,
01409         LS_T1__L_TR,
01410         LS_T1__L_T_,
01411         LS_T1__L_TL,
01412         LS_T1__L_BL,
01413         LS_T1_BL_BR,//76
01414         LS_T1_BL__R,
01415         LS_T1_BL_TR,
01416         LS_T1_BL_T_,
01417         LS_T1_BL_TL,
01418         LS_T1_BL__L,
01419 
01420         //Bounces
01421         LS_B1_BR,
01422         LS_B1__R,
01423         LS_B1_TR,
01424         LS_B1_T_,
01425         LS_B1_TL,
01426         LS_B1__L,
01427         LS_B1_BL,
01428 
01429         //Deflected attacks
01430         LS_D1_BR,
01431         LS_D1__R,
01432         LS_D1_TR,
01433         LS_D1_T_,
01434         LS_D1_TL,
01435         LS_D1__L,
01436         LS_D1_BL,
01437         LS_D1_B_,
01438 
01439         //Reflected attacks
01440         LS_V1_BR,
01441         LS_V1__R,
01442         LS_V1_TR,
01443         LS_V1_T_,
01444         LS_V1_TL,
01445         LS_V1__L,
01446         LS_V1_BL,
01447         LS_V1_B_,
01448 
01449         // Broken parries
01450         LS_H1_T_,//
01451         LS_H1_TR,
01452         LS_H1_TL,
01453         LS_H1_BR,
01454         LS_H1_B_,
01455         LS_H1_BL,
01456 
01457         // Knockaways
01458         LS_K1_T_,//
01459         LS_K1_TR,
01460         LS_K1_TL,
01461         LS_K1_BR,
01462         LS_K1_BL,
01463 
01464         // Parries
01465         LS_PARRY_UP,//
01466         LS_PARRY_UR,
01467         LS_PARRY_UL,
01468         LS_PARRY_LR,
01469         LS_PARRY_LL,
01470 
01471         // Projectile Reflections
01472         LS_REFLECT_UP,//
01473         LS_REFLECT_UR,
01474         LS_REFLECT_UL,
01475         LS_REFLECT_LR,
01476         LS_REFLECT_LL,
01477 
01478         LS_MOVE_MAX//
01479 };

anonymous enum
 

Enumeration values:
GT_FFA 
GT_HOLOCRON 
GT_JEDIMASTER 
GT_DUEL 
GT_POWERDUEL 
GT_SINGLE_PLAYER 
GT_TEAM 
GT_SIEGE 
GT_CTF 
GT_CTY 
GT_MAX_GAME_TYPE 

Definition at line 183 of file bg_public.h.

00183              {
00184         GT_FFA,                         // free for all
00185         GT_HOLOCRON,            // holocron ffa
00186         GT_JEDIMASTER,          // jedi master
00187         GT_DUEL,                // one on one tournament
00188         GT_POWERDUEL,
00189         GT_SINGLE_PLAYER,       // single player ffa
00190 
00191         //-- team games go after this --
00192 
00193         GT_TEAM,                        // team deathmatch
00194         GT_SIEGE,                       // siege
00195         GT_CTF,                         // capture the flag
00196         GT_CTY,
00197         GT_MAX_GAME_TYPE
00198 };

anonymous enum
 

Enumeration values:
SABERLOCK_TOP 
SABERLOCK_SIDE 
SABERLOCK_LOCK 
SABERLOCK_BREAK 
SABERLOCK_SUPERBREAK 
SABERLOCK_WIN 
SABERLOCK_LOSE 

Definition at line 209 of file bg_public.h.

00210 {
00211         SABERLOCK_TOP,
00212         SABERLOCK_SIDE,
00213         SABERLOCK_LOCK,
00214         SABERLOCK_BREAK,
00215         SABERLOCK_SUPERBREAK,
00216         SABERLOCK_WIN,
00217         SABERLOCK_LOSE
00218 };

anonymous enum
 

Enumeration values:
DIR_RIGHT 
DIR_LEFT 
DIR_FRONT 
DIR_BACK 

Definition at line 220 of file bg_public.h.

00221 {
00222         DIR_RIGHT,
00223         DIR_LEFT,
00224         DIR_FRONT,
00225         DIR_BACK
00226 };

anonymous enum
 

Enumeration values:
FORCE_MASTERY_UNINITIATED 
FORCE_MASTERY_INITIATE 
FORCE_MASTERY_PADAWAN 
FORCE_MASTERY_JEDI 
FORCE_MASTERY_JEDI_GUARDIAN 
FORCE_MASTERY_JEDI_ADEPT 
FORCE_MASTERY_JEDI_KNIGHT 
FORCE_MASTERY_JEDI_MASTER 
NUM_FORCE_MASTERY_LEVELS 

Definition at line 383 of file bg_public.h.

enum animEventType_t
 

Enumeration values:
AEV_NONE 
AEV_SOUND 
AEV_FOOTSTEP 
AEV_EFFECT 
AEV_FIRE 
AEV_MOVE 
AEV_SOUNDCHAN 
AEV_SABER_SWING 
AEV_SABER_SPIN 
AEV_NUM_AEV 

Definition at line 304 of file bg_public.h.

Referenced by ParseAnimationEvtBlock().

00305 {//NOTENOTE:  Be sure to update animEventTypeTable and ParseAnimationEvtBlock(...) if you change this enum list!
00306         AEV_NONE,
00307         AEV_SOUND,              //# animID AEV_SOUND framenum soundpath randomlow randomhi chancetoplay
00308         AEV_FOOTSTEP,   //# animID AEV_FOOTSTEP framenum footstepType chancetoplay
00309         AEV_EFFECT,             //# animID AEV_EFFECT framenum effectpath boltName chancetoplay
00310         AEV_FIRE,               //# animID AEV_FIRE framenum altfire chancetofire
00311         AEV_MOVE,               //# animID AEV_MOVE framenum forwardpush rightpush uppush
00312         AEV_SOUNDCHAN,  //# animID AEV_SOUNDCHAN framenum CHANNEL soundpath randomlow randomhi chancetoplay 
00313         AEV_SABER_SWING,  //# animID AEV_SABER_SWING framenum CHANNEL randomlow randomhi chancetoplay 
00314         AEV_SABER_SPIN,  //# animID AEV_SABER_SPIN framenum CHANNEL chancetoplay 
00315         AEV_NUM_AEV
00316 } animEventType_t;

enum brokenLimb_t
 

Enumeration values:
BROKENLIMB_NONE 
BROKENLIMB_LARM 
BROKENLIMB_RARM 
NUM_BROKENLIMBS 

Definition at line 172 of file bg_public.h.

00173 {
00174         BROKENLIMB_NONE = 0,
00175         BROKENLIMB_LARM,
00176         BROKENLIMB_RARM,
00177         NUM_BROKENLIMBS
00178 } brokenLimb_t;

enum ctfMsg_t
 

Enumeration values:
CTFMESSAGE_FRAGGED_FLAG_CARRIER 
CTFMESSAGE_FLAG_RETURNED 
CTFMESSAGE_PLAYER_RETURNED_FLAG 
CTFMESSAGE_PLAYER_CAPTURED_FLAG 
CTFMESSAGE_PLAYER_GOT_FLAG 

Definition at line 707 of file bg_public.h.

enum duelTeam_t
 

Enumeration values:
DUELTEAM_FREE 
DUELTEAM_LONE 
DUELTEAM_DOUBLE 
DUELTEAM_SINGLE 

Definition at line 1019 of file bg_public.h.

01019              {
01020         DUELTEAM_FREE,
01021         DUELTEAM_LONE,
01022         DUELTEAM_DOUBLE,
01023 
01024         DUELTEAM_SINGLE,                // for regular duel matches (not power duel)
01025 } duelTeam_t;

enum effectTypes_t
 

Enumeration values:
EFFECT_NONE 
EFFECT_SMOKE 
EFFECT_EXPLOSION 
EFFECT_EXPLOSION_PAS 
EFFECT_SPARK_EXPLOSION 
EFFECT_EXPLOSION_TRIPMINE 
EFFECT_EXPLOSION_DETPACK 
EFFECT_EXPLOSION_FLECHETTE 
EFFECT_STUNHIT 
EFFECT_EXPLOSION_DEMP2ALT 
EFFECT_EXPLOSION_TURRET 
EFFECT_SPARKS 
EFFECT_WATER_SPLASH 
EFFECT_ACID_SPLASH 
EFFECT_LAVA_SPLASH 
EFFECT_LANDING_MUD 
EFFECT_LANDING_SAND 
EFFECT_LANDING_DIRT 
EFFECT_LANDING_SNOW 
EFFECT_LANDING_GRAVEL 
EFFECT_MAX 

Definition at line 627 of file bg_public.h.

enum entity_event_t
 

Enumeration values:
EV_NONE 
EV_CLIENTJOIN 
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 
EV_JUMP_PAD 
EV_GHOUL2_MARK 
EV_GLOBAL_DUEL 
EV_PRIVATE_DUEL 
EV_JUMP 
EV_ROLL 
EV_WATER_TOUCH 
EV_WATER_LEAVE 
EV_WATER_UNDER 
EV_WATER_CLEAR 
EV_ITEM_PICKUP 
EV_GLOBAL_ITEM_PICKUP 
EV_VEH_FIRE 
EV_NOAMMO 
EV_CHANGE_WEAPON 
EV_FIRE_WEAPON 
EV_ALT_FIRE 
EV_SABER_ATTACK 
EV_SABER_HIT 
EV_SABER_BLOCK 
EV_SABER_CLASHFLARE 
EV_SABER_UNHOLSTER 
EV_BECOME_JEDIMASTER 
EV_DISRUPTOR_MAIN_SHOT 
EV_DISRUPTOR_SNIPER_SHOT 
EV_DISRUPTOR_SNIPER_MISS 
EV_DISRUPTOR_HIT 
EV_DISRUPTOR_ZOOMSOUND 
EV_PREDEFSOUND 
EV_TEAM_POWER 
EV_SCREENSHAKE 
EV_LOCALTIMER 
EV_USE 
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_ITEMUSEFAIL 
EV_ITEM_RESPAWN 
EV_ITEM_POP 
EV_PLAYER_TELEPORT_IN 
EV_PLAYER_TELEPORT_OUT 
EV_GRENADE_BOUNCE 
EV_MISSILE_STICK 
EV_PLAY_EFFECT 
EV_PLAY_EFFECT_ID 
EV_PLAY_PORTAL_EFFECT_ID 
EV_PLAYDOORSOUND 
EV_PLAYDOORLOOPSOUND 
EV_BMODEL_SOUND 
EV_MUTE_SOUND 
EV_VOICECMD_SOUND 
EV_GENERAL_SOUND 
EV_GLOBAL_SOUND 
EV_GLOBAL_TEAM_SOUND 
EV_ENTITY_SOUND 
EV_PLAY_ROFF 
EV_GLASS_SHATTER 
EV_DEBRIS 
EV_MISC_MODEL_EXP 
EV_CONC_ALT_IMPACT 
EV_MISSILE_HIT 
EV_MISSILE_MISS 
EV_MISSILE_MISS_METAL 
EV_BULLET 
EV_PAIN 
EV_DEATH1 
EV_DEATH2 
EV_DEATH3 
EV_OBITUARY 
EV_POWERUP_QUAD 
EV_POWERUP_BATTLESUIT 
EV_FORCE_DRAINED 
EV_GIB_PLAYER 
EV_SCOREPLUM 
EV_CTFMESSAGE 
EV_BODYFADE 
EV_SIEGE_ROUNDOVER 
EV_SIEGE_OBJECTIVECOMPLETE 
EV_DESTROY_GHOUL2_INSTANCE 
EV_DESTROY_WEAPON_MODEL 
EV_GIVE_NEW_RANK 
EV_SET_FREE_SABER 
EV_SET_FORCE_DISABLE 
EV_WEAPON_CHARGE 
EV_WEAPON_CHARGE_ALT 
EV_SHIELD_HIT 
EV_DEBUG_LINE 
EV_TESTLINE 
EV_STOPLOOPINGSOUND 
EV_STARTLOOPINGSOUND 
EV_TAUNT 
EV_ANGER1 
EV_ANGER2 
EV_ANGER3 
EV_VICTORY1 
EV_VICTORY2 
EV_VICTORY3 
EV_CONFUSE1 
EV_CONFUSE2 
EV_CONFUSE3 
EV_PUSHED1 
EV_PUSHED2 
EV_PUSHED3 
EV_CHOKE1 
EV_CHOKE2 
EV_CHOKE3 
EV_FFWARN 
EV_FFTURN 
EV_CHASE1 
EV_CHASE2 
EV_CHASE3 
EV_COVER1 
EV_COVER2 
EV_COVER3 
EV_COVER4 
EV_COVER5 
EV_DETECTED1 
EV_DETECTED2 
EV_DETECTED3 
EV_DETECTED4 
EV_DETECTED5 
EV_LOST1 
EV_OUTFLANK1 
EV_OUTFLANK2 
EV_ESCAPING1 
EV_ESCAPING2 
EV_ESCAPING3 
EV_GIVEUP1 
EV_GIVEUP2 
EV_GIVEUP3 
EV_GIVEUP4 
EV_LOOK1 
EV_LOOK2 
EV_SIGHT1 
EV_SIGHT2 
EV_SIGHT3 
EV_SOUND1 
EV_SOUND2 
EV_SOUND3 
EV_SUSPICIOUS1 
EV_SUSPICIOUS2 
EV_SUSPICIOUS3 
EV_SUSPICIOUS4 
EV_SUSPICIOUS5 
EV_COMBAT1 
EV_COMBAT2 
EV_COMBAT3 
EV_JDETECTED1 
EV_JDETECTED2 
EV_JDETECTED3 
EV_TAUNT1 
EV_TAUNT2 
EV_TAUNT3 
EV_JCHASE1 
EV_JCHASE2 
EV_JCHASE3 
EV_JLOST1 
EV_JLOST2 
EV_JLOST3 
EV_DEFLECT1 
EV_DEFLECT2 
EV_DEFLECT3 
EV_GLOAT1 
EV_GLOAT2 
EV_GLOAT3 
EV_PUSHFAIL 
EV_SIEGESPEC 

Definition at line 745 of file bg_public.h.

00745              {
00746         EV_NONE,
00747 
00748         EV_CLIENTJOIN,
00749 
00750         EV_FOOTSTEP,
00751         EV_FOOTSTEP_METAL,
00752         EV_FOOTSPLASH,
00753         EV_FOOTWADE,
00754         EV_SWIM,
00755 
00756         EV_STEP_4,
00757         EV_STEP_8,
00758         EV_STEP_12,
00759         EV_STEP_16,
00760 
00761         EV_FALL,
00762 
00763         EV_JUMP_PAD,                    // boing sound at origin, jump sound on player
00764 
00765         EV_GHOUL2_MARK,                 //create a projectile impact mark on something with a client-side g2 instance.
00766 
00767         EV_GLOBAL_DUEL,
00768         EV_PRIVATE_DUEL,
00769 
00770         EV_JUMP,
00771         EV_ROLL,
00772         EV_WATER_TOUCH, // foot touches
00773         EV_WATER_LEAVE, // foot leaves
00774         EV_WATER_UNDER, // head touches
00775         EV_WATER_CLEAR, // head leaves
00776 
00777         EV_ITEM_PICKUP,                 // normal item pickups are predictable
00778         EV_GLOBAL_ITEM_PICKUP,  // powerup / team sounds are broadcast to everyone
00779 
00780         EV_VEH_FIRE,
00781 
00782         EV_NOAMMO,
00783         EV_CHANGE_WEAPON,
00784         EV_FIRE_WEAPON,
00785         EV_ALT_FIRE,
00786         EV_SABER_ATTACK,
00787         EV_SABER_HIT,
00788         EV_SABER_BLOCK,
00789         EV_SABER_CLASHFLARE,
00790         EV_SABER_UNHOLSTER,
00791         EV_BECOME_JEDIMASTER,
00792         EV_DISRUPTOR_MAIN_SHOT,
00793         EV_DISRUPTOR_SNIPER_SHOT,
00794         EV_DISRUPTOR_SNIPER_MISS,
00795         EV_DISRUPTOR_HIT,
00796         EV_DISRUPTOR_ZOOMSOUND,
00797 
00798         EV_PREDEFSOUND,
00799 
00800         EV_TEAM_POWER,
00801 
00802         EV_SCREENSHAKE,
00803 
00804         EV_LOCALTIMER,
00805 
00806         EV_USE,                 // +Use key
00807 
00808         EV_USE_ITEM0,
00809         EV_USE_ITEM1,
00810         EV_USE_ITEM2,
00811         EV_USE_ITEM3,
00812         EV_USE_ITEM4,
00813         EV_USE_ITEM5,
00814         EV_USE_ITEM6,
00815         EV_USE_ITEM7,
00816         EV_USE_ITEM8,
00817         EV_USE_ITEM9,
00818         EV_USE_ITEM10,
00819         EV_USE_ITEM11,
00820         EV_USE_ITEM12,
00821         EV_USE_ITEM13,
00822         EV_USE_ITEM14,
00823         EV_USE_ITEM15,
00824 
00825         EV_ITEMUSEFAIL,
00826 
00827         EV_ITEM_RESPAWN,
00828         EV_ITEM_POP,
00829         EV_PLAYER_TELEPORT_IN,
00830         EV_PLAYER_TELEPORT_OUT,
00831 
00832         EV_GRENADE_BOUNCE,              // eventParm will be the soundindex
00833         EV_MISSILE_STICK,               // eventParm will be the soundindex
00834 
00835         EV_PLAY_EFFECT,
00836         EV_PLAY_EFFECT_ID,
00837         EV_PLAY_PORTAL_EFFECT_ID,
00838 
00839         EV_PLAYDOORSOUND,
00840         EV_PLAYDOORLOOPSOUND,
00841         EV_BMODEL_SOUND,
00842 
00843         EV_MUTE_SOUND,
00844         EV_VOICECMD_SOUND,
00845         EV_GENERAL_SOUND,
00846         EV_GLOBAL_SOUND,                // no attenuation
00847         EV_GLOBAL_TEAM_SOUND,
00848         EV_ENTITY_SOUND,
00849 
00850         EV_PLAY_ROFF,
00851 
00852         EV_GLASS_SHATTER,
00853         EV_DEBRIS,
00854         EV_MISC_MODEL_EXP,
00855 
00856         EV_CONC_ALT_IMPACT,
00857 
00858         EV_MISSILE_HIT,
00859         EV_MISSILE_MISS,
00860         EV_MISSILE_MISS_METAL,
00861         EV_BULLET,                              // otherEntity is the shooter
00862 
00863         EV_PAIN,
00864         EV_DEATH1,
00865         EV_DEATH2,
00866         EV_DEATH3,
00867         EV_OBITUARY,
00868 
00869         EV_POWERUP_QUAD,
00870         EV_POWERUP_BATTLESUIT,
00871         //EV_POWERUP_REGEN,
00872 
00873         EV_FORCE_DRAINED,
00874 
00875         EV_GIB_PLAYER,                  // gib a previously living player
00876         EV_SCOREPLUM,                   // score plum
00877 
00878         EV_CTFMESSAGE,
00879 
00880         EV_BODYFADE,
00881 
00882         EV_SIEGE_ROUNDOVER,
00883         EV_SIEGE_OBJECTIVECOMPLETE,
00884 
00885         EV_DESTROY_GHOUL2_INSTANCE,
00886 
00887         EV_DESTROY_WEAPON_MODEL,
00888 
00889         EV_GIVE_NEW_RANK,
00890         EV_SET_FREE_SABER,
00891         EV_SET_FORCE_DISABLE,
00892 
00893         EV_WEAPON_CHARGE,
00894         EV_WEAPON_CHARGE_ALT,
00895 
00896         EV_SHIELD_HIT,
00897 
00898         EV_DEBUG_LINE,
00899         EV_TESTLINE,
00900         EV_STOPLOOPINGSOUND,
00901         EV_STARTLOOPINGSOUND,
00902         EV_TAUNT,
00903 
00904         //rww - Begin NPC sound events
00905         EV_ANGER1,      //Say when acquire an enemy when didn't have one before
00906         EV_ANGER2,
00907         EV_ANGER3,
00908 
00909         EV_VICTORY1,    //Say when killed an enemy
00910         EV_VICTORY2,
00911         EV_VICTORY3,
00912 
00913         EV_CONFUSE1,    //Say when confused
00914         EV_CONFUSE2,
00915         EV_CONFUSE3,
00916 
00917         EV_PUSHED1,             //Say when pushed
00918         EV_PUSHED2,
00919         EV_PUSHED3,
00920 
00921         EV_CHOKE1,              //Say when choking
00922         EV_CHOKE2,
00923         EV_CHOKE3,
00924 
00925         EV_FFWARN,              //ffire founds
00926         EV_FFTURN,
00927         //extra sounds for ST
00928         EV_CHASE1,
00929         EV_CHASE2,
00930         EV_CHASE3,
00931         EV_COVER1,
00932         EV_COVER2,
00933         EV_COVER3,
00934         EV_COVER4,
00935         EV_COVER5,
00936         EV_DETECTED1,
00937         EV_DETECTED2,
00938         EV_DETECTED3,
00939         EV_DETECTED4,
00940         EV_DETECTED5,
00941         EV_LOST1,
00942         EV_OUTFLANK1,
00943         EV_OUTFLANK2,
00944         EV_ESCAPING1,
00945         EV_ESCAPING2,
00946         EV_ESCAPING3,
00947         EV_GIVEUP1,
00948         EV_GIVEUP2,
00949         EV_GIVEUP3,
00950         EV_GIVEUP4,
00951         EV_LOOK1,
00952         EV_LOOK2,
00953         EV_SIGHT1,
00954         EV_SIGHT2,
00955         EV_SIGHT3,
00956         EV_SOUND1,
00957         EV_SOUND2,
00958         EV_SOUND3,
00959         EV_SUSPICIOUS1,
00960         EV_SUSPICIOUS2,
00961         EV_SUSPICIOUS3,
00962         EV_SUSPICIOUS4,
00963         EV_SUSPICIOUS5,
00964         //extra sounds for Jedi
00965         EV_COMBAT1,
00966         EV_COMBAT2,
00967         EV_COMBAT3,
00968         EV_JDETECTED1,
00969         EV_JDETECTED2,
00970         EV_JDETECTED3,
00971         EV_TAUNT1,
00972         EV_TAUNT2,
00973         EV_TAUNT3,
00974         EV_JCHASE1,
00975         EV_JCHASE2,
00976         EV_JCHASE3,
00977         EV_JLOST1,
00978         EV_JLOST2,
00979         EV_JLOST3,
00980         EV_DEFLECT1,
00981         EV_DEFLECT2,
00982         EV_DEFLECT3,
00983         EV_GLOAT1,
00984         EV_GLOAT2,
00985         EV_GLOAT3,
00986         EV_PUSHFAIL,
00987 
00988         EV_SIEGESPEC,
00989         
00990 } entity_event_t;                       // There is a maximum of 256 events (8 bits transmission, 2 high bits for uniqueness)

enum entityType_t
 

Enumeration values:
ET_GENERAL 
ET_PLAYER 
ET_ITEM 
ET_MISSILE 
ET_SPECIAL 
ET_HOLOCRON 
ET_MOVER 
ET_BEAM 
ET_PORTAL 
ET_SPEAKER 
ET_PUSH_TRIGGER 
ET_TELEPORT_TRIGGER 
ET_INVISIBLE 
ET_NPC 
ET_TEAM 
ET_BODY 
ET_TERRAIN 
ET_FX 
ET_EVENTS 

Definition at line 1188 of file bg_public.h.

01188              {
01189         ET_GENERAL,
01190         ET_PLAYER,
01191         ET_ITEM,
01192         ET_MISSILE,
01193         ET_SPECIAL,                             // rww - force fields
01194         ET_HOLOCRON,                    // rww - holocron icon displays
01195         ET_MOVER,
01196         ET_BEAM,
01197         ET_PORTAL,
01198         ET_SPEAKER,
01199         ET_PUSH_TRIGGER,
01200         ET_TELEPORT_TRIGGER,
01201         ET_INVISIBLE,
01202         ET_NPC,                                 // ghoul2 player-like entity
01203         ET_TEAM,
01204         ET_BODY,
01205         ET_TERRAIN,
01206         ET_FX,
01207 
01208         ET_EVENTS                               // any of the EV_* events can be added freestanding
01209                                                         // by setting eType to ET_EVENTS + eventNum
01210                                                         // this avoids having to set eFlags and eventNum
01211 } entityType_t;

enum footstepType_t
 

Enumeration values:
FOOTSTEP_R 
FOOTSTEP_L 
FOOTSTEP_HEAVY_R 
FOOTSTEP_HEAVY_L 
NUM_FOOTSTEP_TYPES 

Definition at line 258 of file bg_public.h.

Referenced by CG_PlayerAnimEventDo().

00259 {
00260         FOOTSTEP_R,
00261         FOOTSTEP_L,
00262         FOOTSTEP_HEAVY_R,
00263         FOOTSTEP_HEAVY_L,
00264         NUM_FOOTSTEP_TYPES
00265 } footstepType_t;

enum forceHandAnims_t
 

Enumeration values:
HANDEXTEND_NONE 
HANDEXTEND_FORCEPUSH 
HANDEXTEND_FORCEPULL 
HANDEXTEND_FORCE_HOLD 
HANDEXTEND_SABERPULL 
HANDEXTEND_CHOKE 
HANDEXTEND_WEAPONREADY 
HANDEXTEND_DODGE 
HANDEXTEND_KNOCKDOWN 
HANDEXTEND_DUELCHALLENGE 
HANDEXTEND_TAUNT 
HANDEXTEND_PRETHROW 
HANDEXTEND_POSTTHROW 
HANDEXTEND_PRETHROWN 
HANDEXTEND_POSTTHROWN 
HANDEXTEND_DRAGGING 
HANDEXTEND_JEDITAUNT 

Definition at line 149 of file bg_public.h.

00149              {
00150         HANDEXTEND_NONE = 0,
00151         HANDEXTEND_FORCEPUSH,
00152         HANDEXTEND_FORCEPULL,
00153         HANDEXTEND_FORCE_HOLD,
00154         HANDEXTEND_SABERPULL,
00155         HANDEXTEND_CHOKE, //use handextend priorities to choke someone being gripped
00156         HANDEXTEND_WEAPONREADY,
00157         HANDEXTEND_DODGE,
00158         HANDEXTEND_KNOCKDOWN,
00159         HANDEXTEND_DUELCHALLENGE,
00160         HANDEXTEND_TAUNT,
00161 
00162         HANDEXTEND_PRETHROW,
00163         HANDEXTEND_POSTTHROW,
00164         HANDEXTEND_PRETHROWN,
00165         HANDEXTEND_POSTTHROWN,
00166 
00167         HANDEXTEND_DRAGGING,
00168 
00169         HANDEXTEND_JEDITAUNT,
00170 } forceHandAnims_t;

enum g2ModelParts_t
 

Enumeration values:
G2_MODELPART_HEAD 
G2_MODELPART_WAIST 
G2_MODELPART_LARM 
G2_MODELPART_RARM 
G2_MODELPART_RHAND 
G2_MODELPART_LLEG 
G2_MODELPART_RLEG 

Definition at line 126 of file bg_public.h.

enum gender_t
 

Enumeration values:
GENDER_MALE 
GENDER_FEMALE 
GENDER_NEUTER 

Definition at line 201 of file bg_public.h.

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_REDTEAM_SCORED 
GTS_BLUETEAM_SCORED 
GTS_REDTEAM_TOOK_LEAD 
GTS_BLUETEAM_TOOK_LEAD 
GTS_TEAMS_ARE_TIED 

Definition at line 993 of file bg_public.h.

enum meansOfDeath_t
 

Enumeration values:
MOD_UNKNOWN 
MOD_STUN_BATON 
MOD_MELEE 
MOD_SABER 
MOD_BRYAR_PISTOL 
MOD_BRYAR_PISTOL_ALT 
MOD_BLASTER 
MOD_TURBLAST 
MOD_DISRUPTOR 
MOD_DISRUPTOR_SPLASH 
MOD_DISRUPTOR_SNIPER 
MOD_BOWCASTER 
MOD_REPEATER 
MOD_REPEATER_ALT 
MOD_REPEATER_ALT_SPLASH 
MOD_DEMP2 
MOD_DEMP2_ALT 
MOD_FLECHETTE 
MOD_FLECHETTE_ALT_SPLASH 
MOD_ROCKET 
MOD_ROCKET_SPLASH 
MOD_ROCKET_HOMING 
MOD_ROCKET_HOMING_SPLASH 
MOD_THERMAL 
MOD_THERMAL_SPLASH 
MOD_TRIP_MINE_SPLASH 
MOD_TIMED_MINE_SPLASH 
MOD_DET_PACK_SPLASH 
MOD_VEHICLE 
MOD_CONC 
MOD_CONC_ALT 
MOD_FORCE_DARK 
MOD_SENTRY 
MOD_WATER 
MOD_SLIME 
MOD_LAVA 
MOD_CRUSH 
MOD_TELEFRAG 
MOD_FALLING 
MOD_SUICIDE 
MOD_TARGET_LASER 
MOD_TRIGGER_HURT 
MOD_TEAM_CHANGE 
MOD_MAX 

Definition at line 1046 of file bg_public.h.

01046              {
01047         MOD_UNKNOWN,
01048         MOD_STUN_BATON,
01049         MOD_MELEE,
01050         MOD_SABER,
01051         MOD_BRYAR_PISTOL,
01052         MOD_BRYAR_PISTOL_ALT,
01053         MOD_BLASTER,
01054         MOD_TURBLAST,
01055         MOD_DISRUPTOR,
01056         MOD_DISRUPTOR_SPLASH,
01057         MOD_DISRUPTOR_SNIPER,
01058         MOD_BOWCASTER,
01059         MOD_REPEATER,
01060         MOD_REPEATER_ALT,
01061         MOD_REPEATER_ALT_SPLASH,
01062         MOD_DEMP2,
01063         MOD_DEMP2_ALT,
01064         MOD_FLECHETTE,
01065         MOD_FLECHETTE_ALT_SPLASH,
01066         MOD_ROCKET,
01067         MOD_ROCKET_SPLASH,
01068         MOD_ROCKET_HOMING,
01069         MOD_ROCKET_HOMING_SPLASH,
01070         MOD_THERMAL,
01071         MOD_THERMAL_SPLASH,
01072         MOD_TRIP_MINE_SPLASH,
01073         MOD_TIMED_MINE_SPLASH,
01074         MOD_DET_PACK_SPLASH,
01075         MOD_VEHICLE,
01076         MOD_CONC,
01077         MOD_CONC_ALT,
01078         MOD_FORCE_DARK,
01079         MOD_SENTRY,
01080         MOD_WATER,
01081         MOD_SLIME,
01082         MOD_LAVA,
01083         MOD_CRUSH,
01084         MOD_TELEFRAG,
01085         MOD_FALLING,
01086         MOD_SUICIDE,
01087         MOD_TARGET_LASER,
01088         MOD_TRIGGER_HURT,
01089         MOD_TEAM_CHANGE,
01090         //AURELIO: when/if you put this back in, remember to make a case for it in all the other places where
01091         //mod's are checked. Also, it probably isn't the most elegant solution for what you want - just add
01092         //a frag back to the player after you call the player_die (and keep a local of his pre-death score to
01093         //make sure he actually lost points, there may be cases where you don't lose points on changing teams
01094         //or suiciding, and so you would actually be giving him a point) -Rich
01095         // I put it back in for now, if it becomes a problem we'll work around it later (it shouldn't though)...
01096         MOD_MAX
01097 } meansOfDeath_t;

enum pdSounds_t
 

Enumeration values:
PDSOUND_NONE 
PDSOUND_PROTECTHIT 
PDSOUND_PROTECT 
PDSOUND_ABSORBHIT 
PDSOUND_ABSORB 
PDSOUND_FORCEJUMP 
PDSOUND_FORCEGRIP 

Definition at line 734 of file bg_public.h.

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 539 of file bg_public.h.

00539              {
00540         PERS_SCORE,                                             // !!! MUST NOT CHANGE, SERVER AND GAME BOTH REFERENCE !!!
00541         PERS_HITS,                                              // total points damage inflicted so damage beeps can sound on change
00542         PERS_RANK,                                              // player rank or team rank
00543         PERS_TEAM,                                              // player team
00544         PERS_SPAWN_COUNT,                               // incremented every respawn
00545         PERS_PLAYEREVENTS,                              // 16 bits that can be flipped for events
00546         PERS_ATTACKER,                                  // clientnum of last damage inflicter
00547         PERS_ATTACKEE_ARMOR,                    // health/armor of last person we attacked
00548         PERS_KILLED,                                    // count of the number of times you died
00549         // player awards tracking
00550         PERS_IMPRESSIVE_COUNT,                  // two railgun hits in a row
00551         PERS_EXCELLENT_COUNT,                   // two successive kills in a short amount of time
00552         PERS_DEFEND_COUNT,                              // defend awards
00553         PERS_ASSIST_COUNT,                              // assist awards
00554         PERS_GAUNTLET_FRAG_COUNT,               // kills with the guantlet
00555         PERS_CAPTURES                                   // captures
00556 } persEnum_t;

enum pmtype_t
 

Enumeration values:
PM_NORMAL 
PM_JETPACK 
PM_FLOAT 
PM_NOCLIP 
PM_SPECTATOR 
PM_DEAD 
PM_FREEZE 
PM_INTERMISSION 
PM_SPINTERMISSION 

Definition at line 360 of file bg_public.h.

00360              {
00361         PM_NORMAL,              // can accelerate and turn
00362         PM_JETPACK,             // special jetpack movement
00363         PM_FLOAT,               // float with no gravity in general direction of velocity (intended for gripping)
00364         PM_NOCLIP,              // noclip movement
00365         PM_SPECTATOR,   // still run into walls
00366         PM_DEAD,                // no acceleration or turning, but free falling
00367         PM_FREEZE,              // stuck in place with no control
00368         PM_INTERMISSION,        // no movement or status bar
00369         PM_SPINTERMISSION       // no movement or status bar
00370 } pmtype_t;

enum saberQuadrant_t
 

Enumeration values:
Q_BR 
Q_R 
Q_TR 
Q_T 
Q_TL 
Q_L 
Q_BL 
Q_B 
Q_NUM_QUADS 

Definition at line 1482 of file bg_public.h.

01482              {
01483         Q_BR,
01484         Q_R,
01485         Q_TR,
01486         Q_T,
01487         Q_TL,
01488         Q_L,
01489         Q_BL,
01490         Q_B,
01491         Q_NUM_QUADS
01492 } saberQuadrant_t;

enum statIndex_t
 

Enumeration values:
STAT_HEALTH 
STAT_HOLDABLE_ITEM 
STAT_HOLDABLE_ITEMS 
STAT_PERSISTANT_POWERUP 
STAT_WEAPONS 
STAT_ARMOR 
STAT_DEAD_YAW 
STAT_CLIENTS_READY 
STAT_MAX_HEALTH 

Definition at line 520 of file bg_public.h.

00520              {
00521         STAT_HEALTH,
00522         STAT_HOLDABLE_ITEM,
00523         STAT_HOLDABLE_ITEMS,
00524         STAT_PERSISTANT_POWERUP,
00525         //MAKE SURE STAT_WEAPONS REMAINS 4!!!!
00526         //There is a hardcoded reference in msg.cpp to send it in 32 bits -rww
00527         STAT_WEAPONS = 4,                                       // 16 bit fields
00528         STAT_ARMOR,                             
00529         STAT_DEAD_YAW,                                  // look this direction when dead (FIXME: get rid of?)
00530         STAT_CLIENTS_READY,                             // bit mask of clients wishing to exit the intermission (FIXME: configstring?)
00531         STAT_MAX_HEALTH                                 // health / armor limit, changable by handicap
00532 } statIndex_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 1034 of file bg_public.h.

enum weaponstate_t
 

Enumeration values:
WEAPON_READY 
WEAPON_RAISING 
WEAPON_DROPPING 
WEAPON_FIRING 
WEAPON_CHARGING 
WEAPON_CHARGING_ALT 
WEAPON_IDLE 

Definition at line 372 of file bg_public.h.

00372              {
00373         WEAPON_READY, 
00374         WEAPON_RAISING,
00375         WEAPON_DROPPING,
00376         WEAPON_FIRING,
00377         WEAPON_CHARGING,
00378         WEAPON_CHARGING_ALT,
00379         WEAPON_IDLE, //lowered          // NOTENOTE Added with saber
00380 } weaponstate_t;


Function Documentation

void BG_AddPredictableEventToPlayerstate int  newEvent,
int  eventParm,
playerState_t ps
 

Definition at line 2635 of file bg_misc.c.

References Com_Printf(), eventnames, playerState_s::eventParms, playerState_s::events, playerState_s::eventSequence, vmCvar_t::integer, MAX_PS_EVENTS, playerState_t, playerState_s::pmove_framecount, qboolean, qfalse, qtrue, and trap_Cvar_Register().

Referenced by G_AddPredictableEvent(), PM_AddEvent(), PM_AddEventWithParm(), PM_SaberLockBreak(), PM_SaberLocked(), PM_SetSaberMove(), and Touch_Item().

02635                                                                                            {
02636 
02637 #ifdef _DEBUG
02638         {
02639                 static vmCvar_t         showEvents;
02640                 static qboolean         isRegistered = qfalse;
02641 
02642                 if (!isRegistered)
02643                 {
02644                         trap_Cvar_Register(&showEvents, "showevents", "0", 0);
02645                         isRegistered = qtrue;
02646                 }
02647 
02648                 if ( showEvents.integer != 0 ) {
02649 #ifdef QAGAME
02650                         Com_Printf(" game event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm);
02651 #else
02652                         Com_Printf("Cgame event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm);
02653 #endif
02654                 }
02655         }
02656 #endif
02657         ps->events[ps->eventSequence & (MAX_PS_EVENTS-1)] = newEvent;
02658         ps->eventParms[ps->eventSequence & (MAX_PS_EVENTS-1)] = eventParm;
02659         ps->eventSequence++;
02660 }

void* BG_Alloc int  size  ) 
 

Definition at line 3328 of file bg_misc.c.

References Com_Error(), and ERR_DROP.

Referenced by B_Alloc(), BG_AnimsetAlloc(), BG_StringAlloc(), CG_CreateNPCClient(), G_CreateAnimalNPC(), G_CreateFakeClient(), G_CreateFighterNPC(), G_CreateSpeederNPC(), G_CreateWalkerNPC(), New_NPC_t(), ParseAnimationEvtBlock(), UI_AnimsetAlloc(), and UI_InsertG2Pointer().

03329 {
03330         bg_poolSize = ((bg_poolSize + 0x00000003) & 0xfffffffc);
03331 
03332         if (bg_poolSize + size > bg_poolTail)
03333         {
03334                 Com_Error( ERR_DROP, "BG_Alloc: buffer exceeded tail (%d > %d)", bg_poolSize + size, bg_poolTail);
03335                 return 0;
03336         }
03337 
03338         bg_poolSize += size;
03339 
03340         return &bg_pool[bg_poolSize-size];
03341 }

void* BG_AllocUnaligned int  size  ) 
 

Definition at line 3343 of file bg_misc.c.

References Com_Error(), and ERR_DROP.

03344 {
03345         if (bg_poolSize + size > bg_poolTail)
03346         {
03347                 Com_Error( ERR_DROP, "BG_AllocUnaligned: buffer exceeded tail (%d > %d)", bg_poolSize + size, bg_poolTail);
03348                 return 0;
03349         }
03350 
03351         bg_poolSize += size;
03352 
03353         return &bg_pool[bg_poolSize-size];
03354 }

int BG_AnimLength int  index,
animNumber_t  anim
 

Definition at line 1573 of file bg_panimate.c.

References bgLoadedAnim_t::anims, bgAllAnims, fabs(), MAX_ANIMATIONS, and animation_s::numFrames.

Referenced by AnimateRiders(), BG_InKnockDownOnGround(), G_SetTauntAnim(), and Jedi_CheckFlipEvasions().

01574 {
01575         if (anim >= MAX_ANIMATIONS)
01576         {
01577                 return -1;
01578         }
01579         
01580         return bgAllAnims[index].anims[anim].numFrames * fabs((float)(bgAllAnims[index].anims[anim].frameLerp));
01581 }

void BG_AttachToRancor void *  ghoul2,
float  rancYaw,
vec3_t  rancOrigin,
int  time,
qhandle_t modelList,
vec3_t  modelScale,
qboolean  inMouth,
vec3_t  out_origin,
vec3_t  out_angles,
vec3_t  out_axis[3]
 

Definition at line 25 of file bg_g2_utils.c.

References NEGATIVE_X, NEGATIVE_Y, ORIGIN, PITCH, POSITIVE_X, POSITIVE_Z, qhandle_t, ROLL, trap_G2API_AddBolt(), trap_G2API_GetBoltMatrix(), vec3_t, vectoangles(), and VectorSet.

Referenced by CG_Player(), and G_HeldByMonster().

00035 {
00036         mdxaBone_t      boltMatrix;
00037         int boltIndex;
00038         vec3_t rancAngles;
00039         vec3_t temp_angles;
00040         // Getting the bolt here
00041         if ( inMouth )
00042         {//in mouth
00043                 boltIndex = trap_G2API_AddBolt(ghoul2, 0, "jaw_bone");
00044         }
00045         else
00046         {//in right hand
00047                 boltIndex = trap_G2API_AddBolt(ghoul2, 0, "*r_hand");
00048         }
00049         VectorSet( rancAngles, 0, rancYaw, 0 );
00050         trap_G2API_GetBoltMatrix( ghoul2, 0, boltIndex, 
00051                         &boltMatrix, rancAngles, rancOrigin, time,
00052                         modelList, modelScale );
00053         // Storing ent position, bolt position, and bolt axis
00054         if ( out_origin )
00055         {
00056                 BG_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, out_origin );
00057         }
00058         if ( out_axis )
00059         {
00060                 if ( inMouth )
00061                 {//in mouth
00062                         BG_GiveMeVectorFromMatrix( &boltMatrix, POSITIVE_Z, out_axis[0] );
00063                         BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, out_axis[1] );
00064                         BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_X, out_axis[2] );
00065                 }
00066                 else
00067                 {//in hand
00068                         BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, out_axis[0] );
00069                         BG_GiveMeVectorFromMatrix( &boltMatrix, POSITIVE_X, out_axis[1] );
00070                         BG_GiveMeVectorFromMatrix( &boltMatrix, POSITIVE_Z, out_axis[2] );
00071                 }
00072                 //FIXME: this is messing up our axis and turning us inside-out?
00073                 if ( out_angles )
00074                 {
00075                         vectoangles( out_axis[0], out_angles );
00076                         vectoangles( out_axis[2], temp_angles );
00077                         out_angles[ROLL] = -temp_angles[PITCH];
00078                 }
00079         }
00080         else if ( out_angles )
00081         {
00082                 vec3_t temp_axis[3];
00083                 if ( inMouth )
00084                 {//in mouth
00085                         BG_GiveMeVectorFromMatrix( &boltMatrix, POSITIVE_Z, temp_axis[0] );
00086                         BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_X, temp_axis[2] );
00087                 }
00088                 else
00089                 {//in hand
00090                         BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, temp_axis[0] );
00091                         BG_GiveMeVectorFromMatrix( &boltMatrix, POSITIVE_Z, temp_axis[2] );
00092                 }
00093                 //FIXME: this is messing up our axis and turning us inside-out?
00094                 vectoangles( temp_axis[0], out_angles );
00095                 vectoangles( temp_axis[2], temp_angles );
00096                 out_angles[ROLL] = -temp_angles[PITCH];
00097         }
00098 }

void BG_BLADE_ActivateTrail bladeInfo_t blade,
float  duration
 

Definition at line 2803 of file bg_saberLoad.c.

References saberTrail_t::duration, saberTrail_t::inAction, qtrue, and bladeInfo_t::trail.

Referenced by BG_SI_ActivateTrail().

02804 {
02805         blade->trail.inAction = qtrue;
02806         blade->trail.duration = duration;
02807 }

void BG_BLADE_DeactivateTrail bladeInfo_t blade,
float  duration
 

Definition at line 2809 of file bg_saberLoad.c.

References saberTrail_t::duration, saberTrail_t::inAction, qfalse, and bladeInfo_t::trail.

Referenced by BG_SI_DeactivateTrail().

02810 {
02811         blade->trail.inAction = qfalse;
02812         blade->trail.duration = duration;
02813 }

int BG_BrokenParryForAttack int  move  ) 
 

Definition at line 692 of file bg_panimate.c.

References LS_NONE, LS_V1__L, LS_V1__R, LS_V1_B_, LS_V1_BL, LS_V1_BR, LS_V1_T_, LS_V1_TL, LS_V1_TR, Q_B, Q_BL, Q_BR, Q_L, Q_R, Q_T, Q_TL, Q_TR, saberMoveData, and saberMoveData_t::startQuad.

00693 {
00694         //Our attack was knocked away by a knockaway parry
00695         //FIXME: need actual anims for this
00696         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00697         switch ( saberMoveData[move].startQuad )
00698         {
00699         case Q_B:
00700                 return LS_V1_B_;
00701                 break;
00702         case Q_BR:
00703                 return LS_V1_BR;
00704                 break;
00705         case Q_R:
00706                 return LS_V1__R;
00707                 break;
00708         case Q_TR:
00709                 return LS_V1_TR;
00710                 break;
00711         case Q_T:
00712                 return LS_V1_T_;
00713                 break;
00714         case Q_TL:
00715                 return LS_V1_TL;
00716                 break;
00717         case Q_L:
00718                 return LS_V1__L;
00719                 break;
00720         case Q_BL:
00721                 return LS_V1_BL;
00722                 break;
00723         }
00724         return LS_NONE;
00725 }

int BG_BrokenParryForParry int  move  ) 
 

Definition at line 727 of file bg_panimate.c.

References LS_H1_B_, LS_H1_BL, LS_H1_BR, LS_H1_T_, LS_H1_TL, LS_H1_TR, LS_NONE, LS_PARRY_LL, LS_PARRY_LR, LS_PARRY_UL, LS_PARRY_UP, LS_PARRY_UR, LS_READY, and Q_irand().

00728 {
00729         //FIXME: need actual anims for this
00730         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00731         switch ( move )
00732         {
00733         case LS_PARRY_UP:
00734                 //Hmm... since we don't know what dir the hit came from, randomly pick knock down or knock back
00735                 if ( Q_irand( 0, 1 ) )
00736                 {
00737                         return LS_H1_B_;
00738                 }
00739                 else
00740                 {
00741                         return LS_H1_T_;
00742                 }
00743                 break;
00744         case LS_PARRY_UR:
00745                 return LS_H1_TR;
00746                 break;
00747         case LS_PARRY_UL:
00748                 return LS_H1_TL;
00749                 break;
00750         case LS_PARRY_LR:
00751                 return LS_H1_BR;
00752                 break;
00753         case LS_PARRY_LL:
00754                 return LS_H1_BL;
00755                 break;
00756         case LS_READY:
00757                 return LS_H1_B_;//???
00758                 break;
00759         }
00760         return LS_NONE;
00761 }

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

Definition at line 2192 of file bg_misc.c.

References playerState_s::ammo, ammoData, bg_itemlist, bg_numItems, playerState_s::clientNum, Com_Error(), Com_Printf(), playerState_s::duelInProgress, EF_DROPPEDWEAPON, entityState_s::eFlags, entityState_t, ERR_DROP, playerState_s::fd, forcedata_s::forcePowersActive, FP_RAGE, entityState_s::generic1, gitem_s::giTag, gitem_t, gitem_s::giType, GT_CTF, GT_CTY, HI_SEEKER, playerState_s::isJediMaster, IT_AMMO, IT_ARMOR, IT_BAD, IT_HEALTH, IT_HOLDABLE, IT_POWERUP, IT_TEAM, IT_WEAPON, ammoData_s::max, entityState_s::modelindex, entityState_s::modelindex2, PERS_TEAM, playerState_s::persistant, playerState_t, playerState_s::powerups, entityState_s::powerups, PW_BLUEFLAG, PW_REDFLAG, PW_YSALAMIRI, qboolean, qfalse, qtrue, gitem_s::quantity, STAT_ARMOR, STAT_HEALTH, STAT_HOLDABLE_ITEMS, STAT_MAX_HEALTH, STAT_WEAPONS, playerState_s::stats, TEAM_BLUE, TEAM_RED, playerState_s::trueJedi, playerState_s::trueNonJedi, weaponData, WP_DET_PACK, WP_SABER, WP_THERMAL, and WP_TRIP_MINE.

Referenced by Touch_Item().

02192                                                                                                 {
02193         gitem_t *item;
02194 
02195         if ( ent->modelindex < 1 || ent->modelindex >= bg_numItems ) {
02196                 Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: index out of range" );
02197         }
02198 
02199         item = &bg_itemlist[ent->modelindex];
02200 
02201         if ( ps )
02202         {
02203                 if ( ps->trueJedi )
02204                 {//force powers and saber only
02205                         if ( item->giType != IT_TEAM //not a flag
02206                                 && item->giType != IT_ARMOR//not shields
02207                                 && (item->giType != IT_WEAPON || item->giTag != WP_SABER)//not a saber
02208                                 && (item->giType != IT_HOLDABLE || item->giTag != HI_SEEKER)//not a seeker
02209                                 && (item->giType != IT_POWERUP || item->giTag == PW_YSALAMIRI) )//not a force pick-up
02210                         {
02211                                 return qfalse;
02212                         }
02213                 }
02214                 else if ( ps->trueNonJedi )
02215                 {//can't pick up force powerups
02216                         if ( (item->giType == IT_POWERUP && item->giTag != PW_YSALAMIRI) //if a powerup, can only can pick up ysalamiri
02217                                 || (item->giType == IT_HOLDABLE && item->giTag == HI_SEEKER)//if holdable, cannot pick up seeker 
02218                                 || (item->giType == IT_WEAPON && item->giTag == WP_SABER ) )//or if it's a saber
02219                         {
02220                                 return qfalse;
02221                         }
02222                 }
02223                 if ( ps->isJediMaster && item && (item->giType == IT_WEAPON || item->giType == IT_AMMO))
02224                 {//jedi master cannot pick up weapons
02225                         return qfalse;
02226                 }
02227                 if ( ps->duelInProgress )
02228                 { //no picking stuff up while in a duel, no matter what the type is
02229                         return qfalse;
02230                 }
02231         }
02232         else
02233         {//safety return since below code assumes a non-null ps
02234                 return qfalse;
02235         }
02236 
02237         switch( item->giType ) {
02238         case IT_WEAPON:
02239                 if (ent->generic1 == ps->clientNum && ent->powerups)
02240                 {
02241                         return qfalse;
02242                 }
02243                 if (!(ent->eFlags & EF_DROPPEDWEAPON) && (ps->stats[STAT_WEAPONS] & (1 << item->giTag)) &&
02244                         item->giTag != WP_THERMAL && item->giTag != WP_TRIP_MINE && item->giTag != WP_DET_PACK)
02245                 { //weaponstay stuff.. if this isn't dropped, and you already have it, you don't get it.
02246                         return qfalse;
02247                 }
02248                 if (item->giTag == WP_THERMAL || item->giTag == WP_TRIP_MINE || item->giTag == WP_DET_PACK)
02249                 { //check to see if full on ammo for this, if so, then..
02250                         int ammoIndex = weaponData[item->giTag].ammoIndex;
02251                         if (ps->ammo[ammoIndex] >= ammoData[ammoIndex].max)
02252                         { //don't need it
02253                                 return qfalse;
02254                         }
02255                 }
02256                 return qtrue;   // weapons are always picked up
02257 
02258         case IT_AMMO:
02259                 if (item->giTag == -1)
02260                 { //special case for "all ammo" packs
02261                         return qtrue;
02262                 }
02263                 if ( ps->ammo[item->giTag] >= ammoData[item->giTag].max) {
02264                         return qfalse;          // can't hold any more
02265                 }
02266                 return qtrue;
02267 
02268         case IT_ARMOR:
02269                 if ( ps->stats[STAT_ARMOR] >= ps->stats[STAT_MAX_HEALTH]/* * item->giTag*/ ) {
02270                         return qfalse;
02271                 }
02272                 return qtrue;
02273 
02274         case IT_HEALTH:
02275                 // small and mega healths will go over the max, otherwise
02276                 // don't pick up if already at max
02277                 if ((ps->fd.forcePowersActive & (1 << FP_RAGE)))
02278                 {
02279                         return qfalse;
02280                 }
02281 
02282                 if ( item->quantity == 5 || item->quantity == 100 ) {
02283                         if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] * 2 ) {
02284                                 return qfalse;
02285                         }
02286                         return qtrue;
02287                 }
02288 
02289                 if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] ) {
02290                         return qfalse;
02291                 }
02292                 return qtrue;
02293 
02294         case IT_POWERUP:
02295                 if (ps && (ps->powerups[PW_YSALAMIRI]))
02296                 {
02297                         if (item->giTag != PW_YSALAMIRI)
02298                         {
02299                                 return qfalse;
02300                         }
02301                 }
02302                 return qtrue;   // powerups are always picked up
02303 
02304         case IT_TEAM: // team items, such as flags
02305                 if( gametype == GT_CTF || gametype == GT_CTY ) {
02306                         // ent->modelindex2 is non-zero on items if they are dropped
02307                         // we need to know this because we can pick up our dropped flag (and return it)
02308                         // but we can't pick up our flag at base
02309                         if (ps->persistant[PERS_TEAM] == TEAM_RED) {
02310                                 if (item->giTag == PW_BLUEFLAG ||
02311                                         (item->giTag == PW_REDFLAG && ent->modelindex2) ||
02312                                         (item->giTag == PW_REDFLAG && ps->powerups[PW_BLUEFLAG]) )
02313                                         return qtrue;
02314                         } else if (ps->persistant[PERS_TEAM] == TEAM_BLUE) {
02315                                 if (item->giTag == PW_REDFLAG ||
02316                                         (item->giTag == PW_BLUEFLAG && ent->modelindex2) ||
02317                                         (item->giTag == PW_BLUEFLAG && ps->powerups[PW_REDFLAG]) )
02318                                         return qtrue;
02319                         }
02320                 }
02321 
02322                 return qfalse;
02323 
02324         case IT_HOLDABLE:
02325                 if ( ps->stats[STAT_HOLDABLE_ITEMS] & (1 << item->giTag))
02326                 {
02327                         return qfalse;
02328                 }
02329                 return qtrue;
02330 
02331         case IT_BAD:
02332             Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: IT_BAD" );
02333         default:
02334 #ifndef Q3_VM
02335 #ifndef NDEBUG // bk0001204
02336           Com_Printf("BG_CanItemBeGrabbed: unknown enum %d\n", item->giType );
02337 #endif
02338 #endif
02339          break;
02340         }
02341 
02342         return qfalse;
02343 }

qboolean BG_CanUseFPNow int  gametype,
playerState_t ps,
int  time,
forcePowers_t  power
 

Definition at line 1810 of file bg_misc.c.

References BG_HasYsalamiri(), BROKENLIMB_LARM, BROKENLIMB_RARM, playerState_s::brokenLimbs, playerState_s::duelInProgress, playerState_s::fallingToDeath, forcePowers_t, playerState_s::forceRestricted, FP_DRAIN, FP_GRIP, FP_LEVITATION, FP_LIGHTNING, FP_PULL, FP_PUSH, FP_SABER_DEFENSE, FP_SABER_OFFENSE, playerState_s::m_iVehicleNum, playerState_t, qboolean, qfalse, qtrue, playerState_s::saberLockFrame, playerState_s::saberLockTime, playerState_s::trueNonJedi, playerState_s::weapon, and WP_EMPLACED_GUN.

Referenced by ForcePowerUsableOn(), PM_ForceJumpingUp(), PM_WeaponLightsaber(), saberFirstThrown(), WP_ForcePowersUpdate(), and WP_ForcePowerUsable().

01811 {
01812         if (BG_HasYsalamiri(gametype, ps))
01813         {
01814                 return qfalse;
01815         }
01816 
01817         if ( ps->forceRestricted || ps->trueNonJedi )
01818         {
01819                 return qfalse;
01820         }
01821 
01822         if (ps->weapon == WP_EMPLACED_GUN)
01823         { //can't use any of your powers while on an emplaced weapon
01824                 return qfalse;
01825         }
01826 
01827         if (ps->m_iVehicleNum)
01828         { //can't use powers while riding a vehicle (this may change, I don't know)
01829                 return qfalse;
01830         }
01831 
01832         if (ps->duelInProgress)
01833         {
01834                 if (power != FP_SABER_OFFENSE && power != FP_SABER_DEFENSE && /*power != FP_SABERTHROW &&*/
01835                         power != FP_LEVITATION)
01836                 {
01837                         if (!ps->saberLockFrame || power != FP_PUSH)
01838                         {
01839                                 return qfalse;
01840                         }
01841                 }
01842         }
01843 
01844         if (ps->saberLockFrame || ps->saberLockTime > time)
01845         {
01846                 if (power != FP_PUSH)
01847                 {
01848                         return qfalse;
01849                 }
01850         }
01851 
01852         if (ps->fallingToDeath)
01853         {
01854                 return qfalse;
01855         }
01856 
01857         if ((ps->brokenLimbs & (1 << BROKENLIMB_RARM)) ||
01858                 (ps->brokenLimbs & (1 << BROKENLIMB_LARM)))
01859         { //powers we can't use with a broken arm
01860         switch (power)
01861                 {
01862                 case FP_PUSH:
01863                 case FP_PULL:
01864                 case FP_GRIP:
01865                 case FP_LIGHTNING:
01866                 case FP_DRAIN:
01867                         return qfalse;
01868                 default:
01869                         break;
01870                 }
01871         }
01872 
01873         return qtrue;
01874 }

void BG_ClearAnimsets void   ) 
 

Definition at line 1713 of file bg_panimate.c.

Referenced by CG_Shutdown(), and G_ShutdownGame().

01714 {
01715         /*
01716         int i = 1;
01717 
01718         while (i < bgNumAllAnims)
01719         {
01720                 if (bgAllAnims[i].anims)
01721                 {
01722                         strap_TrueFree((void **)&bgAllAnims[i].anims);
01723                 }
01724                 i++;
01725         }
01726         */
01727 }

qboolean BG_DirectFlippingAnim int  anim  ) 
 

Definition at line 204 of file bg_panimate.c.

References BOTH_FLIP_B, BOTH_FLIP_F, BOTH_FLIP_L, BOTH_FLIP_R, qboolean, qfalse, and qtrue.

00205 {
00206         switch ( (anim) )
00207         {
00208         case BOTH_FLIP_F:                       //# Flip forward
00209         case BOTH_FLIP_B:                       //# Flip backwards
00210         case BOTH_FLIP_L:                       //# Flip left
00211         case BOTH_FLIP_R:                       //# Flip right
00212                 return qtrue;
00213                 break;
00214         }
00215 
00216         return qfalse;
00217 }

void BG_EvaluateTrajectory const trajectory_t tr,
int  atTime,
vec3_t  result
 

Definition at line 2353 of file bg_misc.c.

References Com_Error(), cos(), DEFAULT_GRAVITY, DEG2RAD, ERR_DROP, M_PI, sin(), TR_GRAVITY, TR_INTERPOLATE, TR_LINEAR, TR_LINEAR_STOP, TR_NONLINEAR_STOP, TR_SINE, TR_STATIONARY, trajectory_t::trBase, trajectory_t::trDelta, trajectory_t::trDuration, trajectory_t::trTime, trajectory_t::trType, vec3_t, VectorCopy, and VectorMA.

Referenced by BG_PlayerTouchesItem(), CG_AddFragment(), CG_AdjustPositionForMover(), CG_BloodTrail(), CG_CalcEntityLerpPositions(), CG_CheckEvents(), CG_DrawRadar(), CG_ResetPlayerEntity(), fx_runner_think(), G_ExplodeMissile(), G_MoverTeam(), G_RunItem(), G_RunMissile(), G_RunObject(), SetMoverState(), thermalDetonatorExplode(), WP_LobFire(), and WP_SaberPositionUpdate().

02353                                                                                 {
02354         float           deltaTime;
02355         float           phase;
02356 
02357         switch( tr->trType ) {
02358         case TR_STATIONARY:
02359         case TR_INTERPOLATE:
02360                 VectorCopy( tr->trBase, result );
02361                 break;
02362         case TR_LINEAR:
02363                 deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
02364                 VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
02365                 break;
02366         case TR_SINE:
02367                 deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration;
02368                 phase = sin( deltaTime * M_PI * 2 );
02369                 VectorMA( tr->trBase, phase, tr->trDelta, result );
02370                 break;
02371         case TR_LINEAR_STOP:
02372                 if ( atTime > tr->trTime + tr->trDuration ) {
02373                         atTime = tr->trTime + tr->trDuration;
02374                 }
02375                 deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
02376                 if ( deltaTime < 0 ) {
02377                         deltaTime = 0;
02378                 }
02379                 VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
02380                 break;
02381         case TR_NONLINEAR_STOP:
02382                 if ( atTime > tr->trTime + tr->trDuration ) 
02383                 {
02384                         atTime = tr->trTime + tr->trDuration;
02385                 }
02386                 //new slow-down at end
02387                 if ( atTime - tr->trTime > tr->trDuration || atTime - tr->trTime <= 0  )
02388                 {
02389                         deltaTime = 0;
02390                 }
02391                 else
02392                 {//FIXME: maybe scale this somehow?  So that it starts out faster and stops faster?
02393                         deltaTime = tr->trDuration*0.001f*((float)cos( DEG2RAD(90.0f - (90.0f*((float)atTime-tr->trTime)/(float)tr->trDuration)) ));
02394                 }
02395                 VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
02396                 break;
02397         case TR_GRAVITY:
02398                 deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
02399                 VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
02400                 result[2] -= 0.5 * DEFAULT_GRAVITY * deltaTime * deltaTime;             // FIXME: local gravity...
02401                 break;
02402         default:
02403 #ifdef QAGAME
02404                 Com_Error( ERR_DROP, "BG_EvaluateTrajectory: [GAME SIDE] unknown trType: %i", tr->trType );
02405 #else
02406                 Com_Error( ERR_DROP, "BG_EvaluateTrajectory: [CLIENTGAME SIDE] unknown trType: %i", tr->trType );
02407 #endif
02408                 break;
02409         }
02410 }

void BG_EvaluateTrajectoryDelta const trajectory_t tr,
int  atTime,
vec3_t  result
 

Definition at line 2419 of file bg_misc.c.

References Com_Error(), cos(), DEFAULT_GRAVITY, DEG2RAD, ERR_DROP, M_PI, TR_GRAVITY, TR_INTERPOLATE, TR_LINEAR, TR_LINEAR_STOP, TR_NONLINEAR_STOP, TR_SINE, TR_STATIONARY, trajectory_t::trDelta, trajectory_t::trDuration, trajectory_t::trTime, trajectory_t::trType, vec3_t, VectorClear, VectorCopy, and VectorScale.

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

02419                                                                                      {
02420         float   deltaTime;
02421         float   phase;
02422 
02423         switch( tr->trType ) {
02424         case TR_STATIONARY:
02425         case TR_INTERPOLATE:
02426                 VectorClear( result );
02427                 break;
02428         case TR_LINEAR:
02429                 VectorCopy( tr->trDelta, result );
02430                 break;
02431         case TR_SINE:
02432                 deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration;
02433                 phase = cos( deltaTime * M_PI * 2 );    // derivative of sin = cos
02434                 phase *= 0.5;
02435                 VectorScale( tr->trDelta, phase, result );
02436                 break;
02437         case TR_LINEAR_STOP:
02438                 if ( atTime > tr->trTime + tr->trDuration ) {
02439                         VectorClear( result );
02440                         return;
02441                 }
02442                 VectorCopy( tr->trDelta, result );
02443                 break;
02444         case TR_NONLINEAR_STOP:
02445                 if ( atTime - tr->trTime > tr->trDuration || atTime - tr->trTime <= 0  )
02446                 {
02447                         VectorClear( result );
02448                         return;
02449                 }
02450                 deltaTime = tr->trDuration*0.001f*((float)cos( DEG2RAD(90.0f - (90.0f*((float)atTime-tr->trTime)/(float)tr->trDuration)) ));
02451                 VectorScale( tr->trDelta, deltaTime, result );
02452                 break;
02453         case TR_GRAVITY:
02454                 deltaTime = ( atTime - tr->trTime ) * 0.001;    // milliseconds to seconds
02455                 VectorCopy( tr->trDelta, result );
02456                 result[2] -= DEFAULT_GRAVITY * deltaTime;               // FIXME: local gravity...
02457                 break;
02458         default:
02459                 Com_Error( ERR_DROP, "BG_EvaluateTrajectoryDelta: unknown trType: %i", tr->trTime );
02460                 break;
02461         }
02462 }

gitem_t* BG_FindItem const char *  classname  ) 
 

Definition at line 1960 of file bg_misc.c.

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

Referenced by Cmd_Give_f(), G_CheckTeamItems(), G_PrecacheDispensers(), ItemUse_UseDisp(), and SP_gametype_item().

01960                                               {
01961         gitem_t *it;
01962         
01963         for ( it = bg_itemlist + 1 ; it->classname ; it++ ) {
01964                 if ( !Q_stricmp( it->classname, classname) )
01965                         return it;
01966         }
01967 
01968         return NULL;
01969 }

gitem_t* BG_FindItemForHoldable holdable_t  pw  ) 
 

Definition at line 1901 of file bg_misc.c.

References bg_itemlist, bg_numItems, Com_Error(), ERR_DROP, gitem_s::giTag, gitem_t, gitem_s::giType, holdable_t, IT_HOLDABLE, and NULL.

Referenced by G_SiegeRegisterWeaponsAndHoldables(), PlaceShield(), and UI_SiegeSetCvarsForClass().

01901                                                  {
01902         int             i;
01903 
01904         for ( i = 0 ; i < bg_numItems ; i++ ) {
01905                 if ( bg_itemlist[i].giType == IT_HOLDABLE && bg_itemlist[i].giTag == pw ) {
01906                         return &bg_itemlist[i];
01907                 }
01908         }
01909 
01910         Com_Error( ERR_DROP, "HoldableItem not found" );
01911 
01912         return NULL;
01913 }

gitem_t* BG_FindItemForPowerup powerup_t  pw  ) 
 

Definition at line 1881 of file bg_misc.c.

References bg_itemlist, bg_numItems, gitem_s::giTag, gitem_t, gitem_s::giType, IT_POWERUP, IT_TEAM, NULL, and powerup_t.

Referenced by CG_DrawFlagModel(), CG_DrawNewTeamInfo(), and TossClientItems().

01881                                                {
01882         int             i;
01883 
01884         for ( i = 0 ; i < bg_numItems ; i++ ) {
01885                 if ( (bg_itemlist[i].giType == IT_POWERUP || 
01886                                         bg_itemlist[i].giType == IT_TEAM) && 
01887                         bg_itemlist[i].giTag == pw ) {
01888                         return &bg_itemlist[i];
01889                 }
01890         }
01891 
01892         return NULL;
01893 }

gitem_t* BG_FindItemForWeapon weapon_t  weapon  ) 
 

Definition at line 1922 of file bg_misc.c.

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

Referenced by CG_Init(), ClearRegisteredItems(), EWebPrecache(), finish_spawning_turretG2(), G_SiegeRegisterWeaponsAndHoldables(), InitShooter(), NPC_ATST_Precache(), NPC_Mark1_Precache(), NPC_Mark2_Precache(), NPC_Precache(), NPC_PrecacheWeapons(), NPC_Probe_Precache(), SP_emplaced_gun(), SP_misc_weapon_shooter(), TossClientItems(), TossClientWeapon(), turret_base_spawn_top(), and UI_SiegeSetCvarsForClass().

01922                                                  {
01923         gitem_t *it;
01924         
01925         for ( it = bg_itemlist + 1 ; it->classname ; it++) {
01926                 if ( it->giType == IT_WEAPON && it->giTag == weapon ) {
01927                         return it;
01928                 }
01929         }
01930 
01931         Com_Error( ERR_DROP, "Couldn't find item for weapon %i", weapon);
01932         return NULL;
01933 }

qboolean BG_FlippingAnim int  anim  ) 
 

Definition at line 433 of file bg_panimate.c.

00434 {
00435         switch ( anim )
00436         {
00437         case BOTH_FLIP_F:                       //# Flip forward
00438         case BOTH_FLIP_B:                       //# Flip backwards
00439         case BOTH_FLIP_L:                       //# Flip left
00440         case BOTH_FLIP_R:                       //# Flip right
00441         case BOTH_WALL_RUN_RIGHT_FLIP:
00442         case BOTH_WALL_RUN_LEFT_FLIP:
00443         case BOTH_WALL_FLIP_RIGHT:
00444         case BOTH_WALL_FLIP_LEFT:
00445         case BOTH_FLIP_BACK1:
00446         case BOTH_FLIP_BACK2:
00447         case BOTH_FLIP_BACK3:
00448         case BOTH_WALL_FLIP_BACK1:
00449         //Not really flips, but...
00450         case BOTH_WALL_RUN_RIGHT:
00451         case BOTH_WALL_RUN_LEFT:
00452         case BOTH_WALL_RUN_RIGHT_STOP:
00453         case BOTH_WALL_RUN_LEFT_STOP:
00454         case BOTH_BUTTERFLY_LEFT:
00455         case BOTH_BUTTERFLY_RIGHT:
00456         case BOTH_BUTTERFLY_FL1:
00457         case BOTH_BUTTERFLY_FR1:
00458         //
00459         case BOTH_ARIAL_LEFT:
00460         case BOTH_ARIAL_RIGHT:
00461         case BOTH_ARIAL_F1:
00462         case BOTH_CARTWHEEL_LEFT:
00463         case BOTH_CARTWHEEL_RIGHT:
00464         case BOTH_JUMPFLIPSLASHDOWN1:
00465         case BOTH_JUMPFLIPSTABDOWN:
00466         case BOTH_JUMPATTACK6:
00467         case BOTH_JUMPATTACK7:
00468         //JKA
00469         case BOTH_FORCEWALLRUNFLIP_END:
00470         case BOTH_FORCEWALLRUNFLIP_ALT:
00471         case BOTH_FLIP_ATTACK7:
00472         case BOTH_A7_SOULCAL:
00473                 return qtrue;
00474                 break;
00475         }
00476         return qfalse;
00477 }

void BG_ForcePowerDrain playerState_t ps,
forcePowers_t  forcePower,
int  overrideAmt
 

Definition at line 27 of file bg_saber.c.

References playerState_s::fd, forcedata_s::forcePower, forcedata_s::forcePowerLevel, forcePowerNeeded, forcePowers_t, FP_LEVITATION, playerState_t, and playerState_s::velocity.

Referenced by ForceHeal(), ForceShootDrain(), ForceTeamForceReplenish(), ForceTeamHeal(), PM_AdjustAngleForWallJump(), PM_CheckPullAttack(), PM_SaberAttackForMovement(), PM_WeaponLightsaber(), WP_DoSpecificPower(), and WP_ForcePowerStart().

00028 {
00029         //take away the power
00030         int     drain = overrideAmt;
00031 
00032         /*
00033         if (ps->powerups[PW_FORCE_BOON])
00034         {
00035                 return;
00036         }
00037         */
00038         //No longer grant infinite force with boon.
00039 
00040         if ( !drain )
00041         {
00042                 drain = forcePowerNeeded[ps->fd.forcePowerLevel[forcePower]][forcePower];
00043         }
00044         if ( !drain )
00045         {
00046                 return;
00047         }
00048 
00049         if (forcePower == FP_LEVITATION)
00050         { //special case
00051                 int jumpDrain = 0;
00052 
00053                 if (ps->velocity[2] > 250)
00054                 {
00055                         jumpDrain = 20;
00056                 }
00057                 else if (ps->velocity[2] > 200)
00058                 {
00059                         jumpDrain = 16;
00060                 }
00061                 else if (ps->velocity[2] > 150)
00062                 {
00063                         jumpDrain = 12;
00064                 }
00065                 else if (ps->velocity[2] > 100)
00066                 {
00067                         jumpDrain = 8;
00068                 }
00069                 else if (ps->velocity[2] > 50)
00070                 {
00071                         jumpDrain = 6;
00072                 }
00073                 else if (ps->velocity[2] > 0)
00074                 {
00075                         jumpDrain = 4;
00076                 }
00077 
00078                 if (jumpDrain)
00079                 {
00080                         if (ps->fd.forcePowerLevel[FP_LEVITATION])
00081                         { //don't divide by 0!
00082                                 jumpDrain /= ps->fd.forcePowerLevel[FP_LEVITATION];
00083                         }
00084                 }
00085 
00086                 ps->fd.forcePower -= jumpDrain;
00087                 if ( ps->fd.forcePower < 0 )
00088                 {
00089                         ps->fd.forcePower = 0;
00090                 }
00091 
00092                 return;
00093         }
00094 
00095         ps->fd.forcePower -= drain;
00096         if ( ps->fd.forcePower < 0 )
00097         {
00098                 ps->fd.forcePower = 0;
00099         }
00100 }

void BG_G2ATSTAngles void *  ghoul2,
int  time,
vec3_t  cent_lerpAngles
 

Definition at line 9460 of file bg_pmove.c.

References BONE_ANGLES_POSTMULT, NEGATIVE_Y, NEGATIVE_Z, POSITIVE_X, strap_G2API_SetBoneAngles(), and vec3_t.

09461 {//                                                                                                                                                                                     up                      right           fwd
09462         strap_G2API_SetBoneAngles(ghoul2, 0, "thoracic", cent_lerpAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09463 }

void BG_G2PlayerAngles void *  ghoul2,
int  motionBolt,
entityState_t cent,
int  time,
vec3_t  cent_lerpOrigin,
vec3_t  cent_lerpAngles,
vec3_t  legs[3],
vec3_t  legsAngles,
qboolean tYawing,
qboolean tPitching,
qboolean lYawing,
float *  tYawAngle,
float *  tPitchAngle,
float *  lYawAngle,
int  frametime,
vec3_t  turAngles,
vec3_t  modelScale,
int  ciLegs,
int  ciTorso,
int *  corrTime,
vec3_t  lookAngles,
vec3_t  lastHeadAngles,
int  lookTime,
entityState_t emplaced,
int *  crazySmoothFactor
 

Definition at line 9083 of file bg_pmove.c.

References AngleMod(), AngleNormalize180(), entityState_s::angles2, AnglesSubtract(), AnglesToAxis(), AngleSubtract(), BG_InRoll2(), BG_SaberInSpecial(), BG_SaberLockBreakAnim(), BG_UpdateLookAngles(), BONE_ANGLES_POSTMULT, BOTH_STAND1, BOTH_STRAFE_LEFT1, BOTH_STRAFE_RIGHT1, Com_Error(), DotProduct, EF_DEAD, entityState_s::eFlags, ENTITYNUM_NONE, entityState_t, ERR_DROP, entityState_s::forceFrame, entityState_s::groundEntityNum, entityState_s::heldByClient, entityState_s::legsAnim, entityState_s::m_iVehicleNum, MAX_CLIENTS, NEGATIVE_Y, NEGATIVE_Z, entityState_s::number, PITCH, entityState_s::pos, POSITIVE_X, qtrue, ROLL, entityState_s::saberMove, strap_G2API_SetBoneAngles(), entityState_s::torsoAnim, trajectory_t::trBase, trajectory_t::trDelta, vec3_origin, vec3_t, vectoangles(), VectorAdd, VectorClear, VectorCopy, VectorNormalize(), VectorScale, VectorSet, VectorSubtract, entityState_s::weapon, WeaponReadyAnim, WP_EMPLACED_GUN, WP_NONE, WP_SABER, and YAW.

09089 {
09090         int                                     adddir = 0;
09091         static int                      dir;
09092         static int                      i;
09093         static int                      movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 };
09094         float                           degrees_negative = 0;
09095         float                           degrees_positive = 0;
09096         static float            dif;
09097         static float            dest;
09098         static float            speed; //, speed_dif, speed_desired;
09099         static const float      lookSpeed = 1.5f;
09100 #ifdef BONE_BASED_LEG_ANGLES
09101         static float            legBoneYaw;
09102 #endif
09103         static vec3_t           eyeAngles;
09104         static vec3_t           neckAngles;
09105         static vec3_t           velocity;
09106         static vec3_t           torsoAngles, headAngles;
09107         static vec3_t           velPos, velAng;
09108         static vec3_t           ulAngles, llAngles, viewAngles, angles, thoracicAngles = {0,0,0};
09109         static vec3_t           headClampMinAngles = {-25,-55,-10}, headClampMaxAngles = {50,50,10};
09110 
09111         if ( cent->m_iVehicleNum || cent->forceFrame || BG_SaberLockBreakAnim(cent->legsAnim) || BG_SaberLockBreakAnim(cent->torsoAnim) )
09112         { //a vehicle or riding a vehicle - in either case we don't need to be in here
09113                 vec3_t forcedAngles;
09114 
09115                 VectorClear(forcedAngles);
09116                 forcedAngles[YAW] = cent_lerpAngles[YAW];
09117                 forcedAngles[ROLL] = cent_lerpAngles[ROLL];
09118                 AnglesToAxis( forcedAngles, legs );
09119                 VectorCopy(forcedAngles, legsAngles);
09120 
09121                 if (cent->number < MAX_CLIENTS)
09122                 {
09123                         strap_G2API_SetBoneAngles(ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09124                         strap_G2API_SetBoneAngles(ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09125                         strap_G2API_SetBoneAngles(ghoul2, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09126                         strap_G2API_SetBoneAngles(ghoul2, 0, "thoracic", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09127                         strap_G2API_SetBoneAngles(ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09128                 }
09129                 return;
09130         }
09131 
09132         if ((time+2000) < *corrTime)
09133         {
09134                 *corrTime = 0;
09135         }
09136 
09137         VectorCopy( cent_lerpAngles, headAngles );
09138         headAngles[YAW] = AngleMod( headAngles[YAW] );
09139         VectorClear( legsAngles );
09140         VectorClear( torsoAngles );
09141         // --------- yaw -------------
09142 
09143         // allow yaw to drift a bit
09144         if ((( cent->legsAnim ) != BOTH_STAND1) || 
09145                         ( cent->torsoAnim ) != WeaponReadyAnim[cent->weapon]  ) 
09146         {
09147                 // if not standing still, always point all in the same direction
09148                 //cent->pe.torso.yawing = qtrue;        // always center
09149                 *tYawing = qtrue;
09150                 //cent->pe.torso.pitching = qtrue;      // always center
09151                 *tPitching = qtrue;
09152                 //cent->pe.legs.yawing = qtrue; // always center
09153                 *lYawing = qtrue;
09154         }
09155 
09156         // adjust legs for movement dir
09157         if ( cent->eFlags & EF_DEAD ) {
09158                 // don't let dead bodies twitch
09159                 dir = 0;
09160         } else {
09161                 dir = cent->angles2[YAW];
09162                 if ( dir < 0 || dir > 7 ) {
09163                         Com_Error( ERR_DROP, "Bad player movement angle (%i)", dir );
09164                 }
09165         }
09166 
09167         torsoAngles[YAW] = headAngles[YAW];
09168 
09169         //for now, turn torso instantly and let the legs swing to follow
09170         *tYawAngle = torsoAngles[YAW];
09171 
09172         // --------- pitch -------------
09173 
09174         VectorCopy( cent->pos.trDelta, velocity );
09175 
09176         if (BG_InRoll2(cent))
09177         { //don't affect angles based on vel then
09178                 VectorClear(velocity);
09179         }
09180         else if (cent->weapon == WP_SABER &&
09181                 BG_SaberInSpecial(cent->saberMove))
09182         {
09183                 VectorClear(velocity);
09184         }
09185 
09186         speed = VectorNormalize( velocity );
09187 
09188         if (!speed)
09189         {
09190                 torsoAngles[YAW] = headAngles[YAW];
09191         }
09192 
09193         // only show a fraction of the pitch angle in the torso
09194         if ( headAngles[PITCH] > 180 ) {
09195                 dest = (-360 + headAngles[PITCH]) * 0.75;
09196         } else {
09197                 dest = headAngles[PITCH] * 0.75;
09198         }
09199 
09200         if (cent->m_iVehicleNum)
09201         { //swing instantly on vehicles
09202                 *tPitchAngle = dest;
09203         }
09204         else
09205         {
09206                 BG_SwingAngles( dest, 15, 30, 0.1, tPitchAngle, tPitching, frametime );
09207         }
09208         torsoAngles[PITCH] = *tPitchAngle;
09209 
09210         // --------- roll -------------
09211 
09212         if ( speed ) {
09213                 vec3_t  axis[3];
09214                 float   side;
09215 
09216                 speed *= 0.05;
09217 
09218                 AnglesToAxis( legsAngles, axis );
09219                 side = speed * DotProduct( velocity, axis[1] );
09220                 legsAngles[ROLL] -= side;
09221 
09222                 side = speed * DotProduct( velocity, axis[0] );
09223                 legsAngles[PITCH] += side;
09224         }
09225 
09226         //legsAngles[YAW] = headAngles[YAW] + (movementOffsets[ dir ]*speed_dif);
09227 
09228         //rww - crazy velocity-based leg angle calculation
09229         legsAngles[YAW] = headAngles[YAW];
09230         velPos[0] = cent_lerpOrigin[0] + velocity[0];
09231         velPos[1] = cent_lerpOrigin[1] + velocity[1];
09232         velPos[2] = cent_lerpOrigin[2];// + velocity[2];
09233 
09234         if ( cent->groundEntityNum == ENTITYNUM_NONE ||
09235                  cent->forceFrame ||
09236                  (cent->weapon == WP_EMPLACED_GUN && emplaced) )
09237         { //off the ground, no direction-based leg angles (same if in saberlock)
09238                 VectorCopy(cent_lerpOrigin, velPos);
09239         }
09240 
09241         VectorSubtract(cent_lerpOrigin, velPos, velAng);
09242 
09243         if (!VectorCompare(velAng, vec3_origin))
09244         {
09245                 vectoangles(velAng, velAng);
09246 
09247                 if (velAng[YAW] <= legsAngles[YAW])
09248                 {
09249                         degrees_negative = (legsAngles[YAW] - velAng[YAW]);
09250                         degrees_positive = (360 - legsAngles[YAW]) + velAng[YAW];
09251                 }
09252                 else
09253                 {
09254                         degrees_negative = legsAngles[YAW] + (360 - velAng[YAW]);
09255                         degrees_positive = (velAng[YAW] - legsAngles[YAW]);
09256                 }
09257 
09258                 if ( degrees_negative < degrees_positive )
09259                 {
09260                         dif = degrees_negative;
09261                         adddir = 0;
09262                 }
09263                 else
09264                 {
09265                         dif = degrees_positive;
09266                         adddir = 1;
09267                 }
09268 
09269                 if (dif > 90)
09270                 {
09271                         dif = (180 - dif);
09272                 }
09273 
09274                 if (dif > 60)
09275                 {
09276                         dif = 60;
09277                 }
09278 
09279                 //Slight hack for when playing is running backward
09280                 if (dir == 3 || dir == 5)
09281                 {
09282                         dif = -dif;
09283                 }
09284 
09285                 if (adddir)
09286                 {
09287                         legsAngles[YAW] -= dif;
09288                 }
09289                 else
09290                 {
09291                         legsAngles[YAW] += dif;
09292                 }
09293         }
09294 
09295         if (cent->m_iVehicleNum)
09296         { //swing instantly on vehicles
09297                 *lYawAngle = legsAngles[YAW];
09298         }
09299         else
09300         {
09301                 BG_SwingAngles( legsAngles[YAW], /*40*/0, 90, 0.65, lYawAngle, lYawing, frametime );
09302         }
09303         legsAngles[YAW] = *lYawAngle;
09304 
09305         /*
09306         // pain twitch
09307         CG_AddPainTwitch( cent, torsoAngles );
09308         */
09309 
09310         legsAngles[ROLL] = 0;
09311         torsoAngles[ROLL] = 0;
09312 
09313 //      VectorCopy(legsAngles, turAngles);
09314 
09315         // pull the angles back out of the hierarchial chain
09316         AnglesSubtract( headAngles, torsoAngles, headAngles );
09317         AnglesSubtract( torsoAngles, legsAngles, torsoAngles );
09318 
09319         legsAngles[PITCH] = 0;
09320 
09321         if (cent->heldByClient)
09322         { //keep the base angles clear when doing the IK stuff, it doesn't compensate for it.
09323           //rwwFIXMEFIXME: Store leg angles off and add them to all the fed in angles for G2 functions?
09324                 VectorClear(legsAngles);
09325                 legsAngles[YAW] = cent_lerpAngles[YAW];
09326         }
09327 
09328 #ifdef BONE_BASED_LEG_ANGLES
09329         legBoneYaw = legsAngles[YAW];
09330         VectorClear(legsAngles);
09331         legsAngles[YAW] = cent_lerpAngles[YAW];
09332 #endif
09333 
09334         VectorCopy(legsAngles, turAngles);
09335 
09336         AnglesToAxis( legsAngles, legs );
09337 
09338         VectorCopy( cent_lerpAngles, viewAngles );
09339         viewAngles[YAW] = viewAngles[ROLL] = 0;
09340         viewAngles[PITCH] *= 0.5;
09341 
09342         VectorSet( angles, 0, legsAngles[1], 0 );
09343 
09344         angles[0] = legsAngles[0];
09345         if ( angles[0] > 30 )
09346         {
09347                 angles[0] = 30;
09348         }
09349         else if ( angles[0] < -30 )
09350         {
09351                 angles[0] = -30;
09352         }
09353 
09354         if (cent->weapon == WP_EMPLACED_GUN &&
09355                 emplaced)
09356         { //if using an emplaced gun, then we want to make sure we're angled to "hold" it right
09357                 vec3_t facingAngles;
09358 
09359                 VectorSubtract(emplaced->pos.trBase, cent_lerpOrigin, facingAngles);
09360                 vectoangles(facingAngles, facingAngles);
09361 
09362                 if (emplaced->weapon == WP_NONE)
09363                 { //e-web
09364                         VectorCopy(facingAngles, legsAngles);
09365                         AnglesToAxis( legsAngles, legs );
09366                 }
09367                 else
09368                 { //misc emplaced
09369                         float dif = AngleSubtract(cent_lerpAngles[YAW], facingAngles[YAW]);
09370 
09371                         /*
09372                         if (emplaced->weapon == WP_NONE)
09373                         { //offset is a little bit different for the e-web
09374                                 dif -= 16.0f;
09375                         }
09376                         */
09377 
09378                         VectorSet(facingAngles, -16.0f, -dif, 0.0f);
09379 
09380                         if (cent->legsAnim == BOTH_STRAFE_LEFT1 || cent->legsAnim == BOTH_STRAFE_RIGHT1)
09381                         { //try to adjust so it doesn't look wrong
09382                                 if (crazySmoothFactor)
09383                                 { //want to smooth a lot during this because it chops around and looks like ass
09384                                         *crazySmoothFactor = time + 1000;
09385                                 }
09386 
09387                                 BG_G2ClientSpineAngles(ghoul2, motionBolt, cent_lerpOrigin, cent_lerpAngles, cent, time,
09388                                         viewAngles, ciLegs, ciTorso, angles, thoracicAngles, ulAngles, llAngles, modelScale,
09389                                         tPitchAngle, tYawAngle, corrTime);
09390                                 strap_G2API_SetBoneAngles(ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09391                                 strap_G2API_SetBoneAngles(ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09392                                 strap_G2API_SetBoneAngles(ghoul2, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09393 
09394                                 VectorAdd(facingAngles, thoracicAngles, facingAngles);
09395 
09396                                 if (cent->legsAnim == BOTH_STRAFE_LEFT1)
09397                                 { //this one needs some further correction
09398                                         facingAngles[YAW] -= 32.0f;
09399                                 }
09400                         }
09401                         else
09402                         {
09403                                 //strap_G2API_SetBoneAngles(ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09404                                 //strap_G2API_SetBoneAngles(ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09405                                 strap_G2API_SetBoneAngles(ghoul2, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time);
09406                         }
09407 
09408                         VectorScale(facingAngles, 0.6f, facingAngles);
09409                         strap_G2API_SetBoneAngles(ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09410                         VectorScale(facingAngles, 0.8f, facingAngles);
09411                         strap_G2API_SetBoneAngles(ghoul2, 0, "upper_lumbar", facingAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09412                         VectorScale(facingAngles, 0.8f, facingAngles);
09413                         strap_G2API_SetBoneAngles(ghoul2, 0, "thoracic", facingAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09414 
09415                         //Now we want the head angled toward where we are facing
09416                         VectorSet(facingAngles, 0.0f, dif, 0.0f);
09417                         VectorScale(facingAngles, 0.6f, facingAngles);
09418                         strap_G2API_SetBoneAngles(ghoul2, 0, "cervical", facingAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09419 
09420                         return; //don't have to bother with the rest then
09421                 }
09422         }
09423 
09424         BG_G2ClientSpineAngles(ghoul2, motionBolt, cent_lerpOrigin, cent_lerpAngles, cent, time,
09425                 viewAngles, ciLegs, ciTorso, angles, thoracicAngles, ulAngles, llAngles, modelScale,
09426                 tPitchAngle, tYawAngle, corrTime);
09427 
09428         VectorCopy(cent_lerpAngles, eyeAngles);
09429 
09430         for ( i = 0; i < 3; i++ )
09431         {
09432                 lookAngles[i] = AngleNormalize180( lookAngles[i] );
09433                 eyeAngles[i] = AngleNormalize180( eyeAngles[i] );
09434         }
09435         AnglesSubtract( lookAngles, eyeAngles, lookAngles );
09436 
09437         BG_UpdateLookAngles(lookTime, lastHeadAngles, time, lookAngles, lookSpeed, -50.0f, 50.0f, -70.0f, 70.0f, -30.0f, 30.0f);
09438 
09439         BG_G2ClientNeckAngles(ghoul2, time, lookAngles, headAngles, neckAngles, thoracicAngles, headClampMinAngles, headClampMaxAngles);
09440 
09441 #ifdef BONE_BASED_LEG_ANGLES
09442         {
09443                 vec3_t bLAngles;
09444                 VectorClear(bLAngles);
09445                 bLAngles[ROLL] = AngleNormalize180((legBoneYaw - cent_lerpAngles[YAW]));
09446                 strap_G2API_SetBoneAngles(ghoul2, 0, "model_root", bLAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09447 
09448                 if (!llAngles[YAW])
09449                 {
09450                         llAngles[YAW] -= bLAngles[ROLL];
09451                 }
09452         }
09453 #endif
09454         strap_G2API_SetBoneAngles(ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09455         strap_G2API_SetBoneAngles(ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09456         strap_G2API_SetBoneAngles(ghoul2, 0, "thoracic", thoracicAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time); 
09457         //strap_G2API_SetBoneAngles(ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time);
09458 }

int BG_GetItemIndexByTag int  tag,
int  type
 

Definition at line 2092 of file bg_misc.c.

References bg_itemlist, bg_numItems, gitem_s::giTag, and gitem_s::giType.

Referenced by BG_CycleInven(), BotUseInventoryItem(), CG_DrawInvenSelect(), CG_NextInventory_f(), CG_PrevInventory_f(), PmoveSingle(), TossClientWeapon(), and vmMain().

02093 { //Get the itemlist index from the tag and type
02094         int i = 0;
02095 
02096         while (i < bg_numItems)
02097         {
02098                 if (bg_itemlist[i].giTag == tag &&
02099                         bg_itemlist[i].giType == type)
02100                 {
02101                         return i;
02102                 }
02103 
02104                 i++;
02105         }
02106 
02107         return 0;
02108 }

qboolean BG_HasAnimation int  animIndex,
int  animation
 

Definition at line 2928 of file bg_panimate.c.

References animation_t, bgLoadedAnim_t::anims, bgAllAnims, bgNumAllAnims, MAX_ANIMATIONS, animation_s::numFrames, qboolean, qfalse, and qtrue.

Referenced by BG_PickAnim(), and G_PickDeathAnim().

02929 {
02930         animation_t *animations;
02931 
02932         //must be a valid anim number
02933         if ( animation < 0 || animation >= MAX_ANIMATIONS )
02934         {
02935                 return qfalse;
02936         }
02937 
02938         //Must have a file index entry
02939         if( animIndex < 0 || animIndex > bgNumAllAnims )
02940                 return qfalse;
02941 
02942         animations = bgAllAnims[animIndex].anims;
02943 
02944         //No frames, no anim
02945         if ( animations[animation].numFrames == 0 )
02946                 return qfalse;
02947 
02948         //Has the sequence
02949         return qtrue;
02950 }

qboolean BG_HasYsalamiri int  gametype,
playerState_t ps
 

Definition at line 1794 of file bg_misc.c.

References GT_CTY, playerState_t, playerState_s::powerups, PW_BLUEFLAG, PW_REDFLAG, PW_YSALAMIRI, qboolean, qfalse, and qtrue.

Referenced by BG_CanUseFPNow(), ForcePowerUsableOn(), PM_ForceJumpingUp(), PM_WeaponLightsaber(), saberFirstThrown(), WP_ForcePowersUpdate(), and WP_ForcePowerUsable().

01795 {
01796         if (gametype == GT_CTY &&
01797                 (ps->powerups[PW_REDFLAG] || ps->powerups[PW_BLUEFLAG]))
01798         {
01799                 return qtrue;
01800         }
01801 
01802         if (ps->powerups[PW_YSALAMIRI])
01803         {
01804                 return qtrue;
01805         }
01806 
01807         return qfalse;
01808 }

void BG_IK_MoveArm void *  ghoul2,
int  lHandBolt,
int  time,
entityState_t ent,
int  basePose,
vec3_t  desiredPos,
qboolean ikInProgress,
vec3_t  origin,
vec3_t  angles,
vec3_t  scale,
int  blendTime,
qboolean  forceHalt
 

Definition at line 8577 of file bg_pmove.c.

References sharedRagDollUpdateParams_t::angles, sharedSetBoneIKStateParams_t::angles, bgHumanoidAnimations, sharedSetBoneIKStateParams_t::blendTime, BONE_ANGLES_POSTMULT, sharedIKMoveParams_t::boneName, sharedIKMoveParams_t::desiredOrigin, sharedSetBoneIKStateParams_t::endFrame, entityState_t, animation_s::firstFrame, sharedSetBoneIKStateParams_t::forceAnimOnBone, IKS_DYNAMIC, IKS_NONE, mdxaBone_t::matrix, sharedRagDollUpdateParams_t::me, sharedIKMoveParams_t::movementSpeed, NEGATIVE_Y, NEGATIVE_Z, NULL, entityState_s::number, animation_s::numFrames, sharedIKMoveParams_t::origin, sharedSetBoneIKStateParams_t::origin, sharedSetBoneIKStateParams_t::pcjMaxs, sharedSetBoneIKStateParams_t::pcjMins, sharedSetBoneIKStateParams_t::pcjOverrides, PITCH, sharedRagDollUpdateParams_t::position, POSITIVE_X, qfalse, qtrue, sharedSetBoneIKStateParams_t::radius, ROLL, sharedRagDollUpdateParams_t::scale, sharedSetBoneIKStateParams_t::scale, sharedSetBoneIKStateParams_t::startFrame, strap_G2API_AnimateG2Models(), strap_G2API_GetBoltMatrix(), strap_G2API_GetBoneAnim(), strap_G2API_IKMove(), strap_G2API_SetBoneAngles(), strap_G2API_SetBoneAnim(), strap_G2API_SetBoneIKState(), vec3_origin, vec3_t, VectorClear, VectorCopy, VectorSet, VectorSubtract, and sharedRagDollUpdateParams_t::velocity.

08579 {
08580         mdxaBone_t lHandMatrix;
08581         vec3_t lHand;
08582         vec3_t torg;
08583         float distToDest;
08584 
08585         if (!ghoul2)
08586         {
08587                 return;
08588         }
08589 
08590         assert(bgHumanoidAnimations[basePose].firstFrame > 0);
08591 
08592         if (!*ikInProgress && !forceHalt)
08593         {
08594                 int baseposeAnim = basePose;
08595                 sharedSetBoneIKStateParams_t ikP;
08596 
08597                 //restrict the shoulder joint
08598                 //VectorSet(ikP.pcjMins,-50.0f,-80.0f,-15.0f);
08599                 //VectorSet(ikP.pcjMaxs,15.0f,40.0f,15.0f);
08600 
08601                 //for now, leaving it unrestricted, but restricting elbow joint.
08602                 //This lets us break the arm however we want in order to fling people
08603                 //in throws, and doesn't look bad.
08604                 VectorSet(ikP.pcjMins,0,0,0);
08605                 VectorSet(ikP.pcjMaxs,0,0,0);
08606 
08607                 //give the info on our entity.
08608                 ikP.blendTime = blendTime;
08609                 VectorCopy(origin, ikP.origin);
08610                 VectorCopy(angles, ikP.angles);
08611                 ikP.angles[PITCH] = 0;
08612                 ikP.pcjOverrides = 0;
08613                 ikP.radius = 10.0f;
08614                 VectorCopy(scale, ikP.scale);
08615                 
08616                 //base pose frames for the limb
08617                 ikP.startFrame = bgHumanoidAnimations[baseposeAnim].firstFrame + bgHumanoidAnimations[baseposeAnim].numFrames;
08618                 ikP.endFrame = bgHumanoidAnimations[baseposeAnim].firstFrame + bgHumanoidAnimations[baseposeAnim].numFrames;
08619 
08620                 ikP.forceAnimOnBone = qfalse; //let it use existing anim if it's the same as this one.
08621 
08622                 //we want to call with a null bone name first. This will init all of the
08623                 //ik system stuff on the g2 instance, because we need ragdoll effectors
08624                 //in order for our pcj's to know how to angle properly.
08625                 if (!strap_G2API_SetBoneIKState(ghoul2, time, NULL, IKS_DYNAMIC, &ikP))
08626                 {
08627                         assert(!"Failed to init IK system for g2 instance!");
08628                 }
08629 
08630                 //Now, create our IK bone state.
08631                 if (strap_G2API_SetBoneIKState(ghoul2, time, "lhumerus", IKS_DYNAMIC, &ikP))
08632                 {
08633                         //restrict the elbow joint
08634                         VectorSet(ikP.pcjMins,-90.0f,-20.0f,-20.0f);
08635                         VectorSet(ikP.pcjMaxs,30.0f,20.0f,-20.0f);
08636 
08637                         if (strap_G2API_SetBoneIKState(ghoul2, time, "lradius", IKS_DYNAMIC, &ikP))
08638                         { //everything went alright.
08639                                 *ikInProgress = qtrue;
08640                         }
08641                 }
08642         }
08643 
08644         if (*ikInProgress && !forceHalt)
08645         { //actively update our ik state.
08646                 sharedIKMoveParams_t ikM;
08647                 sharedRagDollUpdateParams_t tuParms;
08648                 vec3_t tAngles;
08649 
08650                 //set the argument struct up
08651                 VectorCopy(desiredPos, ikM.desiredOrigin); //we want the bone to move here.. if possible
08652 
08653                 VectorCopy(angles, tAngles);
08654                 tAngles[PITCH] = tAngles[ROLL] = 0;
08655 
08656                 strap_G2API_GetBoltMatrix(ghoul2, 0, lHandBolt, &lHandMatrix, tAngles, origin, time, 0, scale);
08657                 //Get the point position from the matrix.
08658                 lHand[0] = lHandMatrix.matrix[0][3];
08659                 lHand[1] = lHandMatrix.matrix[1][3];
08660                 lHand[2] = lHandMatrix.matrix[2][3];
08661 
08662                 VectorSubtract(lHand, desiredPos, torg);
08663                 distToDest = VectorLength(torg);
08664 
08665                 //closer we are, more we want to keep updated.
08666                 //if we're far away we don't want to be too fast or we'll start twitching all over.
08667                 if (distToDest < 2)
08668                 { //however if we're this close we want very precise movement
08669                         ikM.movementSpeed = 0.4f;
08670                 }
08671                 else if (distToDest < 16)
08672                 {
08673                         ikM.movementSpeed = 0.9f;//8.0f;
08674                 }
08675                 else if (distToDest < 32)
08676                 {
08677                         ikM.movementSpeed = 0.8f;//4.0f;
08678                 }
08679                 else if (distToDest < 64)
08680                 {
08681                         ikM.movementSpeed = 0.7f;//2.0f;
08682                 }
08683                 else
08684                 {
08685                         ikM.movementSpeed = 0.6f;
08686                 }
08687                 VectorCopy(origin, ikM.origin); //our position in the world.
08688 
08689                 ikM.boneName[0] = 0;
08690                 if (strap_G2API_IKMove(ghoul2, time, &ikM))
08691                 {
08692                         //now do the standard model animate stuff with ragdoll update params.
08693                         VectorCopy(angles, tuParms.angles);
08694                         tuParms.angles[PITCH] = 0;
08695 
08696                         VectorCopy(origin, tuParms.position);
08697                         VectorCopy(scale, tuParms.scale);
08698 
08699                         tuParms.me = ent->number;
08700                         VectorClear(tuParms.velocity);
08701 
08702                         strap_G2API_AnimateG2Models(ghoul2, time, &tuParms);
08703                 }
08704                 else
08705                 {
08706                         *ikInProgress = qfalse;
08707                 }
08708         }
08709         else if (*ikInProgress)
08710         { //kill it
08711                 float cFrame, animSpeed;
08712                 int sFrame, eFrame, flags;
08713 
08714                 strap_G2API_SetBoneIKState(ghoul2, time, "lhumerus", IKS_NONE, NULL);
08715                 strap_G2API_SetBoneIKState(ghoul2, time, "lradius", IKS_NONE, NULL);
08716                 
08717                 //then reset the angles/anims on these PCJs
08718                 strap_G2API_SetBoneAngles(ghoul2, 0, "lhumerus", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, time);
08719                 strap_G2API_SetBoneAngles(ghoul2, 0, "lradius", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, time);
08720 
08721                 //Get the anim/frames that the pelvis is on exactly, and match the left arm back up with them again.
08722                 strap_G2API_GetBoneAnim(ghoul2, "pelvis", (const int)time, &cFrame, &sFrame, &eFrame, &flags, &animSpeed, 0, 0);
08723                 strap_G2API_SetBoneAnim(ghoul2, 0, "lhumerus", sFrame, eFrame, flags, animSpeed, time, sFrame, 300);
08724                 strap_G2API_SetBoneAnim(ghoul2, 0, "lradius", sFrame, eFrame, flags, animSpeed, time, sFrame, 300);
08725 
08726                 //And finally, get rid of all the ik state effector data by calling with null bone name (similar to how we init it).
08727                 strap_G2API_SetBoneIKState(ghoul2, time, NULL, IKS_NONE, NULL);
08728                 
08729                 *ikInProgress = qfalse;
08730         }
08731 }

qboolean BG_InBackFlip int  anim  ) 
 

Definition at line 191 of file bg_panimate.c.

References BOTH_FLIP_BACK1, BOTH_FLIP_BACK2, BOTH_FLIP_BACK3, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump().

00192 {
00193         switch ( anim )
00194         {
00195         case BOTH_FLIP_BACK1:
00196         case BOTH_FLIP_BACK2:
00197         case BOTH_FLIP_BACK3:
00198                 return qtrue;
00199                 break;
00200         }
00201         return qfalse;
00202 }

qboolean BG_InDeathAnim int  anim  ) 
 

Definition at line 836 of file bg_panimate.c.

References BG_InSpecialDeathAnim(), BOTH_DEAD1, BOTH_DEAD10, BOTH_DEAD11, BOTH_DEAD12, BOTH_DEAD13, BOTH_DEAD14, BOTH_DEAD15, BOTH_DEAD16, BOTH_DEAD17, BOTH_DEAD18, BOTH_DEAD19, BOTH_DEAD2, BOTH_DEAD20, BOTH_DEAD21, BOTH_DEAD22, BOTH_DEAD23, BOTH_DEAD24, BOTH_DEAD25, BOTH_DEAD3, BOTH_DEAD4, BOTH_DEAD5, BOTH_DEAD6, BOTH_DEAD7, BOTH_DEAD8, BOTH_DEAD9, BOTH_DEADBACKWARD1, BOTH_DEADBACKWARD2, BOTH_DEADFLOP1, BOTH_DEADFLOP2, BOTH_DEADFORWARD1, BOTH_DEADFORWARD2, BOTH_DEATH1, BOTH_DEATH10, BOTH_DEATH11, BOTH_DEATH12, BOTH_DEATH13, BOTH_DEATH14, BOTH_DEATH14_SITUP, BOTH_DEATH14_UNGRIP, BOTH_DEATH15, BOTH_DEATH16, BOTH_DEATH17, BOTH_DEATH18, BOTH_DEATH19, BOTH_DEATH1IDLE, BOTH_DEATH2, BOTH_DEATH20, BOTH_DEATH21, BOTH_DEATH22, BOTH_DEATH23, BOTH_DEATH24, BOTH_DEATH25, BOTH_DEATH3, BOTH_DEATH4, BOTH_DEATH5, BOTH_DEATH6, BOTH_DEATH7, BOTH_DEATH8, BOTH_DEATH9, BOTH_DEATHBACKWARD1, BOTH_DEATHBACKWARD2, BOTH_DEATHFORWARD1, BOTH_DEATHFORWARD2, BOTH_DEATHFORWARD3, BOTH_DISMEMBER_HEAD1, BOTH_DISMEMBER_LARM, BOTH_DISMEMBER_LLEG, BOTH_DISMEMBER_RARM, BOTH_DISMEMBER_RLEG, BOTH_DISMEMBER_TORSO1, BOTH_FALLDEAD1LAND, BOTH_FALLDEATH1, BOTH_FALLDEATH1INAIR, BOTH_FALLDEATH1LAND, BOTH_LYINGDEAD1, BOTH_LYINGDEATH1, BOTH_STUMBLEDEAD1, BOTH_STUMBLEDEATH1, qboolean, and qtrue.

Referenced by BG_StartTorsoAnim(), and G_Dismember().

00837 {//Purposely does not cover stumbledeath and falldeath...
00838         switch( anim )
00839         {
00840         case BOTH_DEATH1:               //# First Death anim
00841         case BOTH_DEATH2:                       //# Second Death anim
00842         case BOTH_DEATH3:                       //# Third Death anim
00843         case BOTH_DEATH4:                       //# Fourth Death anim
00844         case BOTH_DEATH5:                       //# Fifth Death anim
00845         case BOTH_DEATH6:                       //# Sixth Death anim
00846         case BOTH_DEATH7:                       //# Seventh Death anim
00847         case BOTH_DEATH8:                       //# 
00848         case BOTH_DEATH9:                       //# 
00849         case BOTH_DEATH10:                      //# 
00850         case BOTH_DEATH11:                      //#
00851         case BOTH_DEATH12:                      //# 
00852         case BOTH_DEATH13:                      //# 
00853         case BOTH_DEATH14:                      //# 
00854         case BOTH_DEATH14_UNGRIP:       //# Desann's end death (cin #35)
00855         case BOTH_DEATH14_SITUP:                //# Tavion sitting up after having been thrown (cin #23)
00856         case BOTH_DEATH15:                      //# 
00857         case BOTH_DEATH16:                      //# 
00858         case BOTH_DEATH17:                      //# 
00859         case BOTH_DEATH18:                      //# 
00860         case BOTH_DEATH19:                      //# 
00861         case BOTH_DEATH20:                      //# 
00862         case BOTH_DEATH21:                      //# 
00863         case BOTH_DEATH22:                      //# 
00864         case BOTH_DEATH23:                      //# 
00865         case BOTH_DEATH24:                      //# 
00866         case BOTH_DEATH25:                      //# 
00867 
00868         case BOTH_DEATHFORWARD1:                //# First Death in which they get thrown forward
00869         case BOTH_DEATHFORWARD2:                //# Second Death in which they get thrown forward
00870         case BOTH_DEATHFORWARD3:                //# Tavion's falling in cin# 23
00871         case BOTH_DEATHBACKWARD1:       //# First Death in which they get thrown backward
00872         case BOTH_DEATHBACKWARD2:       //# Second Death in which they get thrown backward
00873 
00874         case BOTH_DEATH1IDLE:           //# Idle while close to death
00875         case BOTH_LYINGDEATH1:          //# Death to play when killed lying down
00876         case BOTH_STUMBLEDEATH1:                //# Stumble forward and fall face first death
00877         case BOTH_FALLDEATH1:           //# Fall forward off a high cliff and splat death - start
00878         case BOTH_FALLDEATH1INAIR:      //# Fall forward off a high cliff and splat death - loop
00879         case BOTH_FALLDEATH1LAND:       //# Fall forward off a high cliff and splat death - hit bottom
00880         //# #sep case BOTH_ DEAD POSES # Should be last frame of corresponding previous anims
00881         case BOTH_DEAD1:                                //# First Death finished pose
00882         case BOTH_DEAD2:                                //# Second Death finished pose
00883         case BOTH_DEAD3:                                //# Third Death finished pose
00884         case BOTH_DEAD4:                                //# Fourth Death finished pose
00885         case BOTH_DEAD5:                                //# Fifth Death finished pose
00886         case BOTH_DEAD6:                                //# Sixth Death finished pose
00887         case BOTH_DEAD7:                                //# Seventh Death finished pose
00888         case BOTH_DEAD8:                                //# 
00889         case BOTH_DEAD9:                                //# 
00890         case BOTH_DEAD10:                       //# 
00891         case BOTH_DEAD11:                       //#
00892         case BOTH_DEAD12:                       //# 
00893         case BOTH_DEAD13:                       //# 
00894         case BOTH_DEAD14:                       //# 
00895         case BOTH_DEAD15:                       //# 
00896         case BOTH_DEAD16:                       //# 
00897         case BOTH_DEAD17:                       //# 
00898         case BOTH_DEAD18:                       //# 
00899         case BOTH_DEAD19:                       //# 
00900         case BOTH_DEAD20:                       //# 
00901         case BOTH_DEAD21:                       //# 
00902         case BOTH_DEAD22:                       //# 
00903         case BOTH_DEAD23:                       //# 
00904         case BOTH_DEAD24:                       //# 
00905         case BOTH_DEAD25:                       //# 
00906         case BOTH_DEADFORWARD1:         //# First thrown forward death finished pose
00907         case BOTH_DEADFORWARD2:         //# Second thrown forward death finished pose
00908         case BOTH_DEADBACKWARD1:                //# First thrown backward death finished pose
00909         case BOTH_DEADBACKWARD2:                //# Second thrown backward death finished pose
00910         case BOTH_LYINGDEAD1:           //# Killed lying down death finished pose
00911         case BOTH_STUMBLEDEAD1:         //# Stumble forward death finished pose
00912         case BOTH_FALLDEAD1LAND:                //# Fall forward and splat death finished pose
00913         //# #sep case BOTH_ DEAD TWITCH/FLOP # React to being shot from death poses
00914         case BOTH_DEADFLOP1:            //# React to being shot from First Death finished pose
00915         case BOTH_DEADFLOP2:            //# React to being shot from Second Death finished pose
00916         case BOTH_DISMEMBER_HEAD1:      //#
00917         case BOTH_DISMEMBER_TORSO1:     //#
00918         case BOTH_DISMEMBER_LLEG:       //#
00919         case BOTH_DISMEMBER_RLEG:       //#
00920         case BOTH_DISMEMBER_RARM:       //#
00921         case BOTH_DISMEMBER_LARM:       //#
00922                 return qtrue;
00923                 break;
00924         default:
00925                 return BG_InSpecialDeathAnim( anim );
00926                 break;
00927         }
00928 }

int BG_InGrappleMove int  anim  ) 
 

Definition at line 672 of file bg_panimate.c.

References BOTH_KYLE_GRAB, BOTH_KYLE_MISS, BOTH_KYLE_PA_1, BOTH_KYLE_PA_2, BOTH_PLAYER_PA_1, BOTH_PLAYER_PA_2, and BOTH_PLAYER_PA_FLY.

Referenced by CG_DrawActiveFrame(), PmoveSingle(), and WP_SaberPositionUpdate().

00673 {
00674         switch (anim)
00675         {
00676         case BOTH_KYLE_GRAB:
00677         case BOTH_KYLE_MISS:
00678                 return 1; //grabbing at someone
00679         case BOTH_KYLE_PA_1:
00680         case BOTH_KYLE_PA_2:
00681                 return 2; //beating the shit out of someone
00682         case BOTH_PLAYER_PA_1:
00683         case BOTH_PLAYER_PA_2:
00684         case BOTH_PLAYER_PA_FLY:
00685                 return 3; //getting the shit beaten out of you
00686                 break;
00687         }
00688 
00689         return 0;
00690 }

void BG_InitAnimsets void   ) 
 

Definition at line 1706 of file bg_panimate.c.

References bgAllAnims, BGPAFtextLoaded, memset(), and qfalse.

Referenced by CG_Init(), and G_InitGame().

01707 {
01708         memset(&bgAllAnims, 0, sizeof(bgAllAnims));
01709         BGPAFtextLoaded = qfalse;       // VVFIXME - The PC doesn't seem to need this, but why?
01710 }

qboolean BG_InKataAnim int  anim  ) 
 

Definition at line 306 of file bg_panimate.c.

References BOTH_A1_SPECIAL, BOTH_A2_SPECIAL, BOTH_A3_SPECIAL, BOTH_A6_SABERPROTECT, BOTH_A7_SOULCAL, qboolean, qfalse, and qtrue.

Referenced by PM_CanDoKata(), and PmoveSingle().

00307 {
00308         switch (anim)
00309         {
00310         case BOTH_A6_SABERPROTECT:
00311         case BOTH_A7_SOULCAL:
00312         case BOTH_A1_SPECIAL:
00313         case BOTH_A2_SPECIAL:
00314         case BOTH_A3_SPECIAL:
00315                 return qtrue;
00316         }
00317         return qfalse;
00318 }

qboolean BG_InReboundHold int  anim  ) 
 

Definition at line 163 of file bg_panimate.c.

References BOTH_FORCEWALLHOLD_BACK, BOTH_FORCEWALLHOLD_FORWARD, BOTH_FORCEWALLHOLD_LEFT, BOTH_FORCEWALLHOLD_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump(), G_LetGoOfWall(), PM_AdjustAngleForWallJump(), and PM_StepSlideMove().

00164 {
00165         switch ( anim )
00166         {
00167         case BOTH_FORCEWALLHOLD_FORWARD:
00168         case BOTH_FORCEWALLHOLD_LEFT:
00169         case BOTH_FORCEWALLHOLD_BACK:
00170         case BOTH_FORCEWALLHOLD_RIGHT:
00171                 return qtrue;
00172                 break;
00173         }
00174         return qfalse;
00175 }

qboolean BG_InReboundJump int  anim  ) 
 

Definition at line 149 of file bg_panimate.c.

References BOTH_FORCEWALLREBOUND_BACK, BOTH_FORCEWALLREBOUND_FORWARD, BOTH_FORCEWALLREBOUND_LEFT, BOTH_FORCEWALLREBOUND_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump(), G_LetGoOfWall(), PM_AdjustAngleForWallJump(), and PM_GroundSlideOkay().

00150 {
00151         switch ( anim )
00152         {
00153         case BOTH_FORCEWALLREBOUND_FORWARD:
00154         case BOTH_FORCEWALLREBOUND_LEFT:
00155         case BOTH_FORCEWALLREBOUND_BACK:
00156         case BOTH_FORCEWALLREBOUND_RIGHT:
00157                 return qtrue;
00158                 break;
00159         }
00160         return qfalse;
00161 }

qboolean BG_InReboundRelease int  anim  ) 
 

Definition at line 177 of file bg_panimate.c.

References BOTH_FORCEWALLRELEASE_BACK, BOTH_FORCEWALLRELEASE_FORWARD, BOTH_FORCEWALLRELEASE_LEFT, BOTH_FORCEWALLRELEASE_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump().

00178 {
00179         switch ( anim )
00180         {
00181         case BOTH_FORCEWALLRELEASE_FORWARD:
00182         case BOTH_FORCEWALLRELEASE_LEFT:
00183         case BOTH_FORCEWALLRELEASE_BACK:
00184         case BOTH_FORCEWALLRELEASE_RIGHT:
00185                 return qtrue;
00186                 break;
00187         }
00188         return qfalse;
00189 }

qboolean BG_InRoll playerState_t ps,
int  anim
 

Definition at line 789 of file bg_panimate.c.

00790 {
00791         switch ( (anim) )
00792         {
00793         case BOTH_GETUP_BROLL_B:
00794         case BOTH_GETUP_BROLL_F:
00795         case BOTH_GETUP_BROLL_L:
00796         case BOTH_GETUP_BROLL_R:
00797         case BOTH_GETUP_FROLL_B:
00798         case BOTH_GETUP_FROLL_F:
00799         case BOTH_GETUP_FROLL_L:
00800         case BOTH_GETUP_FROLL_R:
00801         case BOTH_ROLL_F:
00802         case BOTH_ROLL_B:
00803         case BOTH_ROLL_R:
00804         case BOTH_ROLL_L:
00805                 if ( ps->legsTimer > 0 )
00806                 {
00807                         return qtrue;
00808                 }
00809                 break;
00810         }
00811         return qfalse;
00812 }

qboolean BG_InSaberLock int  anim  ) 
 

Definition at line 957 of file bg_panimate.c.

References BG_InSaberLockOld(), BOTH_LK_DL_DL_S_L_1, BOTH_LK_DL_DL_S_L_2, BOTH_LK_DL_DL_T_L_1, BOTH_LK_DL_DL_T_L_2, BOTH_LK_DL_S_S_L_1, BOTH_LK_DL_S_T_L_1, BOTH_LK_DL_ST_S_L_1, BOTH_LK_DL_ST_T_L_1, BOTH_LK_S_DL_S_L_1, BOTH_LK_S_DL_T_L_1, BOTH_LK_S_S_S_L_1, BOTH_LK_S_S_S_L_2, BOTH_LK_S_S_T_L_1, BOTH_LK_S_S_T_L_2, BOTH_LK_S_ST_S_L_1, BOTH_LK_S_ST_T_L_1, BOTH_LK_ST_DL_S_L_1, BOTH_LK_ST_DL_T_L_1, BOTH_LK_ST_S_S_L_1, BOTH_LK_ST_S_T_L_1, BOTH_LK_ST_ST_S_L_1, BOTH_LK_ST_ST_S_L_2, BOTH_LK_ST_ST_T_L_1, BOTH_LK_ST_ST_T_L_2, qboolean, and qtrue.

Referenced by PM_SaberLocked().

00958 {
00959         switch ( anim )
00960         {
00961         case BOTH_LK_S_DL_S_L_1:                //lock if I'm using single vs. a dual
00962         case BOTH_LK_S_DL_T_L_1:                //lock if I'm using single vs. a dual
00963         case BOTH_LK_S_ST_S_L_1:                //lock if I'm using single vs. a staff
00964         case BOTH_LK_S_ST_T_L_1:                //lock if I'm using single vs. a staff
00965         case BOTH_LK_S_S_S_L_1:         //lock if I'm using single vs. a single and I initiated
00966         case BOTH_LK_S_S_T_L_1:         //lock if I'm using single vs. a single and I initiated
00967         case BOTH_LK_DL_DL_S_L_1:       //lock if I'm using dual vs. dual and I initiated
00968         case BOTH_LK_DL_DL_T_L_1:       //lock if I'm using dual vs. dual and I initiated
00969         case BOTH_LK_DL_ST_S_L_1:       //lock if I'm using dual vs. a staff
00970         case BOTH_LK_DL_ST_T_L_1:       //lock if I'm using dual vs. a staff
00971         case BOTH_LK_DL_S_S_L_1:                //lock if I'm using dual vs. a single
00972         case BOTH_LK_DL_S_T_L_1:                //lock if I'm using dual vs. a single
00973         case BOTH_LK_ST_DL_S_L_1:       //lock if I'm using staff vs. dual
00974         case BOTH_LK_ST_DL_T_L_1:       //lock if I'm using staff vs. dual
00975         case BOTH_LK_ST_ST_S_L_1:       //lock if I'm using staff vs. a staff and I initiated
00976         case BOTH_LK_ST_ST_T_L_1:       //lock if I'm using staff vs. a staff and I initiated
00977         case BOTH_LK_ST_S_S_L_1:                //lock if I'm using staff vs. a single
00978         case BOTH_LK_ST_S_T_L_1:                //lock if I'm using staff vs. a single
00979         case BOTH_LK_S_S_S_L_2:
00980         case BOTH_LK_S_S_T_L_2:
00981         case BOTH_LK_DL_DL_S_L_2:
00982         case BOTH_LK_DL_DL_T_L_2:
00983         case BOTH_LK_ST_ST_S_L_2:
00984         case BOTH_LK_ST_ST_T_L_2:
00985                 return qtrue;
00986                 break;
00987         default:
00988                 return BG_InSaberLockOld( anim );
00989                 break;
00990         }
00991         //return qfalse;
00992 }

qboolean BG_InSaberLockOld int  anim  ) 
 

Definition at line 944 of file bg_panimate.c.

References BOTH_BF1LOCK, BOTH_BF2LOCK, BOTH_CCWCIRCLELOCK, BOTH_CWCIRCLELOCK, qboolean, qfalse, and qtrue.

Referenced by BG_InSaberLock(), and PM_SaberLocked().

00945 {
00946         switch ( anim )
00947         {
00948         case BOTH_BF2LOCK:
00949         case BOTH_BF1LOCK:
00950         case BOTH_CWCIRCLELOCK:
00951         case BOTH_CCWCIRCLELOCK:
00952                 return qtrue;
00953         }
00954         return qfalse;
00955 }

qboolean BG_InSaberStandAnim int  anim  ) 
 

Definition at line 134 of file bg_panimate.c.

References BOTH_SABERDUAL_STANCE, BOTH_SABERFAST_STANCE, BOTH_SABERSLOW_STANCE, BOTH_SABERSTAFF_STANCE, BOTH_STAND2, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove().

00135 {
00136         switch ( (anim) )
00137         {
00138         case BOTH_SABERFAST_STANCE:
00139         case BOTH_STAND2:
00140         case BOTH_SABERSLOW_STANCE:
00141         case BOTH_SABERDUAL_STANCE:
00142         case BOTH_SABERSTAFF_STANCE:
00143                 return qtrue;
00144         default:
00145                 return qfalse;
00146         }
00147 }

qboolean BG_InSpecialJump int  anim  ) 
 

Definition at line 71 of file bg_panimate.c.

References BG_InBackFlip(), BG_InReboundHold(), BG_InReboundJump(), BG_InReboundRelease(), BOTH_A7_SOULCAL, BOTH_ARIAL_F1, BOTH_ARIAL_LEFT, BOTH_ARIAL_RIGHT, BOTH_BUTTERFLY_FL1, BOTH_BUTTERFLY_FR1, BOTH_BUTTERFLY_LEFT, BOTH_BUTTERFLY_RIGHT, BOTH_CARTWHEEL_LEFT, BOTH_CARTWHEEL_RIGHT, BOTH_FJSS_TL_BR, BOTH_FJSS_TR_BL, BOTH_FLIP_ATTACK7, BOTH_FLIP_BACK1, BOTH_FLIP_BACK2, BOTH_FLIP_BACK3, BOTH_FLIP_HOLD7, BOTH_FLIP_LAND, BOTH_FORCELEAP2_T__B_, BOTH_FORCELONGLEAP_ATTACK, BOTH_FORCELONGLEAP_START, BOTH_FORCEWALLRUNFLIP_ALT, BOTH_FORCEWALLRUNFLIP_END, BOTH_FORCEWALLRUNFLIP_START, BOTH_JUMPATTACK6, BOTH_JUMPATTACK7, BOTH_JUMPFLIPSLASHDOWN1, BOTH_JUMPFLIPSTABDOWN, BOTH_WALL_FLIP_BACK1, BOTH_WALL_FLIP_LEFT, BOTH_WALL_FLIP_RIGHT, BOTH_WALL_RUN_LEFT, BOTH_WALL_RUN_LEFT_FLIP, BOTH_WALL_RUN_LEFT_STOP, BOTH_WALL_RUN_RIGHT, BOTH_WALL_RUN_RIGHT_FLIP, BOTH_WALL_RUN_RIGHT_STOP, qboolean, qfalse, and qtrue.

Referenced by G_SPSaberDamageTraceLerped(), PM_ForceJumpingUp(), PM_ForceLegsAnim(), PM_SaberAttackForMovement(), PM_SetSaberMove(), and WP_SabersCheckLock().

00072 {
00073         switch ( (anim) )
00074         {
00075         case BOTH_WALL_RUN_RIGHT:
00076         case BOTH_WALL_RUN_RIGHT_STOP:
00077         case BOTH_WALL_RUN_RIGHT_FLIP:
00078         case BOTH_WALL_RUN_LEFT:
00079         case BOTH_WALL_RUN_LEFT_STOP:
00080         case BOTH_WALL_RUN_LEFT_FLIP:
00081         case BOTH_WALL_FLIP_RIGHT:
00082         case BOTH_WALL_FLIP_LEFT:
00083         case BOTH_FLIP_BACK1:
00084         case BOTH_FLIP_BACK2:
00085         case BOTH_FLIP_BACK3:
00086         case BOTH_WALL_FLIP_BACK1:
00087         case BOTH_BUTTERFLY_LEFT:
00088         case BOTH_BUTTERFLY_RIGHT:
00089         case BOTH_BUTTERFLY_FL1:
00090         case BOTH_BUTTERFLY_FR1:
00091         case BOTH_FJSS_TR_BL:
00092         case BOTH_FJSS_TL_BR:
00093         case BOTH_FORCELEAP2_T__B_:
00094         case BOTH_JUMPFLIPSLASHDOWN1://#
00095         case BOTH_JUMPFLIPSTABDOWN://#
00096         case BOTH_JUMPATTACK6:
00097         case BOTH_JUMPATTACK7:
00098         case BOTH_ARIAL_LEFT:
00099         case BOTH_ARIAL_RIGHT:
00100         case BOTH_ARIAL_F1:
00101         case BOTH_CARTWHEEL_LEFT:
00102         case BOTH_CARTWHEEL_RIGHT:
00103 
00104         case BOTH_FORCELONGLEAP_START:
00105         case BOTH_FORCELONGLEAP_ATTACK:
00106         case BOTH_FORCEWALLRUNFLIP_START:
00107         case BOTH_FORCEWALLRUNFLIP_END:
00108         case BOTH_FORCEWALLRUNFLIP_ALT:
00109         case BOTH_FLIP_ATTACK7:
00110         case BOTH_FLIP_HOLD7:
00111         case BOTH_FLIP_LAND:
00112         case BOTH_A7_SOULCAL:
00113                 return qtrue;
00114         }
00115         if ( BG_InReboundJump( anim ) )
00116         {
00117                 return qtrue;
00118         }
00119         if ( BG_InReboundHold( anim ) )
00120         {
00121                 return qtrue;
00122         }
00123         if ( BG_InReboundRelease( anim ) )
00124         {
00125                 return qtrue;
00126         }
00127         if ( BG_InBackFlip( anim ) )
00128         {
00129                 return qtrue;
00130         }
00131         return qfalse;
00132 }

qboolean BG_IsItemSelectable playerState_t ps,
int  item
 

Definition at line 2111 of file bg_misc.c.

References HI_AMMODISP, HI_HEALTHDISP, HI_JETPACK, playerState_t, qboolean, qfalse, and qtrue.

Referenced by BG_CycleInven(), CG_DrawInvenSelect(), G_ItemUsable(), and PM_ItemUsable().

02112 {
02113         if (item == HI_HEALTHDISP || item == HI_AMMODISP ||
02114                 item == HI_JETPACK)
02115         {
02116                 return qfalse;
02117         }
02118         return qtrue;
02119 }

qboolean BG_KickingAnim int  anim  ) 
 

Definition at line 645 of file bg_panimate.c.

References BOTH_A7_HILT, BOTH_A7_KICK_B, BOTH_A7_KICK_B_AIR, BOTH_A7_KICK_BF, BOTH_A7_KICK_F, BOTH_A7_KICK_F_AIR, BOTH_A7_KICK_L, BOTH_A7_KICK_L_AIR, BOTH_A7_KICK_R, BOTH_A7_KICK_R_AIR, BOTH_A7_KICK_RL, BOTH_A7_KICK_S, BOTH_GETUP_BROLL_B, BOTH_GETUP_BROLL_F, BOTH_GETUP_FROLL_B, BOTH_GETUP_FROLL_F, qboolean, qfalse, and qtrue.

Referenced by PM_WeaponLightsaber(), PmoveSingle(), and WP_SaberPositionUpdate().

00646 {
00647         switch ( anim )
00648         {
00649         case BOTH_A7_KICK_F:
00650         case BOTH_A7_KICK_B:
00651         case BOTH_A7_KICK_R:
00652         case BOTH_A7_KICK_L:
00653         case BOTH_A7_KICK_S:
00654         case BOTH_A7_KICK_BF:
00655         case BOTH_A7_KICK_RL:
00656         case BOTH_A7_KICK_F_AIR:
00657         case BOTH_A7_KICK_B_AIR:
00658         case BOTH_A7_KICK_R_AIR:
00659         case BOTH_A7_KICK_L_AIR:
00660         case BOTH_A7_HILT:
00661         //NOT kicks, but do kick traces anyway
00662         case BOTH_GETUP_BROLL_B:
00663         case BOTH_GETUP_BROLL_F:
00664         case BOTH_GETUP_FROLL_B:
00665         case BOTH_GETUP_FROLL_F:
00666                 return qtrue;
00667                 break;
00668         }
00669         return qfalse;
00670 }

qboolean BG_KickMove int  move  ) 
 

Definition at line 380 of file bg_panimate.c.

References LS_HILT_BASH, LS_KICK_B, LS_KICK_B_AIR, LS_KICK_BF, LS_KICK_F, LS_KICK_F_AIR, LS_KICK_L, LS_KICK_L_AIR, LS_KICK_R, LS_KICK_R_AIR, LS_KICK_RL, LS_KICK_S, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove(), and PmoveSingle().

00381 {
00382         switch( move )
00383         {
00384         case LS_KICK_F:
00385         case LS_KICK_B:
00386         case LS_KICK_R:
00387         case LS_KICK_L:
00388         case LS_KICK_S:
00389         case LS_KICK_BF:
00390         case LS_KICK_RL:
00391         case LS_KICK_F_AIR:
00392         case LS_KICK_B_AIR:
00393         case LS_KICK_R_AIR:
00394         case LS_KICK_L_AIR:
00395         case LS_HILT_BASH:
00396                 return qtrue;
00397         }
00398         return qfalse;
00399 }

int BG_KnockawayForParry int  move  ) 
 

Definition at line 763 of file bg_panimate.c.

References BLOCKED_LOWER_LEFT, BLOCKED_LOWER_RIGHT, BLOCKED_TOP, BLOCKED_UPPER_LEFT, BLOCKED_UPPER_RIGHT, LS_K1_BL, LS_K1_BR, LS_K1_T_, LS_K1_TL, and LS_K1_TR.

00764 {
00765         //FIXME: need actual anims for this
00766         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00767         switch ( move )
00768         {
00769         case BLOCKED_TOP://LS_PARRY_UP:
00770                 return LS_K1_T_;//push up
00771                 break;
00772         case BLOCKED_UPPER_RIGHT://LS_PARRY_UR:
00773         default://case LS_READY:
00774                 return LS_K1_TR;//push up, slightly to right
00775                 break;
00776         case BLOCKED_UPPER_LEFT://LS_PARRY_UL:
00777                 return LS_K1_TL;//push up and to left
00778                 break;
00779         case BLOCKED_LOWER_RIGHT://LS_PARRY_LR:
00780                 return LS_K1_BR;//push down and to left
00781                 break;
00782         case BLOCKED_LOWER_LEFT://LS_PARRY_LL:
00783                 return LS_K1_BL;//push down and to right
00784                 break;
00785         }
00786         //return LS_NONE;
00787 }

qboolean BG_KnockDownable playerState_t ps  ) 
 

Definition at line 218 of file bg_pmove.c.

References playerState_s::emplacedIndex, playerState_s::m_iVehicleNum, playerState_t, qboolean, qfalse, and qtrue.

Referenced by ClientCommand(), ClientThink_real(), ForceThrow(), G_Knockdown(), PM_SaberLockBreak(), PM_VehicleImpact(), and Wampa_Slash().

00219 {
00220         if (!ps)
00221         { //just for safety
00222                 return qfalse;
00223         }
00224 
00225         if (ps->m_iVehicleNum)
00226         { //riding a vehicle, don't knock me down
00227                 return qfalse;
00228         }
00229 
00230         if (ps->emplacedIndex)
00231         { //using emplaced gun or eweb, can't be knocked down
00232                 return qfalse;
00233         }
00234 
00235         //ok, I guess?
00236         return qtrue;
00237 }

qboolean BG_LegalizedForcePowers char *  powerOut,
int  maxRank,
qboolean  freeSaber,
int  teamForce,
int  gametype,
int  fpDisabled
 

Definition at line 439 of file bg_misc.c.

References atoi(), bgForcePowerCost, FORCE_DARKSIDE, FORCE_LEVEL_3, FORCE_LIGHTSIDE, forceMasteryPoints, forcePowerDarkLight, FP_LEVITATION, FP_SABER_DEFENSE, FP_SABER_OFFENSE, FP_SABERTHROW, FP_TEAM_FORCE, FP_TEAM_HEAL, GT_TEAM, NUM_FORCE_POWERS, Q_strcat(), qboolean, qfalse, qtrue, strcpy(), strlen(), and va().

Referenced by UI_ForceConfigHandle(), UI_ReadLegalForce(), and WP_InitForcePowers().

00440 {
00441         char powerBuf[128];
00442         char readBuf[128];
00443         qboolean maintainsValidity = qtrue;
00444         int powerLen = strlen(powerOut);
00445         int i = 0;
00446         int c = 0;
00447         int allowedPoints = 0;
00448         int usedPoints = 0;
00449         int countDown = 0;
00450         
00451         int final_Side;
00452         int final_Powers[NUM_FORCE_POWERS];
00453 
00454         if (powerLen >= 128)
00455         { //This should not happen. If it does, this is obviously a bogus string.
00456                 //They can have this string. Because I said so.
00457                 strcpy(powerBuf, "7-1-032330000000001333");
00458                 maintainsValidity = qfalse;
00459         }
00460         else
00461         {
00462                 strcpy(powerBuf, powerOut); //copy it as the original
00463         }
00464 
00465         //first of all, print the max rank into the string as the rank
00466         strcpy(powerOut, va("%i-", maxRank));
00467 
00468         while (i < 128 && powerBuf[i] && powerBuf[i] != '-')
00469         {
00470                 i++;
00471         }
00472         i++;
00473         while (i < 128 && powerBuf[i] && powerBuf[i] != '-')
00474         {
00475                 readBuf[c] = powerBuf[i];
00476                 c++;
00477                 i++;
00478         }
00479         readBuf[c] = 0;
00480         i++;
00481         //at this point, readBuf contains the intended side
00482         final_Side = atoi(readBuf);
00483 
00484         if (final_Side != FORCE_LIGHTSIDE &&
00485                 final_Side != FORCE_DARKSIDE)
00486         { //Not a valid side. You will be dark. Because I said so. (this is something that should never actually happen unless you purposely feed in an invalid config)
00487                 final_Side = FORCE_DARKSIDE;
00488                 maintainsValidity = qfalse;
00489         }
00490 
00491         if (teamForce)
00492         { //If we are under force-aligned teams, make sure we're on the right side.
00493                 if (final_Side != teamForce)
00494                 {
00495                         final_Side = teamForce;
00496                         //maintainsValidity = qfalse;
00497                         //Not doing this, for now. Let them join the team with their filtered powers.
00498                 }
00499         }
00500 
00501         //Now we have established a valid rank, and a valid side.
00502         //Read the force powers in, and cut them down based on the various rules supplied.
00503         c = 0;
00504         while (i < 128 && powerBuf[i] && powerBuf[i] != '\n' && c < NUM_FORCE_POWERS)
00505         {
00506                 readBuf[0] = powerBuf[i];
00507                 readBuf[1] = 0;
00508                 final_Powers[c] = atoi(readBuf);
00509                 c++;
00510                 i++;
00511         }
00512 
00513         //final_Powers now contains all the stuff from the string
00514         //Set the maximum allowed points used based on the max rank level, and count the points actually used.
00515         allowedPoints = forceMasteryPoints[maxRank];
00516 
00517         i = 0;
00518         while (i < NUM_FORCE_POWERS)
00519         { //if this power doesn't match the side we're on, then 0 it now.
00520                 if (final_Powers[i] &&
00521                         forcePowerDarkLight[i] &&
00522                         forcePowerDarkLight[i] != final_Side)
00523                 {
00524                         final_Powers[i] = 0;
00525                         //This is only likely to happen with g_forceBasedTeams. Let it slide.
00526                 }
00527 
00528                 if ( final_Powers[i] &&
00529                         (fpDisabled & (1 << i)) )
00530                 { //if this power is disabled on the server via said server option, then we don't get it.
00531                         final_Powers[i] = 0;
00532                 }
00533 
00534                 i++;
00535         }
00536 
00537         if (gametype < GT_TEAM)
00538         { //don't bother with team powers then
00539                 final_Powers[FP_TEAM_HEAL] = 0;
00540                 final_Powers[FP_TEAM_FORCE] = 0;
00541         }
00542 
00543         usedPoints = 0;
00544         i = 0;
00545         while (i < NUM_FORCE_POWERS)
00546         {
00547                 countDown = 0;
00548 
00549                 countDown = final_Powers[i];
00550 
00551                 while (countDown > 0)
00552                 {
00553                         usedPoints += bgForcePowerCost[i][countDown]; //[fp index][fp level]
00554                         //if this is jump, or we have a free saber and it's offense or defense, take the level back down on level 1
00555                         if ( countDown == 1 &&
00556                                 ((i == FP_LEVITATION) ||
00557                                  (i == FP_SABER_OFFENSE && freeSaber) ||
00558                                  (i == FP_SABER_DEFENSE && freeSaber)) )
00559                         {
00560                                 usedPoints -= bgForcePowerCost[i][countDown];
00561                         }
00562                         countDown--;
00563                 }
00564 
00565                 i++;
00566         }
00567 
00568         if (usedPoints > allowedPoints)
00569         { //Time to do the fancy stuff. (meaning, slowly cut parts off while taking a guess at what is most or least important in the config)
00570                 int attemptedCycles = 0;
00571                 int powerCycle = 2;
00572                 int minPow = 0;
00573                 
00574                 if (freeSaber)
00575                 {
00576                         minPow = 1;
00577                 }
00578 
00579                 maintainsValidity = qfalse;
00580 
00581                 while (usedPoints > allowedPoints)
00582                 {
00583                         c = 0;
00584 
00585                         while (c < NUM_FORCE_POWERS && usedPoints > allowedPoints)
00586                         {
00587                                 if (final_Powers[c] && final_Powers[c] < powerCycle)
00588                                 { //kill in order of lowest powers, because the higher powers are probably more important
00589                                         if (c == FP_SABER_OFFENSE &&
00590                                                 (final_Powers[FP_SABER_DEFENSE] > minPow || final_Powers[FP_SABERTHROW] > 0))
00591                                         { //if we're on saber attack, only suck it down if we have no def or throw either
00592                                                 int whichOne = FP_SABERTHROW; //first try throw
00593 
00594                                                 if (!final_Powers[whichOne])
00595                                                 {
00596                                                         whichOne = FP_SABER_DEFENSE; //if no throw, drain defense
00597                                                 }
00598 
00599                                                 while (final_Powers[whichOne] > 0 && usedPoints > allowedPoints)
00600                                                 {
00601                                                         if ( final_Powers[whichOne] > 1 ||
00602                                                                 ( (whichOne != FP_SABER_OFFENSE || !freeSaber) &&
00603                                                                   (whichOne != FP_SABER_DEFENSE || !freeSaber) ) )
00604                                                         { //don't take attack or defend down on level 1 still, if it's free
00605                                                                 usedPoints -= bgForcePowerCost[whichOne][final_Powers[whichOne]];
00606                                                                 final_Powers[whichOne]--;
00607                                                         }
00608                                                         else
00609                                                         {
00610                                                                 break;
00611                                                         }
00612                                                 }
00613                                         }
00614                                         else
00615                                         {
00616                                                 while (final_Powers[c] > 0 && usedPoints > allowedPoints)
00617                                                 {
00618                                                         if ( final_Powers[c] > 1 ||
00619                                                                 ((c != FP_LEVITATION) &&
00620                                                                 (c != FP_SABER_OFFENSE || !freeSaber) &&
00621                                                                 (c != FP_SABER_DEFENSE || !freeSaber)) )
00622                                                         {
00623                                                                 usedPoints -= bgForcePowerCost[c][final_Powers[c]];
00624                                                                 final_Powers[c]--;
00625                                                         }
00626                                                         else
00627                                                         {
00628                                                                 break;
00629                                                         }
00630                                                 }
00631                                         }
00632                                 }
00633 
00634                                 c++;
00635                         }
00636 
00637                         powerCycle++;
00638                         attemptedCycles++;
00639 
00640                         if (attemptedCycles > NUM_FORCE_POWERS)
00641                         { //I think this should be impossible. But just in case.
00642                                 break;
00643                         }
00644                 }
00645 
00646                 if (usedPoints > allowedPoints)
00647                 { //Still? Fine then.. we will kill all of your powers, except the freebies.
00648                         i = 0;
00649 
00650                         while (i < NUM_FORCE_POWERS)
00651                         {
00652                                 final_Powers[i] = 0;
00653                                 if (i == FP_LEVITATION ||
00654                                         (i == FP_SABER_OFFENSE && freeSaber) ||
00655                                         (i == FP_SABER_DEFENSE && freeSaber))
00656                                 {
00657                                         final_Powers[i] = 1;
00658                                 }
00659                                 i++;
00660                         }
00661                         usedPoints = 0;
00662                 }
00663         }
00664 
00665         if (freeSaber)
00666         {
00667                 if (final_Powers[FP_SABER_OFFENSE] < 1)
00668                 {
00669                         final_Powers[FP_SABER_OFFENSE] = 1;
00670                 }
00671                 if (final_Powers[FP_SABER_DEFENSE] < 1)
00672                 {
00673                         final_Powers[FP_SABER_DEFENSE] = 1;
00674                 }
00675         }
00676         if (final_Powers[FP_LEVITATION] < 1)
00677         {
00678                 final_Powers[FP_LEVITATION] = 1;
00679         }
00680 
00681         i = 0;
00682         while (i < NUM_FORCE_POWERS)
00683         {
00684                 if (final_Powers[i] > FORCE_LEVEL_3)
00685                 {
00686                         final_Powers[i] = FORCE_LEVEL_3;
00687                 }
00688                 i++;
00689         }
00690 
00691         if (fpDisabled)
00692         { //If we specifically have attack or def disabled, force them up to level 3. It's the way
00693           //things work for the case of all powers disabled.
00694           //If jump is disabled, down-cap it to level 1. Otherwise don't do a thing.
00695                 if (fpDisabled & (1 << FP_LEVITATION))
00696                 {
00697                         final_Powers[FP_LEVITATION] = 1;
00698                 }
00699                 if (fpDisabled & (1 << FP_SABER_OFFENSE))
00700                 {
00701                         final_Powers[FP_SABER_OFFENSE] = 3;
00702                 }
00703                 if (fpDisabled & (1 << FP_SABER_DEFENSE))
00704                 {
00705                         final_Powers[FP_SABER_DEFENSE] = 3;
00706                 }
00707         }
00708 
00709         if (final_Powers[FP_SABER_OFFENSE] < 1)
00710         {
00711                 final_Powers[FP_SABER_DEFENSE] = 0;
00712                 final_Powers[FP_SABERTHROW] = 0;
00713         }
00714 
00715         //We finally have all the force powers legalized and stored locally.
00716         //Put them all into the string and return the result. We already have
00717         //the rank there, so print the side and the powers now.
00718         Q_strcat(powerOut, 128, va("%i-", final_Side));
00719 
00720         i = strlen(powerOut);
00721         c = 0;
00722         while (c < NUM_FORCE_POWERS)
00723         {
00724                 strcpy(readBuf, va("%i", final_Powers[c]));
00725                 powerOut[i] = readBuf[0];
00726                 c++;
00727                 i++;
00728         }
00729         powerOut[i] = 0;
00730 
00731         return maintainsValidity;
00732 }

qboolean BG_OutOfMemory void   ) 
 

Definition at line 3392 of file bg_misc.c.

References MAX_POOL_SIZE, and qboolean.

03393 {
03394         return bg_poolSize >= MAX_POOL_SIZE;
03395 }

int BG_ParseAnimationEvtFile const char *  as_filename,
int  animFileIndex,
int  eventFileIndex
 

Definition at line 2169 of file bg_panimate.c.

References AED_ARRAY_SIZE, AEV_NONE, animation_t, animevent_t, bgLoadedAnim_t::anims, bgAllAnims, bgAllEvents, bgNumAnimEvents, Com_Error(), COM_Parse(), Com_Printf(), Com_sprintf(), ERR_DROP, animevent_s::eventData, bgLoadedEvents_t::eventsParsed, animevent_s::eventType, fileHandle_t, FS_READ, animevent_s::keyFrame, bgLoadedEvents_t::legsAnimEvents, MAX_ANIM_EVENTS, MAX_ANIM_FILES, MAX_QPATH, NULL, ParseAnimationEvtBlock(), Q_stricmp(), qtrue, strcpy(), animevent_s::stringData, bgLoadedEvents_t::torsoAnimEvents, trap_FS_FCloseFile(), trap_FS_FOpenFile(), trap_FS_Read(), and va().

Referenced by CG_CacheG2AnimInfo(), CG_G2AnimEntModelLoad(), and CG_G2EvIndexForModel().

02170 {
02171         const char      *text_p;
02172         int                     len;
02173         const char      *token;
02174         char            text[80000];
02175         char            sfilename[MAX_QPATH];
02176         fileHandle_t    f;
02177         int                     i, j, upper_i, lower_i;
02178         int                             usedIndex = -1;
02179         animevent_t     *legsAnimEvents;
02180         animevent_t     *torsoAnimEvents;
02181         animation_t             *animations;
02182         int                             forcedIndex;
02183         
02184         assert(animFileIndex < MAX_ANIM_FILES);
02185         assert(eventFileIndex < MAX_ANIM_FILES);
02186 
02187         if (eventFileIndex == -1)
02188         {
02189                 forcedIndex = 0;
02190         }
02191         else
02192         {
02193                 forcedIndex = eventFileIndex;
02194         }
02195 
02196         if (bg_animParseIncluding <= 0)
02197         { //if we should be parsing an included file, skip this part
02198                 if ( bgAllEvents[forcedIndex].eventsParsed )
02199                 {//already cached this one
02200                         return forcedIndex;
02201                 }
02202         }
02203 
02204         legsAnimEvents = bgAllEvents[forcedIndex].legsAnimEvents;
02205         torsoAnimEvents = bgAllEvents[forcedIndex].torsoAnimEvents;
02206         animations = bgAllAnims[animFileIndex].anims;
02207 
02208         if (bg_animParseIncluding <= 0)
02209         { //if we should be parsing an included file, skip this part
02210                 //Go through and see if this filename is already in the table.
02211                 i = 0;
02212                 while (i < bgNumAnimEvents && forcedIndex != 0)
02213                 {
02214                         if (!Q_stricmp(as_filename, bgAllEvents[i].filename))
02215                         { //looks like we have it already.
02216                                 return i;
02217                         }
02218                         i++;
02219                 }
02220         }
02221 
02222         // Load and parse animevents.cfg file
02223         Com_sprintf( sfilename, sizeof( sfilename ), "%sanimevents.cfg", as_filename );
02224 
02225         if (bg_animParseIncluding <= 0)
02226         { //should already be done if we're including
02227                 //initialize anim event array
02228                 for( i = 0; i < MAX_ANIM_EVENTS; i++ )
02229                 {
02230                         //Type of event
02231                         torsoAnimEvents[i].eventType = AEV_NONE;
02232                         legsAnimEvents[i].eventType = AEV_NONE;
02233                         //Frame to play event on
02234                         torsoAnimEvents[i].keyFrame = -1;       
02235                         legsAnimEvents[i].keyFrame = -1;
02236                         //we allow storage of one string, temporarily (in case we have to look up an index later, then make sure to set stringData to NULL so we only do the look-up once)
02237                         torsoAnimEvents[i].stringData = NULL;
02238                         legsAnimEvents[i].stringData = NULL;
02239                         //Unique IDs, can be soundIndex of sound file to play OR effect index or footstep type, etc.
02240                         for ( j = 0; j < AED_ARRAY_SIZE; j++ )
02241                         {
02242                                 torsoAnimEvents[i].eventData[j] = -1;
02243                                 legsAnimEvents[i].eventData[j] = -1;
02244                         }
02245                 }
02246         }
02247 
02248         // load the file
02249         len = trap_FS_FOpenFile( sfilename, &f, FS_READ );
02250         if ( len <= 0 ) 
02251         {//no file
02252                 goto fin;
02253         }
02254         if ( len >= sizeof( text ) - 1 ) 
02255         {
02256                 trap_FS_FCloseFile(f);
02257 #ifndef FINAL_BUILD
02258                 Com_Error(ERR_DROP, "File %s too long\n", sfilename );
02259 #else
02260                 Com_Printf( "File %s too long\n", sfilename );
02261 #endif
02262                 goto fin;
02263         }
02264 
02265         trap_FS_Read( text, len, f );
02266         text[len] = 0;
02267         trap_FS_FCloseFile( f );
02268 
02269         // parse the text
02270         text_p = text;
02271         upper_i =0;
02272         lower_i =0;
02273 
02274         // read information for batches of sounds (UPPER or LOWER)
02275         while ( 1 ) 
02276         {
02277                 // Get base frame of sequence
02278                 token = COM_Parse( &text_p );
02279                 if ( !token || !token[0] ) 
02280                 {
02281                         break;
02282                 }
02283 
02284                 if ( !Q_stricmp(token,"include") )      // grab from another animevents.cfg
02285                 {//NOTE: you REALLY should NOT do this after the main block of UPPERSOUNDS and LOWERSOUNDS
02286                         const char      *include_filename = COM_Parse( &text_p );
02287                         if ( include_filename != NULL )
02288                         {
02289                                 char fullIPath[MAX_QPATH];
02290                                 strcpy(fullIPath, va("models/players/%s/", include_filename));
02291                                 bg_animParseIncluding++;
02292                                 BG_ParseAnimationEvtFile( fullIPath, animFileIndex, forcedIndex );
02293                                 bg_animParseIncluding--;
02294                         }
02295                 }
02296 
02297                 if ( !Q_stricmp(token,"UPPEREVENTS") )  // A batch of upper sounds
02298                 {
02299                         ParseAnimationEvtBlock( as_filename, torsoAnimEvents, animations, &upper_i, &text_p ); 
02300                 }
02301 
02302                 else if ( !Q_stricmp(token,"LOWEREVENTS") )     // A batch of lower sounds
02303                 {
02304                         ParseAnimationEvtBlock( as_filename, legsAnimEvents, animations, &lower_i, &text_p ); 
02305                 }
02306         }
02307 
02308         usedIndex = forcedIndex;
02309 fin:
02310         //Mark this anim set so that we know we tried to load he sounds, don't care if the load failed
02311         if (bg_animParseIncluding <= 0)
02312         { //if we should be parsing an included file, skip this part
02313                 bgAllEvents[forcedIndex].eventsParsed = qtrue;
02314                 strcpy(bgAllEvents[forcedIndex].filename, as_filename);
02315                 if (forcedIndex)
02316                 {
02317                         bgNumAnimEvents++;
02318                 }
02319         }
02320 
02321         return usedIndex;
02322 }

int BG_ParseAnimationFile const char *  filename,
animation_t animSet,
qboolean  isHumanoid
 

Definition at line 2334 of file bg_panimate.c.

References animation_t, bgLoadedAnim_t::anims, animTable, atof(), atoi(), BG_AnimsetAlloc(), BG_AnimsetFree(), bgAllAnims, bgHumanoidAnimations, bgNumAllAnims, BGPAFtextLoaded, ceil(), Com_Error(), COM_Parse(), COM_ParseExt(), Com_Printf(), ERR_DROP, fileHandle_t, animation_s::firstFrame, floor(), animation_s::frameLerp, FS_READ, GetIDForString(), animation_s::loopFrames, MAX_ANIMATIONS, animation_s::numFrames, Q_stricmp(), qboolean, qfalse, qtrue, S_COLOR_RED, strcpy(), strstr(), trap_FS_FCloseFile(), trap_FS_FOpenFile(), and trap_FS_Read().

Referenced by CG_CacheG2AnimInfo(), CG_G2AnimEntModelLoad(), CG_G2SkelForModel(), G_ParseAnimFileSet(), NPC_VehiclePrecache(), SetupGameGhoul2Model(), SP_worldspawn(), and UI_ParseAnimationFile().

02335 {
02336         char            *text_p;
02337         int                     len;
02338         int                     i;
02339         char            *token;
02340         float           fps;
02341         int                     skip;
02342         int                     usedIndex = -1;
02343         int                     nextIndex = bgNumAllAnims;
02344         qboolean        dynAlloc = qfalse;
02345         qboolean        wasLoaded = qfalse;
02346 #ifndef Q3_VM
02347         char            BGPAFtext[60000];
02348 #endif
02349 
02350         fileHandle_t    f;
02351         int                             animNum;
02352 
02353         if (!isHumanoid)
02354         {
02355                 i = 0;
02356                 while (i < bgNumAllAnims)
02357                 { //see if it's been loaded already
02358                         if (!Q_stricmp(bgAllAnims[i].filename, filename))
02359                         {
02360                                 animset = bgAllAnims[i].anims;
02361                                 return i; //alright, we already have it.
02362                         }
02363                         i++;
02364                 }
02365 
02366                 //Looks like it has not yet been loaded. Allocate space for the anim set if we need to, and continue along.
02367                 if (!animset)
02368                 {
02369                         if (strstr(filename, "players/_humanoid/"))
02370                         { //then use the static humanoid set.
02371                                 animset = bgHumanoidAnimations;
02372                                 nextIndex = 0;
02373                         }
02374                         else if (strstr(filename, "players/rockettrooper/"))
02375                         { //rockettrooper always index 1
02376                                 nextIndex = 1;
02377                                 animset = BG_AnimsetAlloc();
02378                                 dynAlloc = qtrue; //so we know to free this memory in case we have to return early. Don't want any leaks.
02379 
02380                                 if (!animset)
02381                                 {
02382                                         assert(!"Anim set alloc failed!");
02383                                         return -1;
02384                                 }
02385                         }
02386                         else
02387                         {
02388                                 animset = BG_AnimsetAlloc();
02389                                 dynAlloc = qtrue; //so we know to free this memory in case we have to return early. Don't want any leaks.
02390 
02391                                 if (!animset)
02392                                 {
02393                                         assert(!"Anim set alloc failed!");
02394                                         return -1;
02395                                 }
02396                         }
02397                 }
02398         }
02399 #ifdef _DEBUG
02400         else
02401         {
02402                 assert(animset);
02403         }
02404 #endif
02405 
02406         // load the file
02407         if (!BGPAFtextLoaded || !isHumanoid)
02408         { //rww - We are always using the same animation config now. So only load it once.
02409                 len = trap_FS_FOpenFile( filename, &f, FS_READ );
02410                 if ( (len <= 0) || (len >= sizeof( BGPAFtext ) - 1) ) 
02411                 {
02412                         if (dynAlloc)
02413                         {
02414                                 BG_AnimsetFree(animset);
02415                         }
02416                         if (len > 0)
02417                         {
02418                                 Com_Error(ERR_DROP, "%s exceeds the allowed game-side animation buffer!", filename);
02419                         }
02420                         return -1;
02421                 }
02422 
02423                 trap_FS_Read( BGPAFtext, len, f );
02424                 BGPAFtext[len] = 0;
02425                 trap_FS_FCloseFile( f );
02426         }
02427         else
02428         {
02429                 if (dynAlloc)
02430                 {
02431                         assert(!"Should not have allocated dynamically for humanoid");
02432                         BG_AnimsetFree(animset);
02433                 }
02434                 return 0; //humanoid index
02435         }
02436 
02437         // parse the text
02438         text_p = BGPAFtext;
02439         skip = 0;       // quiet the compiler warning
02440 
02441         //FIXME: have some way of playing anims backwards... negative numFrames?
02442 
02443         //initialize anim array so that from 0 to MAX_ANIMATIONS, set default values of 0 1 0 100
02444         for(i = 0; i < MAX_ANIMATIONS; i++)
02445         {
02446                 animset[i].firstFrame = 0;
02447                 animset[i].numFrames = 0;
02448                 animset[i].loopFrames = -1;
02449                 animset[i].frameLerp = 100;
02450         }
02451 
02452         // read information for each frame
02453         while(1) 
02454         {
02455                 token = COM_Parse( (const char **)(&text_p) );
02456 
02457                 if ( !token || !token[0]) 
02458                 {
02459                         break;
02460                 }
02461 
02462                 animNum = GetIDForString(animTable, token);
02463                 if(animNum == -1)
02464                 {
02465 //#ifndef FINAL_BUILD
02466 #ifdef _DEBUG
02467                         Com_Printf(S_COLOR_RED"WARNING: Unknown token %s in %s\n", token, filename);
02468                         while (token[0])
02469                         {
02470                                 token = COM_ParseExt( (const char **) &text_p, qfalse );        //returns empty string when next token is EOL
02471                         }
02472 #endif
02473                         continue;
02474                 }
02475 
02476                 token = COM_Parse( (const char **)(&text_p) );
02477                 if ( !token ) 
02478                 {
02479                         break;
02480                 }
02481                 animset[animNum].firstFrame = atoi( token );
02482 
02483                 token = COM_Parse( (const char **)(&text_p) );
02484                 if ( !token ) 
02485                 {
02486                         break;
02487                 }
02488                 animset[animNum].numFrames = atoi( token );
02489 
02490                 token = COM_Parse( (const char **)(&text_p) );
02491                 if ( !token ) 
02492                 {
02493                         break;
02494                 }
02495                 animset[animNum].loopFrames = atoi( token );
02496 
02497                 token = COM_Parse( (const char **)(&text_p) );
02498                 if ( !token ) 
02499                 {
02500                         break;
02501                 }
02502                 fps = atof( token );
02503                 if ( fps == 0 ) 
02504                 {
02505                         fps = 1;//Don't allow divide by zero error
02506                 }
02507                 if ( fps < 0 )
02508                 {//backwards
02509                         animset[animNum].frameLerp = floor(1000.0f / fps);
02510                 }
02511                 else
02512                 {
02513                         animset[animNum].frameLerp = ceil(1000.0f / fps);
02514                 }
02515         }
02516 /*
02517 #ifdef _DEBUG
02518         //Check the array, and print the ones that have nothing in them.
02519         for(i = 0; i < MAX_ANIMATIONS; i++)
02520         {       
02521                 if (animTable[i].name != NULL)          // This animation reference exists.
02522                 {
02523                         if (animset[i].firstFrame <= 0 && animset[i].numFrames <=0)
02524                         {       // This is an empty animation reference.
02525                                 Com_Printf("***ANIMTABLE reference #%d (%s) is empty!\n", i, animTable[i].name);
02526                         }
02527                 }
02528         }
02529 #endif // _DEBUG
02530 */
02531 #ifdef CONVENIENT_ANIMATION_FILE_DEBUG_THING
02532         SpewDebugStuffToFile();
02533 #endif
02534 
02535         wasLoaded = BGPAFtextLoaded;
02536 
02537         if (isHumanoid)
02538         {
02539                 bgAllAnims[0].anims = animset;
02540                 strcpy(bgAllAnims[0].filename, filename);
02541                 BGPAFtextLoaded = qtrue;
02542 
02543                 usedIndex = 0;
02544         }
02545         else
02546         {
02547                 bgAllAnims[nextIndex].anims = animset;
02548                 strcpy(bgAllAnims[nextIndex].filename, filename);
02549 
02550                 usedIndex = bgNumAllAnims;
02551 
02552                 if (nextIndex > 1)
02553                 { //don't bother increasing the number if this ended up as a humanoid/rockettrooper load.
02554                         bgNumAllAnims++;
02555                 }
02556                 else
02557                 {
02558                         BGPAFtextLoaded = qtrue;
02559                         usedIndex = nextIndex;
02560                 }
02561         }
02562 
02563         /*
02564         if (!wasLoaded && BGPAFtextLoaded)
02565         { //just loaded humanoid skel - we always want the rockettrooper to be after it, in slot 1
02566 #ifdef _DEBUG
02567                 assert(BG_ParseAnimationFile("models/players/rockettrooper/animation.cfg", NULL, qfalse) == 1);
02568 #else
02569                 BG_ParseAnimationFile("models/players/rockettrooper/animation.cfg", NULL, qfalse);
02570 #endif
02571         }
02572         */
02573 
02574         return usedIndex;
02575 }

int BG_PickAnim int  animIndex,
int  minAnim,
int  maxAnim
 

Definition at line 2952 of file bg_panimate.c.

References BG_HasAnimation(), and Q_irand().

Referenced by G_PickDeathAnim(), and NPC_ChoosePainAnimation().

02953 {
02954         int anim;
02955         int count = 0;
02956 
02957         do
02958         {
02959                 anim = Q_irand(minAnim, maxAnim);
02960                 count++;
02961         }
02962         while ( !BG_HasAnimation( animIndex, anim ) && count < 1000 );
02963 
02964         if (count == 1000)
02965         { //guess we just don't have a death anim then.
02966                 return -1;
02967         }
02968 
02969         return anim;
02970 }

void BG_PlayerStateToEntityState playerState_t ps,
entityState_t s,
qboolean  snap
 

Definition at line 2887 of file bg_misc.c.

References playerState_s::activeForcePass, entityState_s::activeForcePass, entityState_s::angles2, entityState_s::apos, entityState_s::bolt1, playerState_s::brokenLimbs, entityState_s::brokenLimbs, entityState_s::clientNum, playerState_s::clientNum, entityState_s::constantLight, playerState_s::customRGBA, entityState_s::customRGBA, playerState_s::duelInProgress, EF_DEAD, EF_SEEKERDRONE, playerState_s::eFlags, entityState_s::eFlags, playerState_s::eFlags2, entityState_s::eFlags2, playerState_s::electrifyTime, playerState_s::emplacedIndex, entityState_s::emplacedOwner, playerState_s::entityEventSequence, entityState_t, ET_INVISIBLE, ET_PLAYER, 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::fd, entityState_s::fireflag, entityState_s::forceFrame, forcedata_s::forceMindtrickTargetIndex, forcedata_s::forceMindtrickTargetIndex2, forcedata_s::forceMindtrickTargetIndex3, forcedata_s::forceMindtrickTargetIndex4, forcedata_s::forcePowersActive, entityState_s::forcePowersActive, playerState_s::generic1, entityState_s::generic1, playerState_s::genericEnemyIndex, entityState_s::genericenemyindex, GIB_HEALTH, playerState_s::groundEntityNum, entityState_s::groundEntityNum, playerState_s::hasLookTarget, entityState_s::hasLookTarget, playerState_s::heldByClient, entityState_s::heldByClient, playerState_s::holocronBits, playerState_s::iModelScale, entityState_s::iModelScale, playerState_s::isJediMaster, entityState_s::isJediMaster, playerState_s::lastHitLoc, playerState_s::legsAnim, entityState_s::legsAnim, playerState_s::legsFlip, entityState_s::legsFlip, playerState_s::lookTarget, entityState_s::lookTarget, playerState_s::loopSound, entityState_s::loopSound, playerState_s::m_iVehicleNum, entityState_s::m_iVehicleNum, MAX_POWERUPS, MAX_PS_EVENTS, entityState_s::modelindex2, playerState_s::movementDir, entityState_s::number, playerState_s::origin, entityState_s::origin2, entityState_s::otherEntityNum2, playerState_t, PM_INTERMISSION, PM_SPECTATOR, playerState_s::pm_type, entityState_s::pos, playerState_s::powerups, entityState_s::powerups, playerState_s::ragAttach, entityState_s::ragAttach, forcedata_s::saberAnimLevel, playerState_s::saberEntityNum, entityState_s::saberEntityNum, playerState_s::saberHolstered, entityState_s::saberHolstered, playerState_s::saberInFlight, entityState_s::saberInFlight, playerState_s::saberLockFrame, playerState_s::saberMove, entityState_s::saberMove, playerState_s::speed, entityState_s::speed, STAT_HEALTH, playerState_s::stats, entityState_s::time2, playerState_s::torsoAnim, entityState_s::torsoAnim, playerState_s::torsoFlip, entityState_s::torsoFlip, TR_INTERPOLATE, trajectory_t::trBase, trajectory_t::trDelta, entityState_s::trickedentindex, entityState_s::trickedentindex2, entityState_s::trickedentindex3, entityState_s::trickedentindex4, trajectory_t::trType, VectorCopy, playerState_s::velocity, playerState_s::viewangles, playerState_s::weapon, entityState_s::weapon, playerState_s::weaponChargeTime, playerState_s::weaponstate, and YAW.

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

02887                                                                                        {
02888         int             i;
02889 
02890         if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) {
02891                 s->eType = ET_INVISIBLE;
02892         } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) {
02893                 s->eType = ET_INVISIBLE;
02894         } else {
02895                 s->eType = ET_PLAYER;
02896         }
02897 
02898         s->number = ps->clientNum;
02899 
02900         s->pos.trType = TR_INTERPOLATE;
02901         VectorCopy( ps->origin, s->pos.trBase );
02902         if ( snap ) {
02903                 SnapVector( s->pos.trBase );
02904         }
02905         // set the trDelta for flag direction
02906         VectorCopy( ps->velocity, s->pos.trDelta );
02907 
02908         s->apos.trType = TR_INTERPOLATE;
02909         VectorCopy( ps->viewangles, s->apos.trBase );
02910         if ( snap ) {
02911                 SnapVector( s->apos.trBase );
02912         }
02913 
02914         s->trickedentindex = ps->fd.forceMindtrickTargetIndex;
02915         s->trickedentindex2 = ps->fd.forceMindtrickTargetIndex2;
02916         s->trickedentindex3 = ps->fd.forceMindtrickTargetIndex3;
02917         s->trickedentindex4 = ps->fd.forceMindtrickTargetIndex4;
02918 
02919         s->forceFrame = ps->saberLockFrame;
02920 
02921         s->emplacedOwner = ps->electrifyTime;
02922 
02923         s->speed = ps->speed;
02924 
02925         s->genericenemyindex = ps->genericEnemyIndex;
02926 
02927         s->activeForcePass = ps->activeForcePass;
02928 
02929         s->angles2[YAW] = ps->movementDir;
02930         s->legsAnim = ps->legsAnim;
02931         s->torsoAnim = ps->torsoAnim;
02932 
02933         s->legsFlip = ps->legsFlip;
02934         s->torsoFlip = ps->torsoFlip;
02935 
02936         s->clientNum = ps->clientNum;           // ET_PLAYER looks here instead of at number
02937                                                                                 // so corpses can also reference the proper config
02938         s->eFlags = ps->eFlags;
02939         s->eFlags2 = ps->eFlags2;
02940 
02941         s->saberInFlight = ps->saberInFlight;
02942         s->saberEntityNum = ps->saberEntityNum;
02943         s->saberMove = ps->saberMove;
02944         s->forcePowersActive = ps->fd.forcePowersActive;
02945 
02946         if (ps->duelInProgress)
02947         {
02948                 s->bolt1 = 1;
02949         }
02950         else
02951         {
02952                 s->bolt1 = 0;
02953         }
02954 
02955         s->otherEntityNum2 = ps->emplacedIndex;
02956 
02957         s->saberHolstered = ps->saberHolstered;
02958 
02959         if (ps->genericEnemyIndex != -1)
02960         {
02961                 s->eFlags |= EF_SEEKERDRONE;
02962         }
02963 
02964         if ( ps->stats[STAT_HEALTH] <= 0 ) {
02965                 s->eFlags |= EF_DEAD;
02966         } else {
02967                 s->eFlags &= ~EF_DEAD;
02968         }
02969 
02970         if ( ps->externalEvent ) {
02971                 s->event = ps->externalEvent;
02972                 s->eventParm = ps->externalEventParm;
02973         } else if ( ps->entityEventSequence < ps->eventSequence ) {
02974                 int             seq;
02975 
02976                 if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) {
02977                         ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS;
02978                 }
02979                 seq = ps->entityEventSequence & (MAX_PS_EVENTS-1);
02980                 s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 );
02981                 s->eventParm = ps->eventParms[ seq ];
02982                 ps->entityEventSequence++;
02983         }
02984 
02985 
02986         s->weapon = ps->weapon;
02987         s->groundEntityNum = ps->groundEntityNum;
02988 
02989         s->powerups = 0;
02990         for ( i = 0 ; i < MAX_POWERUPS ; i++ ) {
02991                 if ( ps->powerups[ i ] ) {
02992                         s->powerups |= 1 << i;
02993                 }
02994         }
02995 
02996         s->loopSound = ps->loopSound;
02997         s->generic1 = ps->generic1;
02998 
02999         //NOT INCLUDED IN ENTITYSTATETOPLAYERSTATE:
03000         s->modelindex2 = ps->weaponstate;
03001         s->constantLight = ps->weaponChargeTime;
03002 
03003         VectorCopy(ps->lastHitLoc, s->origin2);
03004 
03005         s->isJediMaster = ps->isJediMaster;
03006 
03007         s->time2 = ps->holocronBits;
03008 
03009         s->fireflag = ps->fd.saberAnimLevel;
03010 
03011         s->heldByClient = ps->heldByClient;
03012         s->ragAttach = ps->ragAttach;
03013 
03014         s->iModelScale = ps->iModelScale;
03015 
03016         s->brokenLimbs = ps->brokenLimbs;
03017 
03018         s->hasLookTarget = ps->hasLookTarget;
03019         s->lookTarget = ps->lookTarget;
03020 
03021         s->customRGBA[0] = ps->customRGBA[0];
03022         s->customRGBA[1] = ps->customRGBA[1];
03023         s->customRGBA[2] = ps->customRGBA[2];
03024         s->customRGBA[3] = ps->customRGBA[3];
03025 
03026         s->m_iVehicleNum = ps->m_iVehicleNum;
03027 }

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

Definition at line 3037 of file bg_misc.c.

References playerState_s::activeForcePass, entityState_s::activeForcePass, entityState_s::angles2, entityState_s::apos, entityState_s::bolt1, playerState_s::brokenLimbs, entityState_s::brokenLimbs, entityState_s::clientNum, playerState_s::clientNum, entityState_s::constantLight, playerState_s::customRGBA, entityState_s::customRGBA, playerState_s::duelInProgress, EF_DEAD, EF_SEEKERDRONE, playerState_s::eFlags, entityState_s::eFlags, playerState_s::eFlags2, entityState_s::eFlags2, playerState_s::electrifyTime, playerState_s::emplacedIndex, entityState_s::emplacedOwner, playerState_s::entityEventSequence, entityState_t, ET_INVISIBLE, ET_PLAYER, 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::fd, entityState_s::fireflag, entityState_s::forceFrame, forcedata_s::forceMindtrickTargetIndex, forcedata_s::forceMindtrickTargetIndex2, forcedata_s::forceMindtrickTargetIndex3, forcedata_s::forceMindtrickTargetIndex4, forcedata_s::forcePowersActive, entityState_s::forcePowersActive, playerState_s::generic1, entityState_s::generic1, playerState_s::genericEnemyIndex, entityState_s::genericenemyindex, GIB_HEALTH, playerState_s::groundEntityNum, entityState_s::groundEntityNum, playerState_s::hasLookTarget, entityState_s::hasLookTarget, playerState_s::heldByClient, entityState_s::heldByClient, playerState_s::holocronBits, playerState_s::iModelScale, entityState_s::iModelScale, playerState_s::isJediMaster, entityState_s::isJediMaster, playerState_s::lastHitLoc, playerState_s::legsAnim, entityState_s::legsAnim, playerState_s::legsFlip, entityState_s::legsFlip, playerState_s::lookTarget, entityState_s::lookTarget, playerState_s::loopSound, entityState_s::loopSound, playerState_s::m_iVehicleNum, entityState_s::m_iVehicleNum, MAX_POWERUPS, MAX_PS_EVENTS, entityState_s::modelindex2, playerState_s::movementDir, entityState_s::number, playerState_s::origin, entityState_s::origin2, entityState_s::otherEntityNum2, playerState_t, PM_INTERMISSION, PM_SPECTATOR, playerState_s::pm_type, entityState_s::pos, playerState_s::powerups, entityState_s::powerups, playerState_s::ragAttach, entityState_s::ragAttach, forcedata_s::saberAnimLevel, playerState_s::saberEntityNum, entityState_s::saberEntityNum, playerState_s::saberHolstered, entityState_s::saberHolstered, playerState_s::saberInFlight, entityState_s::saberInFlight, playerState_s::saberLockFrame, playerState_s::saberMove, entityState_s::saberMove, playerState_s::speed, entityState_s::speed, STAT_HEALTH, playerState_s::stats, entityState_s::time2, playerState_s::torsoAnim, entityState_s::torsoAnim, playerState_s::torsoFlip, entityState_s::torsoFlip, TR_INTERPOLATE, TR_LINEAR_STOP, trajectory_t::trBase, trajectory_t::trDelta, trajectory_t::trDuration, entityState_s::trickedentindex, entityState_s::trickedentindex2, entityState_s::trickedentindex3, entityState_s::trickedentindex4, trajectory_t::trTime, trajectory_t::trType, VectorCopy, playerState_s::velocity, playerState_s::viewangles, playerState_s::weapon, entityState_s::weapon, playerState_s::weaponChargeTime, playerState_s::weaponstate, and YAW.

Referenced by ClientEndFrame(), and ClientThink_real().

03037                                                                                                             {
03038         int             i;
03039 
03040         if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) {
03041                 s->eType = ET_INVISIBLE;
03042         } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) {
03043                 s->eType = ET_INVISIBLE;
03044         } else {
03045                 s->eType = ET_PLAYER;
03046         }
03047 
03048         s->number = ps->clientNum;
03049 
03050         s->pos.trType = TR_LINEAR_STOP;
03051         VectorCopy( ps->origin, s->pos.trBase );
03052         if ( snap ) {
03053                 SnapVector( s->pos.trBase );
03054         }
03055         // set the trDelta for flag direction and linear prediction
03056         VectorCopy( ps->velocity, s->pos.trDelta );
03057         // set the time for linear prediction
03058         s->pos.trTime = time;
03059         // set maximum extra polation time
03060         s->pos.trDuration = 50; // 1000 / sv_fps (default = 20)
03061 
03062         s->apos.trType = TR_INTERPOLATE;
03063         VectorCopy( ps->viewangles, s->apos.trBase );
03064         if ( snap ) {
03065                 SnapVector( s->apos.trBase );
03066         }
03067 
03068         s->trickedentindex = ps->fd.forceMindtrickTargetIndex;
03069         s->trickedentindex2 = ps->fd.forceMindtrickTargetIndex2;
03070         s->trickedentindex3 = ps->fd.forceMindtrickTargetIndex3;
03071         s->trickedentindex4 = ps->fd.forceMindtrickTargetIndex4;
03072 
03073         s->forceFrame = ps->saberLockFrame;
03074 
03075         s->emplacedOwner = ps->electrifyTime;
03076 
03077         s->speed = ps->speed;
03078 
03079         s->genericenemyindex = ps->genericEnemyIndex;
03080 
03081         s->activeForcePass = ps->activeForcePass;
03082 
03083         s->angles2[YAW] = ps->movementDir;
03084         s->legsAnim = ps->legsAnim;
03085         s->torsoAnim = ps->torsoAnim;
03086 
03087         s->legsFlip = ps->legsFlip;
03088         s->torsoFlip = ps->torsoFlip;
03089 
03090         s->clientNum = ps->clientNum;           // ET_PLAYER looks here instead of at number
03091                                                                                 // so corpses can also reference the proper config
03092         s->eFlags = ps->eFlags;
03093         s->eFlags2 = ps->eFlags2;
03094 
03095         s->saberInFlight = ps->saberInFlight;
03096         s->saberEntityNum = ps->saberEntityNum;
03097         s->saberMove = ps->saberMove;
03098         s->forcePowersActive = ps->fd.forcePowersActive;
03099 
03100         if (ps->duelInProgress)
03101         {
03102                 s->bolt1 = 1;
03103         }
03104         else
03105         {
03106                 s->bolt1 = 0;
03107         }
03108 
03109         s->otherEntityNum2 = ps->emplacedIndex;
03110 
03111         s->saberHolstered = ps->saberHolstered;
03112 
03113         if (ps->genericEnemyIndex != -1)
03114         {
03115                 s->eFlags |= EF_SEEKERDRONE;
03116         }
03117 
03118         if ( ps->stats[STAT_HEALTH] <= 0 ) {
03119                 s->eFlags |= EF_DEAD;
03120         } else {
03121                 s->eFlags &= ~EF_DEAD;
03122         }
03123 
03124         if ( ps->externalEvent ) {
03125                 s->event = ps->externalEvent;
03126                 s->eventParm = ps->externalEventParm;
03127         } else if ( ps->entityEventSequence < ps->eventSequence ) {
03128                 int             seq;
03129 
03130                 if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) {
03131                         ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS;
03132                 }
03133                 seq = ps->entityEventSequence & (MAX_PS_EVENTS-1);
03134                 s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 );
03135                 s->eventParm = ps->eventParms[ seq ];
03136                 ps->entityEventSequence++;
03137         }
03138         s->weapon = ps->weapon;
03139         s->groundEntityNum = ps->groundEntityNum;
03140 
03141         s->powerups = 0;
03142         for ( i = 0 ; i < MAX_POWERUPS ; i++ ) {
03143                 if ( ps->powerups[ i ] ) {
03144                         s->powerups |= 1 << i;
03145                 }
03146         }
03147 
03148         s->loopSound = ps->loopSound;
03149         s->generic1 = ps->generic1;
03150 
03151         //NOT INCLUDED IN ENTITYSTATETOPLAYERSTATE:
03152         s->modelindex2 = ps->weaponstate;
03153         s->constantLight = ps->weaponChargeTime;
03154 
03155         VectorCopy(ps->lastHitLoc, s->origin2);
03156 
03157         s->isJediMaster = ps->isJediMaster;
03158 
03159         s->time2 = ps->holocronBits;
03160 
03161         s->fireflag = ps->fd.saberAnimLevel;
03162 
03163         s->heldByClient = ps->heldByClient;
03164         s->ragAttach = ps->ragAttach;
03165 
03166         s->iModelScale = ps->iModelScale;
03167 
03168         s->brokenLimbs = ps->brokenLimbs;
03169 
03170         s->hasLookTarget = ps->hasLookTarget;
03171         s->lookTarget = ps->lookTarget;
03172 
03173         s->customRGBA[0] = ps->customRGBA[0];
03174         s->customRGBA[1] = ps->customRGBA[1];
03175         s->customRGBA[2] = ps->customRGBA[2];
03176         s->customRGBA[3] = ps->customRGBA[3];
03177 
03178         s->m_iVehicleNum = ps->m_iVehicleNum;
03179 }

qboolean BG_PlayerTouchesItem playerState_t ps,
entityState_t item,
int  atTime
 

Definition at line 1979 of file bg_misc.c.

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

Referenced by G_TouchTriggers().

01979                                                                                            {
01980         vec3_t          origin;
01981 
01982         BG_EvaluateTrajectory( &item->pos, atTime, origin );
01983 
01984         // we are ignoring ducked differences here
01985         if ( ps->origin[0] - origin[0] > 44
01986                 || ps->origin[0] - origin[0] < -50
01987                 || ps->origin[1] - origin[1] > 36
01988                 || ps->origin[1] - origin[1] < -36
01989                 || ps->origin[2] - origin[2] > 36
01990                 || ps->origin[2] - origin[2] < -36 ) {
01991                 return qfalse;
01992         }
01993 
01994         return qtrue;
01995 }

qboolean BG_SaberInAttack int  move  ) 
 

Definition at line 227 of file bg_panimate.c.

00228 {
00229         if ( move >= LS_A_TL2BR && move <= LS_A_T2B )
00230         {
00231                 return qtrue;
00232         }
00233         switch ( move )
00234         {
00235         case LS_A_BACK:
00236         case LS_A_BACK_CR:
00237         case LS_A_BACKSTAB:
00238         case LS_ROLL_STAB:
00239         case LS_A_LUNGE:
00240         case LS_A_JUMP_T__B_:
00241         case LS_A_FLIP_STAB:
00242         case LS_A_FLIP_SLASH:
00243         case LS_JUMPATTACK_DUAL:
00244         case LS_JUMPATTACK_ARIAL_LEFT:
00245         case LS_JUMPATTACK_ARIAL_RIGHT:
00246         case LS_JUMPATTACK_CART_LEFT:
00247         case LS_JUMPATTACK_CART_RIGHT:
00248         case LS_JUMPATTACK_STAFF_LEFT:
00249         case LS_JUMPATTACK_STAFF_RIGHT:
00250         case LS_BUTTERFLY_LEFT:
00251         case LS_BUTTERFLY_RIGHT:
00252         case LS_A_BACKFLIP_ATK:
00253         case LS_SPINATTACK_DUAL:
00254         case LS_SPINATTACK:
00255         case LS_LEAP_ATTACK:
00256         case LS_SWOOP_ATTACK_RIGHT:
00257         case LS_SWOOP_ATTACK_LEFT:
00258         case LS_TAUNTAUN_ATTACK_RIGHT:
00259         case LS_TAUNTAUN_ATTACK_LEFT:
00260         case LS_KICK_F:
00261         case LS_KICK_B:
00262         case LS_KICK_R:
00263         case LS_KICK_L:
00264         case LS_KICK_S:
00265         case LS_KICK_BF:
00266         case LS_KICK_RL:
00267         case LS_KICK_F_AIR:
00268         case LS_KICK_B_AIR:
00269         case LS_KICK_R_AIR:
00270         case LS_KICK_L_AIR:
00271         case LS_STABDOWN:
00272         case LS_STABDOWN_STAFF:
00273         case LS_STABDOWN_DUAL:
00274         case LS_DUAL_SPIN_PROTECT:
00275         case LS_STAFF_SOULCAL:
00276         case LS_A1_SPECIAL:
00277         case LS_A2_SPECIAL:
00278         case LS_A3_SPECIAL:
00279         case LS_UPSIDE_DOWN_ATTACK:
00280         case LS_PULL_ATTACK_STAB:
00281         case LS_PULL_ATTACK_SWING:
00282         case LS_SPINATTACK_ALORA:
00283         case LS_DUAL_FB:
00284         case LS_DUAL_LR:
00285         case LS_HILT_BASH:
00286                 return qtrue;
00287                 break;
00288         }
00289         return qfalse;
00290 }

qboolean BG_SaberInIdle int  move  ) 
 

Definition at line 401 of file bg_panimate.c.

References LS_DRAW, LS_NONE, LS_PUTAWAY, LS_READY, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove().

00402 {
00403         switch ( move )
00404         {
00405         case LS_NONE:
00406         case LS_READY:
00407         case LS_DRAW:
00408         case LS_PUTAWAY:
00409                 return qtrue;
00410                 break;
00411         }
00412         return qfalse;
00413 }

qboolean BG_SaberInKata int  saberMove  ) 
 

Definition at line 292 of file bg_panimate.c.

References LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL, LS_DUAL_SPIN_PROTECT, LS_STAFF_SOULCAL, qboolean, qfalse, and qtrue.

Referenced by PM_CanDoKata(), PmoveSingle(), and SaberCombatHandling().

00293 {
00294         switch ( saberMove )
00295         {
00296         case LS_A1_SPECIAL:
00297         case LS_A2_SPECIAL:
00298         case LS_A3_SPECIAL:
00299         case LS_DUAL_SPIN_PROTECT:
00300         case LS_STAFF_SOULCAL:
00301                 return qtrue;
00302         }
00303         return qfalse;
00304 }

qboolean BG_SaberInSpecial int  move  ) 
 

Definition at line 320 of file bg_panimate.c.

References LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL, LS_A_BACK, LS_A_BACK_CR, LS_A_BACKFLIP_ATK, LS_A_BACKSTAB, LS_A_FLIP_SLASH, LS_A_FLIP_STAB, LS_A_JUMP_T__B_, LS_A_LUNGE, LS_BUTTERFLY_LEFT, LS_BUTTERFLY_RIGHT, LS_DUAL_FB, LS_DUAL_LR, LS_DUAL_SPIN_PROTECT, LS_HILT_BASH, LS_JUMPATTACK_ARIAL_LEFT, LS_JUMPATTACK_ARIAL_RIGHT, LS_JUMPATTACK_CART_LEFT, LS_JUMPATTACK_CART_RIGHT, LS_JUMPATTACK_DUAL, LS_JUMPATTACK_STAFF_LEFT, LS_JUMPATTACK_STAFF_RIGHT, LS_KICK_B, LS_KICK_B_AIR, LS_KICK_BF, LS_KICK_F, LS_KICK_F_AIR, LS_KICK_L, LS_KICK_L_AIR, LS_KICK_R, LS_KICK_R_AIR, LS_KICK_RL, LS_KICK_S, LS_LEAP_ATTACK, LS_PULL_ATTACK_STAB, LS_PULL_ATTACK_SWING, LS_ROLL_STAB, LS_SPINATTACK, LS_SPINATTACK_ALORA, LS_SPINATTACK_DUAL, LS_STABDOWN, LS_STABDOWN_DUAL, LS_STABDOWN_STAFF, LS_STAFF_SOULCAL, LS_SWOOP_ATTACK_LEFT, LS_SWOOP_ATTACK_RIGHT, LS_TAUNTAUN_ATTACK_LEFT, LS_TAUNTAUN_ATTACK_RIGHT, LS_UPSIDE_DOWN_ATTACK, qboolean, qfalse, and qtrue.

Referenced by BG_G2PlayerAngles(), ForcePowerUsableOn(), PM_ForceJumpingUp(), PM_SetSaberMove(), SaberCombatHandling(), and WP_ForcePowersUpdate().

00321 {
00322         switch( move )
00323         {
00324         case LS_A_BACK:
00325         case LS_A_BACK_CR:
00326         case LS_A_BACKSTAB:
00327         case LS_ROLL_STAB:
00328         case LS_A_LUNGE:
00329         case LS_A_JUMP_T__B_:
00330         case LS_A_FLIP_STAB:
00331         case LS_A_FLIP_SLASH:
00332         case LS_JUMPATTACK_DUAL:
00333         case LS_JUMPATTACK_ARIAL_LEFT:
00334         case LS_JUMPATTACK_ARIAL_RIGHT:
00335         case LS_JUMPATTACK_CART_LEFT:
00336         case LS_JUMPATTACK_CART_RIGHT:
00337         case LS_JUMPATTACK_STAFF_LEFT:
00338         case LS_JUMPATTACK_STAFF_RIGHT:
00339         case LS_BUTTERFLY_LEFT:
00340         case LS_BUTTERFLY_RIGHT:
00341         case LS_A_BACKFLIP_ATK:
00342         case LS_SPINATTACK_DUAL:
00343         case LS_SPINATTACK:
00344         case LS_LEAP_ATTACK:
00345         case LS_SWOOP_ATTACK_RIGHT:
00346         case LS_SWOOP_ATTACK_LEFT:
00347         case LS_TAUNTAUN_ATTACK_RIGHT:
00348         case LS_TAUNTAUN_ATTACK_LEFT:
00349         case LS_KICK_F:
00350         case LS_KICK_B:
00351         case LS_KICK_R:
00352         case LS_KICK_L:
00353         case LS_KICK_S:
00354         case LS_KICK_BF:
00355         case LS_KICK_RL:
00356         case LS_KICK_F_AIR:
00357         case LS_KICK_B_AIR:
00358         case LS_KICK_R_AIR:
00359         case LS_KICK_L_AIR:
00360         case LS_STABDOWN:
00361         case LS_STABDOWN_STAFF:
00362         case LS_STABDOWN_DUAL:
00363         case LS_DUAL_SPIN_PROTECT:
00364         case LS_STAFF_SOULCAL:
00365         case LS_A1_SPECIAL:
00366         case LS_A2_SPECIAL:
00367         case LS_A3_SPECIAL:
00368         case LS_UPSIDE_DOWN_ATTACK:
00369         case LS_PULL_ATTACK_STAB:
00370         case LS_PULL_ATTACK_SWING:
00371         case LS_SPINATTACK_ALORA:
00372         case LS_DUAL_FB:
00373         case LS_DUAL_LR:
00374         case LS_HILT_BASH:
00375                 return qtrue;
00376         }
00377         return qfalse;
00378 }

qboolean BG_SaberInSpecialAttack int  anim  ) 
 

Definition at line 587 of file bg_panimate.c.

00588 {
00589         switch ( anim )
00590         {
00591         case BOTH_A2_STABBACK1:
00592         case BOTH_ATTACK_BACK:
00593         case BOTH_CROUCHATTACKBACK1:
00594         case BOTH_ROLL_STAB:
00595         case BOTH_BUTTERFLY_LEFT:
00596         case BOTH_BUTTERFLY_RIGHT:
00597         case BOTH_BUTTERFLY_FL1:
00598         case BOTH_BUTTERFLY_FR1:
00599         case BOTH_FJSS_TR_BL:
00600         case BOTH_FJSS_TL_BR:
00601         case BOTH_LUNGE2_B__T_:
00602         case BOTH_FORCELEAP2_T__B_:
00603         case BOTH_JUMPFLIPSLASHDOWN1://#
00604         case BOTH_JUMPFLIPSTABDOWN://#
00605         case BOTH_JUMPATTACK6:
00606         case BOTH_JUMPATTACK7:
00607         case BOTH_SPINATTACK6:
00608         case BOTH_SPINATTACK7:
00609         case BOTH_FORCELONGLEAP_ATTACK:
00610         case BOTH_VS_ATR_S:
00611         case BOTH_VS_ATL_S:
00612         case BOTH_VT_ATR_S:
00613         case BOTH_VT_ATL_S:
00614         case BOTH_A7_KICK_F:
00615         case BOTH_A7_KICK_B:
00616         case BOTH_A7_KICK_R:
00617         case BOTH_A7_KICK_L:
00618         case BOTH_A7_KICK_S:
00619         case BOTH_A7_KICK_BF:
00620         case BOTH_A7_KICK_RL:
00621         case BOTH_A7_KICK_F_AIR:
00622         case BOTH_A7_KICK_B_AIR:
00623         case BOTH_A7_KICK_R_AIR:
00624         case BOTH_A7_KICK_L_AIR:
00625         case BOTH_STABDOWN:
00626         case BOTH_STABDOWN_STAFF:
00627         case BOTH_STABDOWN_DUAL:
00628         case BOTH_A6_SABERPROTECT:
00629         case BOTH_A7_SOULCAL:
00630         case BOTH_A1_SPECIAL:
00631         case BOTH_A2_SPECIAL:
00632         case BOTH_A3_SPECIAL:
00633         case BOTH_FLIP_ATTACK7:
00634         case BOTH_PULL_IMPALE_STAB:
00635         case BOTH_PULL_IMPALE_SWING:
00636         case BOTH_ALORA_SPIN_SLASH:
00637         case BOTH_A6_FB:
00638         case BOTH_A6_LR:        
00639         case BOTH_A7_HILT:
00640                 return qtrue;
00641         }
00642         return qfalse;
00643 }

void BG_SaberStartTransAnim int  clientNum,
int  saberAnimLevel,
int  weapon,
int  anim,
float *  animSpeed,
int  broken
 

Definition at line 2728 of file bg_panimate.c.

References saberInfo_t::animSpeedScale, BG_MySaber(), BOTH_A1_T__B_, BOTH_ROLL_STAB, BOTH_T1_BL_TL, BOTH_T1_BR__R, BOTH_T2_BL_TL, BOTH_T2_BR__R, BOTH_T3_BL_TL, BOTH_T3_BR__R, BROKENLIMB_LARM, BROKENLIMB_RARM, FORCE_LEVEL_1, FORCE_LEVEL_3, PM_InSaberAnim(), and WP_SABER.

Referenced by BG_SetAnimFinal(), and G_UpdateClientAnims().

02729 {
02730         if ( anim >= BOTH_A1_T__B_ && anim <= BOTH_ROLL_STAB )
02731         {
02732                 if ( weapon == WP_SABER )
02733                 {
02734                         saberInfo_t *saber = BG_MySaber( clientNum, 0 );
02735                         if ( saber 
02736                                 && saber->animSpeedScale != 1.0f )
02737                         {
02738                                 *animSpeed *= saber->animSpeedScale;
02739                         }
02740                         saber = BG_MySaber( clientNum, 1 );
02741                         if ( saber
02742                                 && saber->animSpeedScale != 1.0f )
02743                         {
02744                                 *animSpeed *= saber->animSpeedScale;
02745                         }
02746                 }
02747         }
02748 
02749         if ( ( (anim) >= BOTH_T1_BR__R && 
02750                 (anim) <= BOTH_T1_BL_TL ) ||
02751                 ( (anim) >= BOTH_T2_BR__R && 
02752                 (anim) <= BOTH_T2_BL_TL ) ||
02753                 ( (anim) >= BOTH_T3_BR__R && 
02754                 (anim) <= BOTH_T3_BL_TL ) )
02755         {
02756                 if ( saberAnimLevel == FORCE_LEVEL_1 )
02757                 {
02758                         *animSpeed *= 1.5f;
02759                 }
02760                 else if ( saberAnimLevel == FORCE_LEVEL_3 )
02761                 {
02762                         *animSpeed *= 0.75f;
02763                 }
02764 
02765                 if (broken & (1<<BROKENLIMB_RARM))
02766                 {
02767                         *animSpeed *= 0.5f;
02768                 }
02769                 else if (broken & (1<<BROKENLIMB_LARM))
02770                 {
02771                         *animSpeed *= 0.65f;
02772                 }
02773         }
02774         else if (broken && PM_InSaberAnim(anim))
02775         {
02776                 if (broken & (1<<BROKENLIMB_RARM))
02777                 {
02778                         *animSpeed *= 0.5f;
02779                 }
02780                 else if (broken & (1<<BROKENLIMB_LARM))
02781                 {
02782                         *animSpeed *= 0.65f;
02783                 }
02784         }
02785 }

void BG_SI_Activate saberInfo_t saber  ) 
 

Definition at line 2815 of file bg_saberLoad.c.

References bladeInfo_t::active, saberInfo_t::blade, saberInfo_t::numBlades, and qtrue.

02816 {
02817         int i;
02818 
02819         for ( i = 0; i < saber->numBlades; i++ )
02820         {
02821                 saber->blade[i].active = qtrue;
02822         }
02823 }

void BG_SI_ActivateTrail saberInfo_t saber,
float  duration
 

Definition at line 2989 of file bg_saberLoad.c.

References BG_BLADE_ActivateTrail(), saberInfo_t::blade, and saberInfo_t::numBlades.

02990 {
02991         int i;
02992 
02993         for ( i = 0; i < saber->numBlades; i++ )
02994         {
02995                 //saber->blade[i].ActivateTrail( duration );
02996                 BG_BLADE_ActivateTrail(&saber->blade[i], duration);
02997         }
02998 }

qboolean BG_SI_Active saberInfo_t saber  ) 
 

Definition at line 2849 of file bg_saberLoad.c.

References bladeInfo_t::active, saberInfo_t::blade, saberInfo_t::numBlades, qboolean, qfalse, and qtrue.

02850 {
02851         int i;
02852 
02853         for ( i = 0; i < saber->numBlades; i++ )
02854         {
02855                 if ( saber->blade[i].active )
02856                 {
02857                         return qtrue;
02858                 }
02859         }
02860         return qfalse;
02861 }

void BG_SI_BladeActivate saberInfo_t saber,
int  iBlade,
qboolean  bActive
 

Definition at line 2840 of file bg_saberLoad.c.

References bladeInfo_t::active, saberInfo_t::blade, and saberInfo_t::numBlades.

02841 {
02842         // Validate blade ID/Index.
02843         if ( iBlade < 0 || iBlade >= saber->numBlades )
02844                 return;
02845 
02846         saber->blade[iBlade].active = bActive;
02847 }

void BG_SI_Deactivate saberInfo_t saber  ) 
 

Definition at line 2825 of file bg_saberLoad.c.

References bladeInfo_t::active, saberInfo_t::blade, saberInfo_t::numBlades, and qfalse.

Referenced by WP_RemoveSaber().

02826 {
02827         int i;
02828 
02829         for ( i = 0; i < saber->numBlades; i++ )
02830         {
02831                 saber->blade[i].active = qfalse;
02832         }
02833 }

void BG_SI_DeactivateTrail saberInfo_t saber,
float  duration
 

Definition at line 3000 of file bg_saberLoad.c.

References BG_BLADE_DeactivateTrail(), saberInfo_t::blade, and saberInfo_t::numBlades.

03001 {
03002         int i;
03003 
03004         for ( i = 0; i < saber->numBlades; i++ )
03005         {
03006                 //saber->blade[i].DeactivateTrail( duration );
03007                 BG_BLADE_DeactivateTrail(&saber->blade[i], duration);
03008         }
03009 }

float BG_SI_Length saberInfo_t saber  ) 
 

Definition at line 2959 of file bg_saberLoad.c.

References saberInfo_t::blade, bladeInfo_t::length, and saberInfo_t::numBlades.

02960 {//return largest length
02961         int len1 = 0;
02962         int i;
02963 
02964         for ( i = 0; i < saber->numBlades; i++ )
02965         {
02966                 if ( saber->blade[i].length > len1 )
02967                 {
02968                         len1 = saber->blade[i].length; 
02969                 }
02970         }
02971         return len1;
02972 }

float BG_SI_LengthMax saberInfo_t saber  ) 
 

Definition at line 2974 of file bg_saberLoad.c.

References saberInfo_t::blade, bladeInfo_t::lengthMax, and saberInfo_t::numBlades.

02975 { 
02976         int len1 = 0;
02977         int i;
02978 
02979         for ( i = 0; i < saber->numBlades; i++ )
02980         {
02981                 if ( saber->blade[i].lengthMax > len1 )
02982                 {
02983                         len1 = saber->blade[i].lengthMax; 
02984                 }
02985         }
02986         return len1;
02987 }

void BG_SI_SetDesiredLength saberInfo_t saber,
float  len,
int  bladeNum
 

Definition at line 2874 of file bg_saberLoad.c.

References saberInfo_t::blade, bladeInfo_t::desiredLength, and saberInfo_t::numBlades.

Referenced by CG_CheckPlayerG2Weapons(), CG_NewClientInfo(), CG_Player(), and CG_ResetPlayerEntity().

02875 {
02876         int i, startBlade = 0, maxBlades = saber->numBlades;
02877 
02878         if ( bladeNum >= 0 && bladeNum < saber->numBlades)
02879         {//doing this on a specific blade
02880                 startBlade = bladeNum;
02881                 maxBlades = bladeNum+1;
02882         }
02883         for (i = startBlade; i < maxBlades; i++)
02884         {
02885                 saber->blade[i].desiredLength = len;
02886         }
02887 }

void BG_SI_SetLength saberInfo_t saber,
float  length
 

Definition at line 2863 of file bg_saberLoad.c.

References saberInfo_t::blade, bladeInfo_t::length, and saberInfo_t::numBlades.

Referenced by CG_Player(), and WP_RemoveSaber().

02864 {
02865         int i;
02866 
02867         for ( i = 0; i < saber->numBlades; i++ )
02868         {
02869                 saber->blade[i].length = length;
02870         }
02871 }

void BG_SI_SetLengthGradual saberInfo_t saber,
int  time
 

Definition at line 2890 of file bg_saberLoad.c.

References saberInfo_t::blade, bladeInfo_t::desiredLength, bladeInfo_t::extendDebounce, bladeInfo_t::length, bladeInfo_t::lengthMax, and saberInfo_t::numBlades.

Referenced by CG_Player().

02891 {
02892         int i;
02893         float amt, dLen;
02894 
02895         for (i = 0; i < saber->numBlades; i++)
02896         {
02897                 dLen = saber->blade[i].desiredLength;
02898 
02899                 if (dLen == -1)
02900                 { //assume we want max blade len
02901                         dLen = saber->blade[i].lengthMax;
02902                 }
02903 
02904                 if (saber->blade[i].length == dLen)
02905                 {
02906                         continue;
02907                 }
02908 
02909                 if (saber->blade[i].length == saber->blade[i].lengthMax ||
02910                         saber->blade[i].length == 0)
02911                 {
02912                         saber->blade[i].extendDebounce = time;
02913                         if (saber->blade[i].length == 0)
02914                         {
02915                                 saber->blade[i].length++;
02916                         }
02917                         else
02918                         {
02919                                 saber->blade[i].length--;
02920                         }
02921                 }
02922 
02923                 amt = (time - saber->blade[i].extendDebounce)*0.01;
02924 
02925                 if (amt < 0.2f)
02926                 {
02927                         amt = 0.2f;
02928                 }
02929 
02930                 if (saber->blade[i].length < dLen)
02931                 {
02932                         saber->blade[i].length += amt;
02933 
02934                         if (saber->blade[i].length > dLen)
02935                         {
02936                                 saber->blade[i].length = dLen;
02937                         }
02938                         if (saber->blade[i].length > saber->blade[i].lengthMax)
02939                         {
02940                                 saber->blade[i].length = saber->blade[i].lengthMax;
02941                         }
02942                 }
02943                 else if (saber->blade[i].length > dLen)
02944                 {
02945                         saber->blade[i].length -= amt;
02946 
02947                         if (saber->blade[i].length < dLen)
02948                         {
02949                                 saber->blade[i].length = dLen;
02950                         }
02951                         if (saber->blade[i].length < 0)
02952                         {
02953                                 saber->blade[i].length = 0;
02954                         }
02955                 }
02956         }
02957 }

qboolean BG_SpinningSaberAnim int  anim  ) 
 

Definition at line 479 of file bg_panimate.c.

00480 {
00481         switch ( anim )
00482         {
00483         //level 1 - FIXME: level 1 will have *no* spins
00484         case BOTH_T1_BR_BL:
00485         case BOTH_T1__R__L:
00486         case BOTH_T1__R_BL:
00487         case BOTH_T1_TR_BL:
00488         case BOTH_T1_BR_TL:
00489         case BOTH_T1_BR__L:
00490         case BOTH_T1_TL_BR:
00491         case BOTH_T1__L_BR:
00492         case BOTH_T1__L__R:
00493         case BOTH_T1_BL_BR:
00494         case BOTH_T1_BL__R:
00495         case BOTH_T1_BL_TR:
00496         //level 2
00497         case BOTH_T2_BR__L:
00498         case BOTH_T2_BR_BL:
00499         case BOTH_T2__R_BL:
00500         case BOTH_T2__L_BR:
00501         case BOTH_T2_BL_BR:
00502         case BOTH_T2_BL__R:
00503         //level 3
00504         case BOTH_T3_BR__L:
00505         case BOTH_T3_BR_BL:
00506         case BOTH_T3__R_BL:
00507         case BOTH_T3__L_BR:
00508         case BOTH_T3_BL_BR:
00509         case BOTH_T3_BL__R:
00510         //level 4
00511         case BOTH_T4_BR__L:
00512         case BOTH_T4_BR_BL:
00513         case BOTH_T4__R_BL:
00514         case BOTH_T4__L_BR:
00515         case BOTH_T4_BL_BR:
00516         case BOTH_T4_BL__R:
00517         //level 5
00518         case BOTH_T5_BR_BL:
00519         case BOTH_T5__R__L:
00520         case BOTH_T5__R_BL:
00521         case BOTH_T5_TR_BL:
00522         case BOTH_T5_BR_TL:
00523         case BOTH_T5_BR__L:
00524         case BOTH_T5_TL_BR:
00525         case BOTH_T5__L_BR:
00526         case BOTH_T5__L__R:
00527         case BOTH_T5_BL_BR:
00528         case BOTH_T5_BL__R:
00529         case BOTH_T5_BL_TR:
00530         //level 6
00531         case BOTH_T6_BR_TL:
00532         case BOTH_T6__R_TL:
00533         case BOTH_T6__R__L:
00534         case BOTH_T6__R_BL:
00535         case BOTH_T6_TR_TL:
00536         case BOTH_T6_TR__L:
00537         case BOTH_T6_TR_BL:
00538         case BOTH_T6_T__TL:
00539         case BOTH_T6_T__BL:
00540         case BOTH_T6_TL_BR:
00541         case BOTH_T6__L_BR:
00542         case BOTH_T6__L__R:
00543         case BOTH_T6_TL__R:
00544         case BOTH_T6_TL_TR:
00545         case BOTH_T6__L_TR:
00546         case BOTH_T6__L_T_:
00547         case BOTH_T6_BL_T_:
00548         case BOTH_T6_BR__L:
00549         case BOTH_T6_BR_BL:
00550         case BOTH_T6_BL_BR:
00551         case BOTH_T6_BL__R:
00552         case BOTH_T6_BL_TR:
00553         //level 7
00554         case BOTH_T7_BR_TL:
00555         case BOTH_T7_BR__L:
00556         case BOTH_T7_BR_BL:
00557         case BOTH_T7__R__L:
00558         case BOTH_T7__R_BL:
00559         case BOTH_T7_TR__L:
00560         case BOTH_T7_T___R:
00561         case BOTH_T7_TL_BR:
00562         case BOTH_T7__L_BR:
00563         case BOTH_T7__L__R:
00564         case BOTH_T7_BL_BR:
00565         case BOTH_T7_BL__R:
00566         case BOTH_T7_BL_TR:
00567         case BOTH_T7_TL_TR:
00568         case BOTH_T7_T__BR:
00569         case BOTH_T7__L_TR:
00570         case BOTH_V7_BL_S7:
00571         //special
00572         //case BOTH_A2_STABBACK1:
00573         case BOTH_ATTACK_BACK:
00574         case BOTH_CROUCHATTACKBACK1:
00575         case BOTH_BUTTERFLY_LEFT:
00576         case BOTH_BUTTERFLY_RIGHT:
00577         case BOTH_FJSS_TR_BL:
00578         case BOTH_FJSS_TL_BR:
00579         case BOTH_JUMPFLIPSLASHDOWN1:
00580         case BOTH_JUMPFLIPSTABDOWN:
00581                 return qtrue;
00582                 break;
00583         }
00584         return qfalse;
00585 }

char* BG_StringAlloc const char *  source  ) 
 

Definition at line 3383 of file bg_misc.c.

References BG_Alloc(), strcpy(), and strlen().

03384 {
03385         char *dest;
03386 
03387         dest = BG_Alloc ( strlen ( source ) + 1 );
03388         strcpy ( dest, source );
03389         return dest;
03390 }

void* BG_TempAlloc int  size  ) 
 

Definition at line 3356 of file bg_misc.c.

References Com_Error(), and ERR_DROP.

Referenced by B_TempAlloc(), BG_VehicleLoadParms(), BG_VehWeaponLoadParms(), and NPC_ParseParms().

03357 {
03358         size = ((size + 0x00000003) & 0xfffffffc);
03359 
03360         if (bg_poolTail - size < bg_poolSize)
03361         {
03362                 Com_Error( ERR_DROP, "BG_TempAlloc: buffer exceeded head (%d > %d)", bg_poolTail - size, bg_poolSize);
03363                 return 0;
03364         }
03365 
03366         bg_poolTail -= size;
03367 
03368         return &bg_pool[bg_poolTail];
03369 }

void BG_TempFree int  size  ) 
 

Definition at line 3371 of file bg_misc.c.

References Com_Error(), ERR_DROP, and MAX_POOL_SIZE.

Referenced by B_TempFree(), BG_VehicleLoadParms(), BG_VehWeaponLoadParms(), and NPC_ParseParms().

03372 {
03373         size = ((size + 0x00000003) & 0xfffffffc);
03374 
03375         if (bg_poolTail+size > MAX_POOL_SIZE)
03376         {
03377                 Com_Error( ERR_DROP, "BG_TempFree: tail greater than size (%d > %d)", bg_poolTail+size, MAX_POOL_SIZE );
03378         }
03379 
03380         bg_poolTail += size;
03381 }

void BG_TouchJumpPad playerState_t ps,
entityState_t jumppad
 

Definition at line 2667 of file bg_misc.c.

References AngleNormalize180(), entityState_t, fabs(), playerState_s::jumppad_ent, playerState_s::jumppad_frame, entityState_s::number, entityState_s::origin2, PITCH, playerState_t, PM_FLOAT, PM_JETPACK, PM_NORMAL, playerState_s::pm_type, playerState_s::pmove_framecount, vec3_t, vectoangles(), VectorCopy, and playerState_s::velocity.

Referenced by trigger_push_touch().

02667                                                                   {
02668         vec3_t  angles;
02669         float p;
02670         int effectNum;
02671 
02672         // spectators don't use jump pads
02673         if ( ps->pm_type != PM_NORMAL && ps->pm_type != PM_JETPACK && ps->pm_type != PM_FLOAT ) {
02674                 return;
02675         }
02676 
02677         // if we didn't hit this same jumppad the previous frame
02678         // then don't play the event sound again if we are in a fat trigger
02679         if ( ps->jumppad_ent != jumppad->number ) {
02680 
02681                 vectoangles( jumppad->origin2, angles);
02682                 p = fabs( AngleNormalize180( angles[PITCH] ) );
02683                 if( p < 45 ) {
02684                         effectNum = 0;
02685                 } else {
02686                         effectNum = 1;
02687                 }
02688         }
02689         // remember hitting this jumppad this frame
02690         ps->jumppad_ent = jumppad->number;
02691         ps->jumppad_frame = ps->pmove_framecount;
02692         // give the player the velocity from the jumppad
02693         VectorCopy( jumppad->origin2, ps->velocity );
02694 }

bgEntity_t* PM_BGEntForNum int  num  ) 
 

Definition at line 172 of file bg_pmove.c.

References