00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __BG_PUBLIC_H__
00009 #define __BG_PUBLIC_H__
00010
00011 #include "bg_weapons.h"
00012 #include "anims.h"
00013 #include "bg_vehicles.h"
00014
00015
00016 #define MAX_SPAWN_VARS 64
00017 #define MAX_SPAWN_VARS_CHARS 4096
00018
00019
00020 #define GAME_VERSION "basejka-1"
00021
00022 #define STEPSIZE 18
00023
00024 #define DEFAULT_GRAVITY 800
00025 #define GIB_HEALTH -40
00026 #define ARMOR_PROTECTION 0.50 // Shields only stop 50% of armor-piercing dmg
00027 #define ARMOR_REDUCTION_FACTOR 0.50 // Certain damage doesn't take off armor as efficiently
00028
00029 #define JUMP_VELOCITY 225//270
00030
00031 #define MAX_ITEMS 256
00032
00033 #define RANK_TIED_FLAG 0x4000
00034
00035 #define ITEM_RADIUS 15 // item sizes are needed for client side pickup detection
00036
00037 #define SCORE_NOT_PRESENT -9999 // for the CS_SCORES[12] when only one player is present
00038
00039 #define VOTE_TIME 30000 // 30 seconds before vote times out
00040
00041 #define DEFAULT_MINS_2 -24
00042 #define DEFAULT_MAXS_2 40
00043 #define CROUCH_MAXS_2 16
00044 #define STANDARD_VIEWHEIGHT_OFFSET -4
00045
00046 #define MINS_Z -24
00047 #define DEFAULT_VIEWHEIGHT (DEFAULT_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)//26
00048 #define CROUCH_VIEWHEIGHT (CROUCH_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)//12
00049 #define DEAD_VIEWHEIGHT -16
00050
00051 #define MAX_CLIENT_SCORE_SEND 20
00052
00053
00054
00055
00056
00057
00058
00059 #define CS_MUSIC 2
00060 #define CS_MESSAGE 3 // from the map worldspawn's message field
00061 #define CS_MOTD 4 // g_motd string for server message of the day
00062 #define CS_WARMUP 5 // server time when the match will be restarted
00063 #define CS_SCORES1 6
00064 #define CS_SCORES2 7
00065 #define CS_VOTE_TIME 8
00066 #define CS_VOTE_STRING 9
00067 #define CS_VOTE_YES 10
00068 #define CS_VOTE_NO 11
00069
00070 #define CS_TEAMVOTE_TIME 12
00071 #define CS_TEAMVOTE_STRING 14
00072 #define CS_TEAMVOTE_YES 16
00073 #define CS_TEAMVOTE_NO 18
00074
00075 #define CS_GAME_VERSION 20
00076 #define CS_LEVEL_START_TIME 21 // so the timer only shows the current level
00077 #define CS_INTERMISSION 22 // when 1, fraglimit/timelimit has been hit and intermission will start in a second or two
00078 #define CS_FLAGSTATUS 23 // string indicating flag status in CTF
00079 #define CS_SHADERSTATE 24
00080 #define CS_BOTINFO 25
00081
00082 #define CS_ITEMS 27 // string of 0's and 1's that tell which items are present
00083
00084 #define CS_CLIENT_JEDIMASTER 28 // current jedi master
00085 #define CS_CLIENT_DUELWINNER 29 // current duel round winner - needed for printing at top of scoreboard
00086 #define CS_CLIENT_DUELISTS 30 // client numbers for both current duelists. Needed for a number of client-side things.
00087 #define CS_CLIENT_DUELHEALTHS 31 // nmckenzie: DUEL_HEALTH. Hopefully adding this cs is safe and good?
00088 #define CS_GLOBAL_AMBIENT_SET 32
00089
00090 #define CS_AMBIENT_SET 37
00091
00092 #define CS_SIEGE_STATE (CS_AMBIENT_SET+MAX_AMBIENT_SETS)
00093 #define CS_SIEGE_OBJECTIVES (CS_SIEGE_STATE+1)
00094 #define CS_SIEGE_TIMEOVERRIDE (CS_SIEGE_OBJECTIVES+1)
00095 #define CS_SIEGE_WINTEAM (CS_SIEGE_TIMEOVERRIDE+1)
00096 #define CS_SIEGE_ICONS (CS_SIEGE_WINTEAM+1)
00097
00098 #define CS_MODELS (CS_SIEGE_ICONS+1)
00099 #define CS_SKYBOXORG (CS_MODELS+MAX_MODELS) //rww - skybox info
00100 #define CS_SOUNDS (CS_SKYBOXORG+1)
00101 #define CS_ICONS (CS_SOUNDS+MAX_SOUNDS)
00102 #define CS_PLAYERS (CS_ICONS+MAX_ICONS)
00103
00104
00105
00106 #define CS_G2BONES (CS_PLAYERS+MAX_CLIENTS)
00107
00108
00109
00110
00111 #define CS_LOCATIONS (CS_G2BONES+MAX_G2BONES)
00112 #define CS_PARTICLES (CS_LOCATIONS+MAX_LOCATIONS)
00113 #define CS_EFFECTS (CS_PARTICLES+MAX_LOCATIONS)
00114 #define CS_LIGHT_STYLES (CS_EFFECTS + MAX_FX)
00115
00116
00117 #define CS_TERRAINS (CS_LIGHT_STYLES + (MAX_LIGHT_STYLES*3))
00118 #define CS_BSP_MODELS (CS_TERRAINS + MAX_TERRAINS)
00119
00120 #define CS_MAX (CS_BSP_MODELS + MAX_SUB_BSP)
00121
00122 #if (CS_MAX) > MAX_CONFIGSTRINGS
00123 #error overflow: (CS_MAX) > MAX_CONFIGSTRINGS
00124 #endif
00125
00126 typedef enum {
00127 G2_MODELPART_HEAD = 10,
00128 G2_MODELPART_WAIST,
00129 G2_MODELPART_LARM,
00130 G2_MODELPART_RARM,
00131 G2_MODELPART_RHAND,
00132 G2_MODELPART_LLEG,
00133 G2_MODELPART_RLEG
00134 } g2ModelParts_t;
00135
00136 #define G2_MODEL_PART 50
00137
00138 #define BG_NUM_TOGGLEABLE_SURFACES 31
00139
00140 #define MAX_CUSTOM_SIEGE_SOUNDS 30
00141
00142 #include "../namespace_begin.h"
00143 extern const char *bg_customSiegeSoundNames[MAX_CUSTOM_SIEGE_SOUNDS];
00144
00145 extern const char *bgToggleableSurfaces[BG_NUM_TOGGLEABLE_SURFACES];
00146 extern const int bgToggleableSurfaceDebris[BG_NUM_TOGGLEABLE_SURFACES];
00147 #include "../namespace_end.h"
00148
00149 typedef enum {
00150 HANDEXTEND_NONE = 0,
00151 HANDEXTEND_FORCEPUSH,
00152 HANDEXTEND_FORCEPULL,
00153 HANDEXTEND_FORCE_HOLD,
00154 HANDEXTEND_SABERPULL,
00155 HANDEXTEND_CHOKE,
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;
00171
00172 typedef enum
00173 {
00174 BROKENLIMB_NONE = 0,
00175 BROKENLIMB_LARM,
00176 BROKENLIMB_RARM,
00177 NUM_BROKENLIMBS
00178 } brokenLimb_t;
00179
00180
00181 #define TOSS_DEBOUNCE_TIME 5000
00182
00183 typedef enum {
00184 GT_FFA,
00185 GT_HOLOCRON,
00186 GT_JEDIMASTER,
00187 GT_DUEL,
00188 GT_POWERDUEL,
00189 GT_SINGLE_PLAYER,
00190
00191
00192
00193 GT_TEAM,
00194 GT_SIEGE,
00195 GT_CTF,
00196 GT_CTY,
00197 GT_MAX_GAME_TYPE
00198 };
00199 typedef int gametype_t;
00200
00201 typedef enum { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER } gender_t;
00202
00203 extern vec3_t WP_MuzzlePoint[WP_NUM_WEAPONS];
00204
00205 #include "../namespace_begin.h"
00206 extern int forcePowerSorted[NUM_FORCE_POWERS];
00207 #include "../namespace_end.h"
00208
00209 typedef enum
00210 {
00211 SABERLOCK_TOP,
00212 SABERLOCK_SIDE,
00213 SABERLOCK_LOCK,
00214 SABERLOCK_BREAK,
00215 SABERLOCK_SUPERBREAK,
00216 SABERLOCK_WIN,
00217 SABERLOCK_LOSE
00218 };
00219
00220 typedef enum
00221 {
00222 DIR_RIGHT,
00223 DIR_LEFT,
00224 DIR_FRONT,
00225 DIR_BACK
00226 };
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240 #pragma pack(push, 1)
00241 typedef struct animation_s {
00242 unsigned short firstFrame;
00243 unsigned short numFrames;
00244 short frameLerp;
00245
00246 signed char loopFrames;
00247 } animation_t;
00248 #pragma pack(pop)
00249
00250 #include "../namespace_begin.h"
00251 extern qboolean BGPAFtextLoaded;
00252 extern animation_t bgHumanoidAnimations[MAX_TOTALANIMATIONS];
00253 #include "../namespace_end.h"
00254
00255 #define MAX_ANIM_FILES 16
00256 #define MAX_ANIM_EVENTS 300
00257
00258 typedef enum
00259 {
00260 FOOTSTEP_R,
00261 FOOTSTEP_L,
00262 FOOTSTEP_HEAVY_R,
00263 FOOTSTEP_HEAVY_L,
00264 NUM_FOOTSTEP_TYPES
00265 } footstepType_t;
00266
00267 extern stringID_table_t animEventTypeTable[MAX_ANIM_EVENTS+1];
00268 extern stringID_table_t footstepTypeTable[NUM_FOOTSTEP_TYPES+1];
00269
00270
00271 #define MAX_RANDOM_ANIM_SOUNDS 4
00272 #define AED_ARRAY_SIZE (MAX_RANDOM_ANIM_SOUNDS+3)
00273
00274 #define AED_SOUNDINDEX_START 0
00275 #define AED_SOUNDINDEX_END (MAX_RANDOM_ANIM_SOUNDS-1)
00276 #define AED_SOUND_NUMRANDOMSNDS (MAX_RANDOM_ANIM_SOUNDS)
00277 #define AED_SOUND_PROBABILITY (MAX_RANDOM_ANIM_SOUNDS+1)
00278
00279 #define AED_SOUNDCHANNEL (MAX_RANDOM_ANIM_SOUNDS+2)
00280
00281 #define AED_FOOTSTEP_TYPE 0
00282 #define AED_FOOTSTEP_PROBABILITY 1
00283
00284 #define AED_EFFECTINDEX 0
00285 #define AED_BOLTINDEX 1
00286 #define AED_EFFECT_PROBABILITY 2
00287 #define AED_MODELINDEX 3
00288
00289 #define AED_FIRE_ALT 0
00290 #define AED_FIRE_PROBABILITY 1
00291
00292 #define AED_MOVE_FWD 0
00293 #define AED_MOVE_RT 1
00294 #define AED_MOVE_UP 2
00295
00296 #define AED_SABER_SWING_SABERNUM 0
00297 #define AED_SABER_SWING_TYPE 1
00298 #define AED_SABER_SWING_PROBABILITY 2
00299
00300 #define AED_SABER_SPIN_SABERNUM 0
00301 #define AED_SABER_SPIN_TYPE 1 //0 = saberspinoff, 1 = saberspin, 2-4 = saberspin1-saberspin3
00302 #define AED_SABER_SPIN_PROBABILITY 2
00303
00304 typedef enum
00305 {
00306 AEV_NONE,
00307 AEV_SOUND,
00308 AEV_FOOTSTEP,
00309 AEV_EFFECT,
00310 AEV_FIRE,
00311 AEV_MOVE,
00312 AEV_SOUNDCHAN,
00313 AEV_SABER_SWING,
00314 AEV_SABER_SPIN,
00315 AEV_NUM_AEV
00316 } animEventType_t;
00317
00318 typedef struct animevent_s
00319 {
00320 animEventType_t eventType;
00321 unsigned short keyFrame;
00322 signed short eventData[AED_ARRAY_SIZE];
00323 char *stringData;
00324 } animevent_t;
00325
00326 typedef struct
00327 {
00328 char filename[MAX_QPATH];
00329 animation_t *anims;
00330
00331
00332
00333 } bgLoadedAnim_t;
00334
00335 typedef struct
00336 {
00337 char filename[MAX_QPATH];
00338 animevent_t torsoAnimEvents[MAX_ANIM_EVENTS];
00339 animevent_t legsAnimEvents[MAX_ANIM_EVENTS];
00340 qboolean eventsParsed;
00341 } bgLoadedEvents_t;
00342
00343 #include "../namespace_begin.h"
00344
00345 extern bgLoadedAnim_t bgAllAnims[MAX_ANIM_FILES];
00346
00347
00348
00349
00350
00351
00352
00353 #ifndef QAGAME
00354 extern bgLoadedEvents_t bgAllEvents[MAX_ANIM_FILES];
00355 extern int bgNumAnimEvents;
00356 #endif
00357
00358 #include "../namespace_end.h"
00359
00360 typedef enum {
00361 PM_NORMAL,
00362 PM_JETPACK,
00363 PM_FLOAT,
00364 PM_NOCLIP,
00365 PM_SPECTATOR,
00366 PM_DEAD,
00367 PM_FREEZE,
00368 PM_INTERMISSION,
00369 PM_SPINTERMISSION
00370 } pmtype_t;
00371
00372 typedef enum {
00373 WEAPON_READY,
00374 WEAPON_RAISING,
00375 WEAPON_DROPPING,
00376 WEAPON_FIRING,
00377 WEAPON_CHARGING,
00378 WEAPON_CHARGING_ALT,
00379 WEAPON_IDLE,
00380 } weaponstate_t;
00381
00382
00383 typedef enum {
00384 FORCE_MASTERY_UNINITIATED,
00385 FORCE_MASTERY_INITIATE,
00386 FORCE_MASTERY_PADAWAN,
00387 FORCE_MASTERY_JEDI,
00388 FORCE_MASTERY_JEDI_GUARDIAN,
00389 FORCE_MASTERY_JEDI_ADEPT,
00390 FORCE_MASTERY_JEDI_KNIGHT,
00391 FORCE_MASTERY_JEDI_MASTER,
00392 NUM_FORCE_MASTERY_LEVELS
00393 };
00394
00395 #include "../namespace_begin.h"
00396 extern char *forceMasteryLevels[NUM_FORCE_MASTERY_LEVELS];
00397 extern int forceMasteryPoints[NUM_FORCE_MASTERY_LEVELS];
00398
00399 extern int bgForcePowerCost[NUM_FORCE_POWERS][NUM_FORCE_POWER_LEVELS];
00400 #include "../namespace_end.h"
00401
00402
00403 #define PMF_DUCKED 1
00404 #define PMF_JUMP_HELD 2
00405 #define PMF_ROLLING 4
00406 #define PMF_BACKWARDS_JUMP 8 // go into backwards land
00407 #define PMF_BACKWARDS_RUN 16 // coast down to backwards run
00408 #define PMF_TIME_LAND 32 // pm_time is time before rejump
00409 #define PMF_TIME_KNOCKBACK 64 // pm_time is an air-accelerate only time
00410 #define PMF_FIX_MINS 128 // mins have been brought up, keep tracing down to fix them
00411 #define PMF_TIME_WATERJUMP 256 // pm_time is waterjump
00412 #define PMF_RESPAWNED 512 // clear after attack and jump buttons come up
00413 #define PMF_USE_ITEM_HELD 1024
00414 #define PMF_UPDATE_ANIM 2048 // The server updated the animation, the pmove should set the ghoul2 anim to match.
00415 #define PMF_FOLLOW 4096 // spectate following another player
00416 #define PMF_SCOREBOARD 8192 // spectate as a scoreboard
00417 #define PMF_STUCK_TO_WALL 16384 // grabbing a wall
00418
00419 #define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
00420
00421 #define MAXTOUCH 32
00422
00423 typedef struct bgEntity_s
00424 {
00425 entityState_t s;
00426 playerState_t *playerState;
00427 Vehicle_t *m_pVehicle;
00428 void *ghoul2;
00429 int localAnimIndex;
00430 vec3_t modelScale;
00431
00432
00433 } bgEntity_t;
00434
00435 typedef struct {
00436
00437 playerState_t *ps;
00438
00439
00440 void *ghoul2;
00441 int g2Bolts_LFoot;
00442 int g2Bolts_RFoot;
00443 vec3_t modelScale;
00444
00445
00446 qboolean nonHumanoid;
00447
00448
00449 usercmd_t cmd;
00450 int tracemask;
00451 int debugLevel;
00452 qboolean noFootsteps;
00453 qboolean gauntletHit;
00454
00455 int framecount;
00456
00457
00458 int numtouch;
00459 int touchents[MAXTOUCH];
00460
00461 int useEvent;
00462
00463 vec3_t mins, maxs;
00464
00465 int watertype;
00466 int waterlevel;
00467
00468 int gametype;
00469
00470 int debugMelee;
00471 int stepSlideFix;
00472 int noSpecMove;
00473
00474 animation_t *animations;
00475
00476 float xyspeed;
00477
00478
00479 int pmove_fixed;
00480 int pmove_msec;
00481
00482
00483
00484 void (*trace)( trace_t *results, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int passEntityNum, int contentMask );
00485 int (*pointcontents)( const vec3_t point, int passEntityNum );
00486
00487 int checkDuelLoss;
00488
00489
00490 bgEntity_t *baseEnt;
00491 int entSize;
00492 } pmove_t;
00493
00494 #include "../namespace_begin.h"
00495
00496 extern pmove_t *pm;
00497
00498 #define SETANIM_TORSO 1
00499 #define SETANIM_LEGS 2
00500 #define SETANIM_BOTH SETANIM_TORSO|SETANIM_LEGS//3
00501
00502 #define SETANIM_FLAG_NORMAL 0//Only set if timer is 0
00503 #define SETANIM_FLAG_OVERRIDE 1//Override previous
00504 #define SETANIM_FLAG_HOLD 2//Set the new timer
00505 #define SETANIM_FLAG_RESTART 4//Allow restarting the anim if playing the same one (weapon fires)
00506 #define SETANIM_FLAG_HOLDLESS 8//Set the new timer
00507
00508
00509
00510 void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd );
00511 void Pmove (pmove_t *pmove);
00512
00513 #include "../namespace_end.h"
00514
00515
00516
00517
00518
00519
00520 typedef enum {
00521 STAT_HEALTH,
00522 STAT_HOLDABLE_ITEM,
00523 STAT_HOLDABLE_ITEMS,
00524 STAT_PERSISTANT_POWERUP,
00525
00526
00527 STAT_WEAPONS = 4,
00528 STAT_ARMOR,
00529 STAT_DEAD_YAW,
00530 STAT_CLIENTS_READY,
00531 STAT_MAX_HEALTH
00532 } statIndex_t;
00533
00534
00535
00536
00537
00538
00539 typedef enum {
00540 PERS_SCORE,
00541 PERS_HITS,
00542 PERS_RANK,
00543 PERS_TEAM,
00544 PERS_SPAWN_COUNT,
00545 PERS_PLAYEREVENTS,
00546 PERS_ATTACKER,
00547 PERS_ATTACKEE_ARMOR,
00548 PERS_KILLED,
00549
00550 PERS_IMPRESSIVE_COUNT,
00551 PERS_EXCELLENT_COUNT,
00552 PERS_DEFEND_COUNT,
00553 PERS_ASSIST_COUNT,
00554 PERS_GAUNTLET_FRAG_COUNT,
00555 PERS_CAPTURES
00556 } persEnum_t;
00557
00558
00559
00560 #define EF_G2ANIMATING (1<<0) //perform g2 bone anims based on torsoAnim and legsAnim, works for ET_GENERAL -rww
00561 #define EF_DEAD (1<<1) // don't draw a foe marker over players with EF_DEAD
00562
00563
00564 #define EF_RADAROBJECT (1<<2) // display on team radar
00565
00566 #define EF_TELEPORT_BIT (1<<3) // toggled every time the origin abruptly changes
00567
00568 #define EF_SHADER_ANIM (1<<4) // Animating shader (by s.frame)
00569
00570 #define EF_PLAYER_EVENT (1<<5)
00571
00572
00573
00574
00575
00576 #define EF_RAG (1<<6) //ragdoll him even if he's alive
00577
00578
00579 #define EF_PERMANENT (1<<7) // rww - I am claiming this. (for permanent entities)
00580
00581 #define EF_NODRAW (1<<8) // may have an event, but no model (unspawned items)
00582 #define EF_FIRING (1<<9) // for lightning gun
00583 #define EF_ALT_FIRING (1<<10) // for alt-fires, mostly for lightning guns though
00584 #define EF_JETPACK_ACTIVE (1<<11) //jetpack is activated
00585
00586 #define EF_NOT_USED_1 (1<<12) // not used
00587
00588 #define EF_TALK (1<<13) // draw a talk balloon
00589 #define EF_CONNECTION (1<<14) // draw a connection trouble sprite
00590 #define EF_NOT_USED_6 (1<<15) // not used
00591
00592 #define EF_NOT_USED_2 (1<<16) // not used
00593 #define EF_NOT_USED_3 (1<<17) // not used
00594 #define EF_NOT_USED_4 (1<<18) // not used
00595
00596 #define EF_BODYPUSH (1<<19) //rww - claiming this for fullbody push effect
00597
00598 #define EF_DOUBLE_AMMO (1<<20) // Hacky way to get around ammo max
00599 #define EF_SEEKERDRONE (1<<21) // show seeker drone floating around head
00600 #define EF_MISSILE_STICK (1<<22) // missiles that stick to the wall.
00601 #define EF_ITEMPLACEHOLDER (1<<23) // item effect
00602 #define EF_SOUNDTRACKER (1<<24) // sound position needs to be updated in relation to another entity
00603 #define EF_DROPPEDWEAPON (1<<25) // it's a dropped weapon
00604 #define EF_DISINTEGRATION (1<<26) // being disintegrated by the disruptor
00605 #define EF_INVULNERABLE (1<<27) // just spawned in or whatever, so is protected
00606
00607 #define EF_CLIENTSMOOTH (1<<28) // standard lerporigin smooth override on client
00608
00609 #define EF_JETPACK (1<<29) //rww - wearing a jetpack
00610 #define EF_JETPACK_FLAMING (1<<30) //rww - jetpack fire effect
00611
00612 #define EF_NOT_USED_5 (1<<31) // not used
00613
00614
00615
00616 #define EF2_HELD_BY_MONSTER (1<<0) // Being held by something, like a Rancor or a Wampa
00617 #define EF2_USE_ALT_ANIM (1<<1) // For certain special runs/stands for creatures like the Rancor and Wampa whose runs/stands are conditional
00618 #define EF2_ALERTED (1<<2) // For certain special anims, for Rancor: means you've had an enemy, so use the more alert stand
00619 #define EF2_GENERIC_NPC_FLAG (1<<3) // So far, used for Rancor...
00620 #define EF2_FLYING (1<<4) // Flying FIXME: only used on NPCs doesn't *really* have to be passed over, does it?
00621 #define EF2_HYPERSPACE (1<<5) // Used to both start the hyperspace effect on the predicted client and to let the vehicle know it can now jump into hyperspace (after turning to face the proper angle)
00622 #define EF2_BRACKET_ENTITY (1<<6) // Draw as bracketed
00623 #define EF2_SHIP_DEATH (1<<7) // "died in ship" mode
00624 #define EF2_NOT_USED_1 (1<<8) // not used
00625
00626
00627 typedef enum {
00628 EFFECT_NONE = 0,
00629 EFFECT_SMOKE,
00630 EFFECT_EXPLOSION,
00631 EFFECT_EXPLOSION_PAS,
00632 EFFECT_SPARK_EXPLOSION,
00633 EFFECT_EXPLOSION_TRIPMINE,
00634 EFFECT_EXPLOSION_DETPACK,
00635 EFFECT_EXPLOSION_FLECHETTE,
00636 EFFECT_STUNHIT,
00637 EFFECT_EXPLOSION_DEMP2ALT,
00638 EFFECT_EXPLOSION_TURRET,
00639 EFFECT_SPARKS,
00640 EFFECT_WATER_SPLASH,
00641 EFFECT_ACID_SPLASH,
00642 EFFECT_LAVA_SPLASH,
00643 EFFECT_LANDING_MUD,
00644 EFFECT_LANDING_SAND,
00645 EFFECT_LANDING_DIRT,
00646 EFFECT_LANDING_SNOW,
00647 EFFECT_LANDING_GRAVEL,
00648 EFFECT_MAX
00649 } effectTypes_t;
00650
00651
00652 typedef enum {
00653 PW_NONE,
00654
00655 PW_QUAD,
00656 PW_BATTLESUIT,
00657 PW_PULL,
00658
00659
00660
00661
00662 PW_REDFLAG,
00663 PW_BLUEFLAG,
00664 PW_NEUTRALFLAG,
00665
00666 PW_SHIELDHIT,
00667
00668
00669
00670
00671
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 };
00684 typedef int powerup_t;
00685
00686 typedef enum {
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 };
00704 typedef int holdable_t;
00705
00706
00707 typedef enum {
00708 CTFMESSAGE_FRAGGED_FLAG_CARRIER,
00709 CTFMESSAGE_FLAG_RETURNED,
00710 CTFMESSAGE_PLAYER_RETURNED_FLAG,
00711 CTFMESSAGE_PLAYER_CAPTURED_FLAG,
00712 CTFMESSAGE_PLAYER_GOT_FLAG
00713 } ctfMsg_t;
00714
00715
00716 #define PLAYEREVENT_DENIEDREWARD 0x0001
00717 #define PLAYEREVENT_GAUNTLETREWARD 0x0002
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728 #define EV_EVENT_BIT1 0x00000100
00729 #define EV_EVENT_BIT2 0x00000200
00730 #define EV_EVENT_BITS (EV_EVENT_BIT1|EV_EVENT_BIT2)
00731
00732 #define EVENT_VALID_MSEC 300
00733
00734 typedef enum
00735 {
00736 PDSOUND_NONE,
00737 PDSOUND_PROTECTHIT,
00738 PDSOUND_PROTECT,
00739 PDSOUND_ABSORBHIT,
00740 PDSOUND_ABSORB,
00741 PDSOUND_FORCEJUMP,
00742 PDSOUND_FORCEGRIP
00743 } pdSounds_t;
00744
00745 typedef enum {
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,
00764
00765 EV_GHOUL2_MARK,
00766
00767 EV_GLOBAL_DUEL,
00768 EV_PRIVATE_DUEL,
00769
00770 EV_JUMP,
00771 EV_ROLL,
00772 EV_WATER_TOUCH,
00773 EV_WATER_LEAVE,
00774 EV_WATER_UNDER,
00775 EV_WATER_CLEAR,
00776
00777 EV_ITEM_PICKUP,
00778 EV_GLOBAL_ITEM_PICKUP,
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,
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,
00833 EV_MISSILE_STICK,
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,
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,
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
00872
00873 EV_FORCE_DRAINED,
00874
00875 EV_GIB_PLAYER,
00876 EV_SCOREPLUM,
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
00905 EV_ANGER1,
00906 EV_ANGER2,
00907 EV_ANGER3,
00908
00909 EV_VICTORY1,
00910 EV_VICTORY2,
00911 EV_VICTORY3,
00912
00913 EV_CONFUSE1,
00914 EV_CONFUSE2,
00915 EV_CONFUSE3,
00916
00917 EV_PUSHED1,
00918 EV_PUSHED2,
00919 EV_PUSHED3,
00920
00921 EV_CHOKE1,
00922 EV_CHOKE2,
00923 EV_CHOKE3,
00924
00925 EV_FFWARN,
00926 EV_FFTURN,
00927
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
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;
00991
00992
00993 typedef enum {
00994 GTS_RED_CAPTURE,
00995 GTS_BLUE_CAPTURE,
00996 GTS_RED_RETURN,
00997 GTS_BLUE_RETURN,
00998 GTS_RED_TAKEN,
00999 GTS_BLUE_TAKEN,
01000 GTS_REDTEAM_SCORED,
01001 GTS_BLUETEAM_SCORED,
01002 GTS_REDTEAM_TOOK_LEAD,
01003 GTS_BLUETEAM_TOOK_LEAD,
01004 GTS_TEAMS_ARE_TIED
01005 } global_team_sound_t;
01006
01007
01008
01009 typedef enum {
01010 TEAM_FREE,
01011 TEAM_RED,
01012 TEAM_BLUE,
01013 TEAM_SPECTATOR,
01014
01015 TEAM_NUM_TEAMS
01016 };
01017 typedef int team_t;
01018
01019 typedef enum {
01020 DUELTEAM_FREE,
01021 DUELTEAM_LONE,
01022 DUELTEAM_DOUBLE,
01023
01024 DUELTEAM_SINGLE,
01025 } duelTeam_t;
01026
01027
01028 #define TEAM_LOCATION_UPDATE_TIME 1000
01029
01030
01031 #define TEAM_MAXOVERLAY 32
01032
01033
01034 typedef enum {
01035 TEAMTASK_NONE,
01036 TEAMTASK_OFFENSE,
01037 TEAMTASK_DEFENSE,
01038 TEAMTASK_PATROL,
01039 TEAMTASK_FOLLOW,
01040 TEAMTASK_RETRIEVE,
01041 TEAMTASK_ESCORT,
01042 TEAMTASK_CAMP
01043 } teamtask_t;
01044
01045
01046 typedef enum {
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
01091
01092
01093
01094
01095
01096 MOD_MAX
01097 } meansOfDeath_t;
01098
01099
01100
01101
01102
01103 typedef enum {
01104 IT_BAD,
01105 IT_WEAPON,
01106 IT_AMMO,
01107 IT_ARMOR,
01108 IT_HEALTH,
01109 IT_POWERUP,
01110
01111 IT_HOLDABLE,
01112
01113 IT_PERSISTANT_POWERUP,
01114 IT_TEAM
01115 };
01116 typedef int itemType_t;
01117
01118 #define MAX_ITEM_MODELS 4
01119
01120 typedef struct gitem_s {
01121 char *classname;
01122 char *pickup_sound;
01123 char *world_model[MAX_ITEM_MODELS];
01124 char *view_model;
01125 char *icon;
01126
01127
01128 int quantity;
01129 itemType_t giType;
01130
01131 int giTag;
01132
01133 char *precaches;
01134 char *sounds;
01135 char *description;
01136 } gitem_t;
01137
01138
01139 #include "../namespace_begin.h"
01140
01141 extern gitem_t bg_itemlist[];
01142 extern int bg_numItems;
01143
01144 float vectoyaw( const vec3_t vec );
01145
01146 gitem_t *BG_FindItem( const char *classname );
01147 gitem_t *BG_FindItemForWeapon( weapon_t weapon );
01148 gitem_t *BG_FindItemForPowerup( powerup_t pw );
01149 gitem_t *BG_FindItemForHoldable( holdable_t pw );
01150 #define ITEM_INDEX(x) ((x)-bg_itemlist)
01151
01152 qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const playerState_t *ps );
01153
01154 #include "../namespace_end.h"
01155
01156
01157 #define SABER_BLOCK_DUR 150 // number of milliseconds a block animation should take.
01158
01159
01160
01161
01162 #define DF_NO_FALLING 8
01163 #define DF_FIXED_FOV 16
01164 #define DF_NO_FOOTSTEPS 32
01165
01166
01167
01168 #define MASK_ALL (-1)
01169 #define MASK_SOLID (CONTENTS_SOLID|CONTENTS_TERRAIN)
01170 #define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY|CONTENTS_TERRAIN)
01171 #define MASK_NPCSOLID (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_BODY|CONTENTS_TERRAIN)
01172 #define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_TERRAIN)
01173 #define MASK_WATER (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME)
01174 #define MASK_OPAQUE (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA|CONTENTS_TERRAIN)
01175 #define MASK_SHOT (CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_CORPSE|CONTENTS_TERRAIN)
01176
01177
01178
01179
01180 #define FX_STATE_OFF 0
01181 #define FX_STATE_ONE_SHOT 1
01182 #define FX_STATE_ONE_SHOT_LIMIT 10
01183 #define FX_STATE_CONTINUOUS 20
01184
01185
01186
01187
01188 typedef enum {
01189 ET_GENERAL,
01190 ET_PLAYER,
01191 ET_ITEM,
01192 ET_MISSILE,
01193 ET_SPECIAL,
01194 ET_HOLOCRON,
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,
01203 ET_TEAM,
01204 ET_BODY,
01205 ET_TERRAIN,
01206 ET_FX,
01207
01208 ET_EVENTS
01209
01210
01211 } entityType_t;
01212
01213
01214
01215
01216
01217
01218
01219
01220 #undef _GAME_SIDE
01221
01222 #ifdef QAGAME
01223 #define _GAME_SIDE
01224 #elif defined CGAME
01225 #define _GAME_SIDE
01226 #endif
01227
01228 #ifdef _GAME_SIDE
01229 typedef enum {
01230 F_INT,
01231 F_FLOAT,
01232 F_LSTRING,
01233 F_GSTRING,
01234 F_VECTOR,
01235 F_ANGLEHACK,
01236 F_ENTITY,
01237 F_ITEM,
01238 F_CLIENT,
01239 F_PARM1,
01240 F_PARM2,
01241 F_PARM3,
01242 F_PARM4,
01243 F_PARM5,
01244 F_PARM6,
01245 F_PARM7,
01246 F_PARM8,
01247 F_PARM9,
01248 F_PARM10,
01249 F_PARM11,
01250 F_PARM12,
01251 F_PARM13,
01252 F_PARM14,
01253 F_PARM15,
01254 F_PARM16,
01255 F_IGNORE
01256 } fieldtype_t;
01257
01258
01259
01260
01261 typedef struct
01262 {
01263 char *name;
01264 int ofs;
01265 fieldtype_t type;
01266 int flags;
01267 } BG_field_t;
01268
01269
01270
01271 #endif
01272
01273
01274
01275
01276
01277
01278
01279
01280
01281
01282
01283 #ifdef LS_NONE
01284 #undef LS_NONE
01285 #endif
01286
01287 typedef enum {
01288
01289 LS_INVALID = -1,
01290
01291 LS_NONE = 0,
01292
01293
01294 LS_READY,
01295 LS_DRAW,
01296 LS_PUTAWAY,
01297
01298
01299 LS_A_TL2BR,
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
01359 LS_S_TL2BR,
01360 LS_S_L2R,
01361 LS_S_BL2TR,
01362 LS_S_BR2TL,
01363 LS_S_R2L,
01364 LS_S_TR2BL,
01365 LS_S_T2B,
01366
01367
01368 LS_R_TL2BR,
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
01377 LS_T1_BR__R,
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,
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,
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,
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,
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,
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,
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
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
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
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
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
01458 LS_K1_T_,
01459 LS_K1_TR,
01460 LS_K1_TL,
01461 LS_K1_BR,
01462 LS_K1_BL,
01463
01464
01465 LS_PARRY_UP,
01466 LS_PARRY_UR,
01467 LS_PARRY_UL,
01468 LS_PARRY_LR,
01469 LS_PARRY_LL,
01470
01471
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 };
01480 typedef int saberMoveName_t;
01481
01482 typedef enum {
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;
01493
01494 typedef struct
01495 {
01496 char *name;
01497 int animToUse;
01498 int startQuad;
01499 int endQuad;
01500 unsigned animSetFlags;
01501 int blendTime;
01502 int blocking;
01503 saberMoveName_t chain_idle;
01504 saberMoveName_t chain_attack;
01505 qboolean trailLength;
01506 } saberMoveData_t;
01507
01508 #include "../namespace_begin.h"
01509
01510 extern saberMoveData_t saberMoveData[LS_MOVE_MAX];
01511
01512 bgEntity_t *PM_BGEntForNum( int num );
01513 qboolean BG_KnockDownable(playerState_t *ps);
01514 qboolean BG_LegalizedForcePowers(char *powerOut, int maxRank, qboolean freeSaber, int teamForce, int gametype, int fpDisabled);
01515
01516 #include "../namespace_end.h"
01517
01518 #ifdef __LCC__ //can't inline it then, it is declared over in bg_misc in this case
01519 void BG_GiveMeVectorFromMatrix(mdxaBone_t *boltMatrix, int flags, vec3_t vec);
01520 #else
01521
01522 static ID_INLINE void BG_GiveMeVectorFromMatrix(mdxaBone_t *boltMatrix, int flags, vec3_t vec)
01523 {
01524 switch (flags)
01525 {
01526 case ORIGIN:
01527 vec[0] = boltMatrix->matrix[0][3];
01528 vec[1] = boltMatrix->matrix[1][3];
01529 vec[2] = boltMatrix->matrix[2][3];
01530 break;
01531 case POSITIVE_Y:
01532 vec[0] = boltMatrix->matrix[0][1];
01533 vec[1] = boltMatrix->matrix[1][1];
01534 vec[2] = boltMatrix->matrix[2][1];
01535 break;
01536 case POSITIVE_X:
01537 vec[0] = boltMatrix->matrix[0][0];
01538 vec[1] = boltMatrix->matrix[1][0];
01539 vec[2] = boltMatrix->matrix[2][0];
01540 break;
01541 case POSITIVE_Z:
01542 vec[0] = boltMatrix->matrix[0][2];
01543 vec[1] = boltMatrix->matrix[1][2];
01544 vec[2] = boltMatrix->matrix[2][2];
01545 break;
01546 case NEGATIVE_Y:
01547 vec[0] = -boltMatrix->matrix[0][1];
01548 vec[1] = -boltMatrix->matrix[1][1];
01549 vec[2] = -boltMatrix->matrix[2][1];
01550 break;
01551 case NEGATIVE_X:
01552 vec[0] = -boltMatrix->matrix[0][0];
01553 vec[1] = -boltMatrix->matrix[1][0];
01554 vec[2] = -boltMatrix->matrix[2][0];
01555 break;
01556 case NEGATIVE_Z:
01557 vec[0] = -boltMatrix->matrix[0][2];
01558 vec[1] = -boltMatrix->matrix[1][2];
01559 vec[2] = -boltMatrix->matrix[2][2];
01560 break;
01561 }
01562 }
01563 #endif
01564
01565 #include "../namespace_begin.h"
01566
01567 void BG_IK_MoveArm(void *ghoul2, int lHandBolt, int time, entityState_t *ent, int basePose, vec3_t desiredPos, qboolean *ikInProgress,
01568 vec3_t origin, vec3_t angles, vec3_t scale, int blendTime, qboolean forceHalt);
01569
01570 void BG_G2PlayerAngles(void *ghoul2, int motionBolt, entityState_t *cent, int time, vec3_t cent_lerpOrigin,
01571 vec3_t cent_lerpAngles, vec3_t legs[3], vec3_t legsAngles, qboolean *tYawing,
01572 qboolean *tPitching, qboolean *lYawing, float *tYawAngle, float *tPitchAngle,
01573 float *lYawAngle, int frametime, vec3_t turAngles, vec3_t modelScale, int ciLegs,
01574 int ciTorso, int *corrTime, vec3_t lookAngles, vec3_t lastHeadAngles, int lookTime,
01575 entityState_t *emplaced, int *crazySmoothFactor);
01576 void BG_G2ATSTAngles(void *ghoul2, int time, vec3_t cent_lerpAngles );
01577
01578
01579
01580 int BG_AnimLength( int index, animNumber_t anim );
01581
01582 qboolean BG_InSpecialJump( int anim );
01583 qboolean BG_InSaberStandAnim( int anim );
01584 qboolean BG_InReboundJump( int anim );
01585 qboolean BG_InReboundHold( int anim );
01586 qboolean BG_InReboundRelease( int anim );
01587 qboolean BG_InBackFlip( int anim );
01588 qboolean BG_DirectFlippingAnim( int anim );
01589 qboolean BG_SaberInAttack( int move );
01590 qboolean BG_SaberInSpecial( int move );
01591 qboolean BG_KickMove( int move );
01592 qboolean BG_SaberInIdle( int move );
01593 qboolean BG_FlippingAnim( int anim );
01594 qboolean BG_SpinningSaberAnim( int anim );
01595 qboolean BG_SaberInSpecialAttack( int anim );
01596 qboolean BG_SaberInKata( int saberMove );
01597 qboolean BG_InKataAnim(int anim);
01598 qboolean BG_KickingAnim( int anim );
01599 int BG_InGrappleMove(int anim);
01600 int BG_BrokenParryForAttack( int move );
01601 int BG_BrokenParryForParry( int move );
01602 int BG_KnockawayForParry( int move );
01603 qboolean BG_InRoll( playerState_t *ps, int anim );
01604 qboolean BG_InDeathAnim( int anim );
01605 qboolean BG_InSaberLockOld( int anim );
01606 qboolean BG_InSaberLock( int anim );
01607
01608 void BG_SaberStartTransAnim( int clientNum, int saberAnimLevel, int weapon, int anim, float *animSpeed, int broken );
01609
01610 void BG_ForcePowerDrain( playerState_t *ps, forcePowers_t forcePower, int overrideAmt );
01611
01612 void BG_EvaluateTrajectory( const trajectory_t *tr, int atTime, vec3_t result );
01613 void BG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t result );
01614
01615 void BG_AddPredictableEventToPlayerstate( int newEvent, int eventParm, playerState_t *ps );
01616
01617 void BG_TouchJumpPad( playerState_t *ps, entityState_t *jumppad );
01618
01619 void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap );
01620 void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap );
01621
01622 qboolean BG_PlayerTouchesItem( playerState_t *ps, entityState_t *item, int atTime );
01623
01624 void BG_InitAnimsets(void);
01625 void BG_ClearAnimsets(void);
01626 int BG_ParseAnimationFile(const char *filename, animation_t *animSet, qboolean isHumanoid);
01627 #ifndef QAGAME
01628 int BG_ParseAnimationEvtFile( const char *as_filename, int animFileIndex, int eventFileIndex );
01629 #endif
01630
01631 qboolean BG_HasAnimation(int animIndex, int animation);
01632 int BG_PickAnim( int animIndex, int minAnim, int maxAnim );
01633
01634 int BG_GetItemIndexByTag(int tag, int type);
01635
01636 qboolean BG_IsItemSelectable(playerState_t *ps, int item);
01637
01638 qboolean BG_HasYsalamiri(int gametype, playerState_t *ps);
01639 qboolean BG_CanUseFPNow(int gametype, playerState_t *ps, int time, forcePowers_t power);
01640
01641 void *BG_Alloc ( int size );
01642 void *BG_AllocUnaligned ( int size );
01643 void *BG_TempAlloc( int size );
01644 void BG_TempFree( int size );
01645 char *BG_StringAlloc ( const char *source );
01646 qboolean BG_OutOfMemory ( void );
01647
01648 void BG_BLADE_ActivateTrail ( bladeInfo_t *blade, float duration );
01649 void BG_BLADE_DeactivateTrail ( bladeInfo_t *blade, float duration );
01650 void BG_SI_Activate( saberInfo_t *saber );
01651 void BG_SI_Deactivate( saberInfo_t *saber );
01652 void BG_SI_BladeActivate( saberInfo_t *saber, int iBlade, qboolean bActive );
01653 qboolean BG_SI_Active(saberInfo_t *saber);
01654 void BG_SI_SetLength( saberInfo_t *saber, float length );
01655 void BG_SI_SetDesiredLength(saberInfo_t *saber, float len, int bladeNum);
01656 void BG_SI_SetLengthGradual( saberInfo_t *saber, int time );
01657 float BG_SI_Length(saberInfo_t *saber);
01658 float BG_SI_LengthMax(saberInfo_t *saber);
01659 void BG_SI_ActivateTrail ( saberInfo_t *saber, float duration );
01660 void BG_SI_DeactivateTrail ( saberInfo_t *saber, float duration );
01661 extern 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] );
01662
01663 extern int WeaponReadyAnim[WP_NUM_WEAPONS];
01664 extern int WeaponAttackAnim[WP_NUM_WEAPONS];
01665
01666 extern int forcePowerDarkLight[NUM_FORCE_POWERS];
01667
01668 #include "../namespace_end.h"
01669
01670 #define ARENAS_PER_TIER 4
01671 #define MAX_ARENAS 1024
01672 #define MAX_ARENAS_TEXT 8192
01673
01674 #define MAX_BOTS 1024
01675 #define MAX_BOTS_TEXT 8192
01676
01677 #define HYPERSPACE_TIME 4000 //For hyperspace triggers
01678 #define HYPERSPACE_TELEPORT_FRAC 0.75f
01679 #define HYPERSPACE_SPEED 10000.0f//was 30000
01680 #define HYPERSPACE_TURN_RATE 45.0f
01681
01682 #endif //__BG_PUBLIC_H__