mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-26 22:21:16 +00:00
Removed the zcam defines again and did some cleanups
This commit is contained in:
parent
08555edb8d
commit
468c0073ee
1 changed files with 197 additions and 293 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.63 2002/04/02 00:56:18 jbravo
|
||||||
|
// Removed the zcam defines again and did some cleanups
|
||||||
|
//
|
||||||
// Revision 1.62 2002/04/01 22:23:14 slicer
|
// Revision 1.62 2002/04/01 22:23:14 slicer
|
||||||
// Added "weapon" command buffering | Solved Gren Mode Bug
|
// Added "weapon" command buffering | Solved Gren Mode Bug
|
||||||
//
|
//
|
||||||
|
@ -104,15 +107,11 @@
|
||||||
//==================================================================
|
//==================================================================
|
||||||
|
|
||||||
// the "gameversion" client command will print this plus compile date
|
// the "gameversion" client command will print this plus compile date
|
||||||
#define GAMEVERSION "reaction"
|
#define GAMEVERSION "reaction"
|
||||||
|
|
||||||
// NiceAss: Took it out until later.
|
|
||||||
#define __ZCAM__
|
|
||||||
|
|
||||||
#define BODY_QUEUE_SIZE 8
|
#define BODY_QUEUE_SIZE 8
|
||||||
|
|
||||||
// JBravo: Max number of killed enemys to track
|
// JBravo: Max number of killed enemys to track
|
||||||
#define RQ3_MAXKILLS 5
|
#define RQ3_MAXKILLS 5
|
||||||
|
|
||||||
// Blaze: How long someone bleeds for
|
// Blaze: How long someone bleeds for
|
||||||
// Elder: This doesn't work the same as Q2 because clients and servers can
|
// Elder: This doesn't work the same as Q2 because clients and servers can
|
||||||
|
@ -120,44 +119,43 @@
|
||||||
// (20 snapshots per second) so we double it from 10.
|
// (20 snapshots per second) so we double it from 10.
|
||||||
// Ideally, this number should match the server's sv_fps cvar value for those
|
// Ideally, this number should match the server's sv_fps cvar value for those
|
||||||
// that run non-standard server frame rates.
|
// that run non-standard server frame rates.
|
||||||
#define BLEED_TIME 20
|
#define BLEED_TIME 20
|
||||||
// Elder: Everyone knows you lose 6 health from the moment you start bandaging
|
// Elder: Everyone knows you lose 6 health from the moment you start bandaging
|
||||||
// Let's enforce that in-code because it's sometimes 7 or even 8
|
// Let's enforce that in-code because it's sometimes 7 or even 8
|
||||||
// Elder: LOL it's 3, dumb Elder!
|
// Elder: LOL it's 3, dumb Elder!
|
||||||
#define BLEED_BANDAGE 3
|
#define BLEED_BANDAGE 3
|
||||||
//#define BLEED_BANDAGE_TIME 5400 // 27 x 2
|
#define BLEED_BANDAGE_TIME 5400 // 27 x 2
|
||||||
#define BLEED_BANDAGE_TIME 5600 // 27 x 2
|
|
||||||
|
|
||||||
// types of locations that can be hit
|
// types of locations that can be hit
|
||||||
#define LOC_HDAM 1 // head
|
#define LOC_HDAM 1 // head
|
||||||
#define LOC_CDAM 2 // chest
|
#define LOC_CDAM 2 // chest
|
||||||
#define LOC_SDAM 3 // stomach
|
#define LOC_SDAM 3 // stomach
|
||||||
#define LOC_LDAM 4 // legs
|
#define LOC_LDAM 4 // legs
|
||||||
|
|
||||||
#define INFINITE 1000000
|
#define INFINITE 1000000
|
||||||
|
|
||||||
#define FRAMETIME 100 // msec
|
#define FRAMETIME 100 // msec
|
||||||
#define CARNAGE_REWARD_TIME 3000
|
#define CARNAGE_REWARD_TIME 3000
|
||||||
#define REWARD_SPRITE_TIME 2000
|
#define REWARD_SPRITE_TIME 2000
|
||||||
|
|
||||||
#define INTERMISSION_DELAY_TIME 1000
|
#define INTERMISSION_DELAY_TIME 1000
|
||||||
#define SP_INTERMISSION_DELAY_TIME 5000
|
#define SP_INTERMISSION_DELAY_TIME 5000
|
||||||
|
|
||||||
// gentity->flags
|
// gentity->flags
|
||||||
#define FL_GODMODE 0x00000010
|
#define FL_GODMODE 0x00000010
|
||||||
#define FL_NOTARGET 0x00000020
|
#define FL_NOTARGET 0x00000020
|
||||||
#define FL_TEAMSLAVE 0x00000400 // not the first on the team
|
#define FL_TEAMSLAVE 0x00000400 // not the first on the team
|
||||||
#define FL_NO_KNOCKBACK 0x00000800
|
#define FL_NO_KNOCKBACK 0x00000800
|
||||||
#define FL_DROPPED_ITEM 0x00001000
|
#define FL_DROPPED_ITEM 0x00001000
|
||||||
#define FL_NO_BOTS 0x00002000 // spawn point not for bot use
|
#define FL_NO_BOTS 0x00002000 // spawn point not for bot use
|
||||||
#define FL_NO_HUMANS 0x00004000 // spawn point just for bots
|
#define FL_NO_HUMANS 0x00004000 // spawn point just for bots
|
||||||
#define FL_FORCE_GESTURE 0x00008000 // force gesture on client
|
#define FL_FORCE_GESTURE 0x00008000 // force gesture on client
|
||||||
//Elder: err - this looks funny... should it be 0x00010000 ?
|
//Elder: err - this looks funny... should it be 0x00010000 ?
|
||||||
//#define FL_THROWN_ITEM 0x00016000 // XRAY FMJ weapon throwing
|
//#define FL_THROWN_ITEM 0x00016000 // XRAY FMJ weapon throwing
|
||||||
#define FL_THROWN_ITEM 0x00010000 // XRAY FMJ weapon throwing
|
#define FL_THROWN_ITEM 0x00010000 // XRAY FMJ weapon throwing
|
||||||
#define FL_RQ3_JUNKITEM 0x00020000 // Elder: the item we want to remove
|
#define FL_RQ3_JUNKITEM 0x00020000 // Elder: the item we want to remove
|
||||||
//Elder: moved to bg_public.h
|
//Elder: moved to bg_public.h
|
||||||
//#define FL_THROWN_KNIFE 0x00040000 // Elder: thrown knife special case
|
//#define FL_THROWN_KNIFE 0x00040000 // Elder: thrown knife special case
|
||||||
|
|
||||||
// movers are things like doors, plats, buttons, etc
|
// movers are things like doors, plats, buttons, etc
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -172,14 +170,11 @@ typedef enum {
|
||||||
ROTATOR_2TO1
|
ROTATOR_2TO1
|
||||||
} moverState_t;
|
} moverState_t;
|
||||||
|
|
||||||
#define SP_PODIUM_MODEL "models/mapobjects/podium/podium4.md3"
|
#define SP_PODIUM_MODEL "models/mapobjects/podium/podium4.md3"
|
||||||
|
|
||||||
#define RQ3_RESPAWNTIME_DEFAULT 60000 // Elder: time for weapons to respawn - up to 60s
|
#define RQ3_RESPAWNTIME_DEFAULT 60000 // Elder: time for weapons to respawn - up to 60s
|
||||||
|
#define SP_AUTOOPEN 4 // Elder: revert to Q3 behaviour
|
||||||
#define SP_AUTOOPEN 4 // Elder: revert to Q3 behaviour
|
#define SP_DOORTOGGLE 8 // Elder: added to enable mover toggling
|
||||||
#define SP_DOORTOGGLE 8 // Elder: added to enable mover toggling
|
#define MAXDOORTIME 100 // Elder: max time the opendoor key can stay open
|
||||||
|
|
||||||
#define MAXDOORTIME 100 // Elder: max time the opendoor key can stay open
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
@ -187,63 +182,52 @@ typedef struct gentity_s gentity_t;
|
||||||
typedef struct gclient_s gclient_t;
|
typedef struct gclient_s gclient_t;
|
||||||
|
|
||||||
struct gentity_s {
|
struct gentity_s {
|
||||||
entityState_t s; // communicated by server to clients
|
entityState_t s; // communicated by server to clients
|
||||||
entityShared_t r; // shared by both the server system and game
|
entityShared_t r; // shared by both the server system and game
|
||||||
|
|
||||||
// DO NOT MODIFY ANYTHING ABOVE THIS, THE SERVER
|
// DO NOT MODIFY ANYTHING ABOVE THIS, THE SERVER
|
||||||
// EXPECTS THE FIELDS IN THAT ORDER!
|
// EXPECTS THE FIELDS IN THAT ORDER!
|
||||||
//================================
|
//================================
|
||||||
|
|
||||||
struct gclient_s *client; // NULL if not a client
|
struct gclient_s *client; // NULL if not a client
|
||||||
|
|
||||||
qboolean inuse;
|
qboolean inuse;
|
||||||
|
char *classname; // set in QuakeEd
|
||||||
char *classname; // set in QuakeEd
|
int spawnflags; // set in QuakeEd
|
||||||
int spawnflags; // set in QuakeEd
|
qboolean neverFree; // if true, FreeEntity will only unlink
|
||||||
|
// bodyque uses this
|
||||||
qboolean neverFree; // if true, FreeEntity will only unlink
|
|
||||||
// bodyque uses this
|
|
||||||
// JBravo: adding func_explosive
|
// JBravo: adding func_explosive
|
||||||
int damage_radius;
|
int damage_radius;
|
||||||
int mass;
|
int mass;
|
||||||
int tension;
|
int tension;
|
||||||
int bounce;
|
int bounce;
|
||||||
int material;
|
int material;
|
||||||
int size;
|
int size;
|
||||||
|
int flags; // FL_* variables
|
||||||
int flags; // FL_* variables
|
|
||||||
|
|
||||||
char *model;
|
char *model;
|
||||||
char *model2;
|
char *model2;
|
||||||
int freetime; // level.time when the object was freed
|
int freetime; // level.time when the object was freed
|
||||||
|
int eventTime; // events will be cleared EVENT_VALID_MSEC after set
|
||||||
int eventTime; // events will be cleared EVENT_VALID_MSEC after set
|
|
||||||
qboolean freeAfterEvent;
|
qboolean freeAfterEvent;
|
||||||
qboolean unlinkAfterEvent;
|
qboolean unlinkAfterEvent;
|
||||||
|
|
||||||
qboolean physicsObject; // if true, it can be pushed by movers and fall off edges
|
qboolean physicsObject; // if true, it can be pushed by movers and fall off edges
|
||||||
// all game items are physicsObjects,
|
// all game items are physicsObjects,
|
||||||
float physicsBounce; // 1.0 = continuous bounce, 0.0 = no bounce
|
float physicsBounce; // 1.0 = continuous bounce, 0.0 = no bounce
|
||||||
int clipmask; // brushes with this content value will be collided against
|
int clipmask; // brushes with this content value will be collided against
|
||||||
// when moving. items and corpses do not collide against
|
// when moving. items and corpses do not collide against
|
||||||
// players, for instance
|
// players, for instance
|
||||||
|
|
||||||
// movers
|
// movers
|
||||||
moverState_t moverState;
|
moverState_t moverState;
|
||||||
int soundPos1;
|
int soundPos1;
|
||||||
int sound1to2;
|
int sound1to2;
|
||||||
int sound2to1;
|
int sound2to1;
|
||||||
int soundPos2;
|
int soundPos2;
|
||||||
int soundLoop;
|
int soundLoop;
|
||||||
gentity_t *parent;
|
gentity_t *parent;
|
||||||
gentity_t *nextTrain;
|
gentity_t *nextTrain;
|
||||||
gentity_t *prevTrain;
|
gentity_t *prevTrain;
|
||||||
vec3_t pos1, pos2;
|
vec3_t pos1, pos2;
|
||||||
|
|
||||||
char *message;
|
char *message;
|
||||||
|
int timestamp; // body queue sinking, etc
|
||||||
int timestamp; // body queue sinking, etc
|
|
||||||
|
|
||||||
float angle; // set in editor, -1 = up, -2 = down
|
float angle; // set in editor, -1 = up, -2 = down
|
||||||
char *target;
|
char *target;
|
||||||
char *targetname;
|
char *targetname;
|
||||||
|
@ -257,7 +241,7 @@ struct gentity_s {
|
||||||
float speed;
|
float speed;
|
||||||
vec3_t movedir;
|
vec3_t movedir;
|
||||||
|
|
||||||
int nextthink;
|
int nextthink;
|
||||||
void (*think)(gentity_t *self);
|
void (*think)(gentity_t *self);
|
||||||
void (*reached)(gentity_t *self); // movers call this when hitting endpoint
|
void (*reached)(gentity_t *self); // movers call this when hitting endpoint
|
||||||
void (*blocked)(gentity_t *self, gentity_t *other);
|
void (*blocked)(gentity_t *self, gentity_t *other);
|
||||||
|
@ -265,46 +249,37 @@ struct gentity_s {
|
||||||
void (*use)(gentity_t *self, gentity_t *other, gentity_t *activator);
|
void (*use)(gentity_t *self, gentity_t *other, gentity_t *activator);
|
||||||
void (*pain)(gentity_t *self, gentity_t *attacker, int damage);
|
void (*pain)(gentity_t *self, gentity_t *attacker, int damage);
|
||||||
void (*die)(gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod);
|
void (*die)(gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod);
|
||||||
|
int pain_debounce_time;
|
||||||
int pain_debounce_time;
|
int fly_sound_debounce_time; // wind tunnel
|
||||||
int fly_sound_debounce_time; // wind tunnel
|
int last_move_time;
|
||||||
int last_move_time;
|
int health;
|
||||||
|
|
||||||
int health;
|
|
||||||
|
|
||||||
qboolean takedamage;
|
qboolean takedamage;
|
||||||
|
int damage;
|
||||||
int damage;
|
int splashDamage; // quad will increase this without increasing radius
|
||||||
int splashDamage; // quad will increase this without increasing radius
|
int splashRadius;
|
||||||
int splashRadius;
|
int methodOfDeath;
|
||||||
int methodOfDeath;
|
int splashMethodOfDeath;
|
||||||
int splashMethodOfDeath;
|
int count;
|
||||||
|
|
||||||
int count;
|
|
||||||
|
|
||||||
gentity_t *chain;
|
gentity_t *chain;
|
||||||
gentity_t *enemy;
|
gentity_t *enemy;
|
||||||
gentity_t *activator;
|
gentity_t *activator;
|
||||||
gentity_t *teamchain; // next entity in team
|
gentity_t *teamchain; // next entity in team
|
||||||
gentity_t *teammaster; // master of the team
|
gentity_t *teammaster; // master of the team
|
||||||
|
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
int kamikazeTime;
|
int kamikazeTime;
|
||||||
int kamikazeShockTime;
|
int kamikazeShockTime;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int watertype;
|
int watertype;
|
||||||
int waterlevel;
|
int waterlevel;
|
||||||
|
int noise_index;
|
||||||
int noise_index;
|
|
||||||
|
|
||||||
// timing variables
|
// timing variables
|
||||||
float wait;
|
float wait;
|
||||||
float random;
|
float random;
|
||||||
|
|
||||||
gitem_t *item; // for bonus items
|
gitem_t *item; // for bonus items
|
||||||
float distance; // VALKYRIE: for rotating door
|
float distance; // VALKYRIE: for rotating door
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,11 +293,9 @@ typedef enum {
|
||||||
SPECTATOR_NOT,
|
SPECTATOR_NOT,
|
||||||
SPECTATOR_FREE,
|
SPECTATOR_FREE,
|
||||||
SPECTATOR_FOLLOW,
|
SPECTATOR_FOLLOW,
|
||||||
#ifdef __ZCAM__
|
|
||||||
SPECTATOR_ZCAM,
|
SPECTATOR_ZCAM,
|
||||||
SPECTATOR_CAMERA_FLIC,
|
SPECTATOR_CAMERA_FLIC,
|
||||||
SPECTATOR_CAMERA_SWING,
|
SPECTATOR_CAMERA_SWING,
|
||||||
#endif
|
|
||||||
SPECTATOR_SCOREBOARD
|
SPECTATOR_SCOREBOARD
|
||||||
} spectatorState_t;
|
} spectatorState_t;
|
||||||
|
|
||||||
|
@ -333,16 +306,13 @@ typedef enum {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
playerTeamStateState_t state;
|
playerTeamStateState_t state;
|
||||||
|
int location;
|
||||||
int location;
|
int captures;
|
||||||
|
int basedefense;
|
||||||
int captures;
|
int carrierdefense;
|
||||||
int basedefense;
|
int flagrecovery;
|
||||||
int carrierdefense;
|
int fragcarrier;
|
||||||
int flagrecovery;
|
int assists;
|
||||||
int fragcarrier;
|
|
||||||
int assists;
|
|
||||||
|
|
||||||
float lasthurtcarrier;
|
float lasthurtcarrier;
|
||||||
float lastreturnedflag;
|
float lastreturnedflag;
|
||||||
float flagsince;
|
float flagsince;
|
||||||
|
@ -359,60 +329,56 @@ typedef struct {
|
||||||
// time and reading them back at connection time. Anything added here
|
// time and reading them back at connection time. Anything added here
|
||||||
// MUST be dealt with in G_InitSessionData() / G_ReadSessionData() / G_WriteSessionData()
|
// MUST be dealt with in G_InitSessionData() / G_ReadSessionData() / G_WriteSessionData()
|
||||||
typedef struct {
|
typedef struct {
|
||||||
team_t sessionTeam;
|
team_t sessionTeam;
|
||||||
team_t savedTeam; // JBravo: Used to hold the real team status of a player.
|
team_t savedTeam; // JBravo: Used to hold the real team status of a player.
|
||||||
int spectatorTime; // for determining next-in-line to play
|
int spectatorTime; // for determining next-in-line to play
|
||||||
spectatorState_t spectatorState;
|
spectatorState_t spectatorState;
|
||||||
int spectatorClient; // for chasecam and follow mode
|
int spectatorClient; // for chasecam and follow mode
|
||||||
int wins, losses; // tournament stats
|
int wins, losses; // tournament stats
|
||||||
qboolean teamLeader; // true when this client is a team leader
|
qboolean teamLeader; // true when this client is a team leader
|
||||||
gentity_t *spawnPoint; // JBravo: This players spawnpoint
|
gentity_t *spawnPoint; // JBravo: This players spawnpoint
|
||||||
qboolean teamSpawn; // JBravo: This player is being spawned with his team.
|
qboolean teamSpawn; // JBravo: This player is being spawned with his team.
|
||||||
} clientSession_t;
|
} clientSession_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
#define MAX_NETNAME 36
|
#define MAX_NETNAME 36
|
||||||
#define MAX_VOTE_COUNT 3
|
#define MAX_VOTE_COUNT 3
|
||||||
|
|
||||||
// client data that stays across multiple respawns, but is cleared
|
// client data that stays across multiple respawns, but is cleared
|
||||||
// on each level change or team change at ClientBegin()
|
// on each level change or team change at ClientBegin()
|
||||||
typedef struct {
|
typedef struct {
|
||||||
//Slicer: Matchmode
|
//Slicer: Matchmode
|
||||||
team_t captain;
|
team_t captain;
|
||||||
team_t sub;
|
team_t sub;
|
||||||
clientConnected_t connected;
|
clientConnected_t connected;
|
||||||
// aasimon: No Need for this here, using a cvar to record the clientnumber of referee, so that map_restarts dont change
|
// aasimon: No Need for this here, using a cvar to record the clientnumber of referee, so that map_restarts dont change
|
||||||
// the referee
|
// the referee
|
||||||
// qboolean referee;
|
// qboolean referee;
|
||||||
|
|
||||||
usercmd_t cmd; // we would lose angles if not persistant
|
usercmd_t cmd; // we would lose angles if not persistant
|
||||||
qboolean localClient; // true if "ip" info key is "localhost"
|
qboolean localClient; // true if "ip" info key is "localhost"
|
||||||
qboolean initialSpawn; // the first spawn should be at a cool location
|
qboolean initialSpawn; // the first spawn should be at a cool location
|
||||||
qboolean predictItemPickup; // based on cg_predictItems userinfo
|
qboolean predictItemPickup; // based on cg_predictItems userinfo
|
||||||
qboolean pmoveFixed; //
|
qboolean pmoveFixed; //
|
||||||
char netname[MAX_NETNAME];
|
char netname[MAX_NETNAME];
|
||||||
int maxHealth; // for handicapping
|
int maxHealth; // for handicapping
|
||||||
int enterTime; // level.time the client entered the game
|
int enterTime; // level.time the client entered the game
|
||||||
playerTeamState_t teamState; // status in teamplay games
|
playerTeamState_t teamState; // status in teamplay games
|
||||||
int voteCount; // to prevent people from constantly calling votes
|
int voteCount; // to prevent people from constantly calling votes
|
||||||
int teamVoteCount; // to prevent people from constantly calling votes
|
int teamVoteCount; // to prevent people from constantly calling votes
|
||||||
qboolean teamInfo; // send team overlay updates?
|
qboolean teamInfo; // send team overlay updates?
|
||||||
|
|
||||||
qboolean hadUniqueWeapon[MAX_WEAPONS]; //Elder: for "ammo" in last gun
|
qboolean hadUniqueWeapon[MAX_WEAPONS]; //Elder: for "ammo" in last gun
|
||||||
|
|
||||||
int sayTime; // Elder: say validation stuff
|
int sayTime; // Elder: say validation stuff
|
||||||
int sayCount;
|
int sayCount;
|
||||||
int sayWarnings;
|
int sayWarnings;
|
||||||
int sayBans;
|
int sayBans;
|
||||||
int sayMuteTime;
|
int sayMuteTime;
|
||||||
qboolean sayModerated; // so warnings are not repeated for multi-line, same-frame messages
|
qboolean sayModerated; // so warnings are not repeated for multi-line, same-frame messages
|
||||||
|
int records[REC_NUM_RECORDS]; // Elder: for our statistics tracking
|
||||||
int records[REC_NUM_RECORDS]; // Elder: for our statistics tracking
|
|
||||||
} clientPersistant_t;
|
} clientPersistant_t;
|
||||||
|
|
||||||
#ifdef __ZCAM__
|
|
||||||
struct camera_s;
|
struct camera_s;
|
||||||
#endif /* __ZCAM__ */
|
|
||||||
|
|
||||||
// Elder: spam prevention defaults
|
// Elder: spam prevention defaults
|
||||||
/*
|
/*
|
||||||
|
@ -441,155 +407,106 @@ typedef enum
|
||||||
// except for 'client->pers' and 'client->sess'
|
// except for 'client->pers' and 'client->sess'
|
||||||
struct gclient_s {
|
struct gclient_s {
|
||||||
// ps MUST be the first element, because the server expects it
|
// ps MUST be the first element, because the server expects it
|
||||||
playerState_t ps; // communicated by server to clients
|
playerState_t ps; // communicated by server to clients
|
||||||
|
|
||||||
// the rest of the structure is private to game
|
// the rest of the structure is private to game
|
||||||
clientPersistant_t pers;
|
clientPersistant_t pers;
|
||||||
clientSession_t sess;
|
clientSession_t sess;
|
||||||
|
qboolean readyToExit; // wishes to leave the intermission
|
||||||
qboolean readyToExit; // wishes to leave the intermission
|
qboolean noclip;
|
||||||
|
|
||||||
qboolean noclip;
|
|
||||||
|
|
||||||
int lastCmdTime; // level.time of last usercmd_t, for EF_CONNECTION
|
int lastCmdTime; // level.time of last usercmd_t, for EF_CONNECTION
|
||||||
// we can't just use pers.lastCommand.time, because
|
// we can't just use pers.lastCommand.time, because
|
||||||
// of the g_sycronousclients case
|
// of the g_sycronousclients case
|
||||||
int buttons;
|
int buttons;
|
||||||
int oldbuttons;
|
int oldbuttons;
|
||||||
int latched_buttons;
|
int latched_buttons;
|
||||||
|
vec3_t oldOrigin;
|
||||||
vec3_t oldOrigin;
|
|
||||||
|
|
||||||
// sum up damage over an entire frame, so
|
// sum up damage over an entire frame, so
|
||||||
// shotgun blasts give a single big kick
|
// shotgun blasts give a single big kick
|
||||||
int damage_armor; // damage absorbed by armor
|
int damage_armor; // damage absorbed by armor
|
||||||
int damage_blood; // damage taken out of health
|
int damage_blood; // damage taken out of health
|
||||||
int damage_knockback; // impact damage
|
int damage_knockback; // impact damage
|
||||||
vec3_t damage_from; // origin for vector calculation
|
vec3_t damage_from; // origin for vector calculation
|
||||||
qboolean damage_fromWorld; // if true, don't use the damage_from vector
|
qboolean damage_fromWorld; // if true, don't use the damage_from vector
|
||||||
//qboolean damage_vest; // Elder: if true, play the vest-hit sound
|
//qboolean damage_vest; // Elder: if true, play the vest-hit sound
|
||||||
|
|
||||||
int accurateCount; // for "impressive" reward sound
|
int accurateCount; // for "impressive" reward sound
|
||||||
|
|
||||||
int accuracy_shots; // total number of shots
|
int accuracy_shots; // total number of shots
|
||||||
int accuracy_hits; // total number of hits
|
int accuracy_hits; // total number of hits
|
||||||
//Blaze: For weapon stats
|
|
||||||
//Will need to pass these along in g_client to the new client after spawn
|
|
||||||
// Elder: to be merged into rq3Record_t for more comprehensive tracking
|
|
||||||
/*
|
|
||||||
int knifeShots;
|
|
||||||
int knifeHits;
|
|
||||||
int mk23Shots;
|
|
||||||
int mk23Hits;
|
|
||||||
int m4Shots;
|
|
||||||
int m4Hits;
|
|
||||||
int mp5Shots;
|
|
||||||
int mp5Hits;
|
|
||||||
int m3Shots;
|
|
||||||
int m3Hits;
|
|
||||||
int hcShots;
|
|
||||||
int hcHits;
|
|
||||||
int ssgShots;
|
|
||||||
int ssgHits;
|
|
||||||
int akimboShots;
|
|
||||||
int akimboHits;
|
|
||||||
int grenShots;
|
|
||||||
int grenHits;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// int lastkilled_client; // last client that this client killed
|
|
||||||
gentity_t *lastkilled_client[5]; // JBravo: last 5 clients that this client killed
|
gentity_t *lastkilled_client[5]; // JBravo: last 5 clients that this client killed
|
||||||
int num_kills; // JBravo: Number of killed players in TP.
|
int num_kills; // JBravo: Number of killed players in TP.
|
||||||
int lasthurt_client; // last client that damaged this client
|
int lasthurt_client; // last client that damaged this client
|
||||||
int lasthurt_mod; // type of damage the client did
|
int lasthurt_mod; // type of damage the client did
|
||||||
//Slicer
|
//Slicer
|
||||||
int weapon_attempts;
|
int weapon_attempts;
|
||||||
qboolean weapon_after_bandage_warned;
|
qboolean weapon_after_bandage_warned;
|
||||||
|
|
||||||
// Begin Duffman
|
// Begin Duffman
|
||||||
int lasthurt_location; // Where the client was hit.
|
int lasthurt_location; // Where the client was hit.
|
||||||
// End Duffman
|
// End Duffman
|
||||||
|
|
||||||
// timers
|
// timers
|
||||||
int respawnTime; // can respawn when time > this, force after g_forcerespwan
|
int respawnTime; // can respawn when time > this, force after g_forcerespwan
|
||||||
int inactivityTime; // kick players when time > this
|
int inactivityTime; // kick players when time > this
|
||||||
qboolean inactivityWarning; // qtrue if the five seoond warning has been given
|
qboolean inactivityWarning; // qtrue if the five seoond warning has been given
|
||||||
int rewardTime; // clear the EF_AWARD_IMPRESSIVE, etc when time > this
|
int rewardTime; // clear the EF_AWARD_IMPRESSIVE, etc when time > this
|
||||||
|
|
||||||
int airOutTime;
|
int airOutTime;
|
||||||
|
|
||||||
int lastKillTime; // for multiple kill rewards
|
int lastKillTime; // for multiple kill rewards
|
||||||
|
qboolean fireHeld; // used for hook
|
||||||
qboolean fireHeld; // used for hook
|
gentity_t *hook; // grapple hook if out
|
||||||
gentity_t *hook; // grapple hook if out
|
int switchTeamTime; // time the player switched teams
|
||||||
|
|
||||||
int switchTeamTime; // time the player switched teams
|
|
||||||
// Begin Duffman
|
// Begin Duffman
|
||||||
int numClips[MAX_WEAPONS]; // Number of clips each weapon has
|
int numClips[MAX_WEAPONS]; // Number of clips each weapon has
|
||||||
// End Duffman
|
// End Duffman
|
||||||
int weaponCount[WP_NUM_WEAPONS]; // Elder: for duplicate unique weapon tracking
|
int weaponCount[WP_NUM_WEAPONS]; // Elder: for duplicate unique weapon tracking
|
||||||
|
int openDoor; //Blaze: used to hold if someone has hit opendoor key
|
||||||
int openDoor; //Blaze: used to hold if someone has hit opendoor key
|
|
||||||
int openDoorTime;
|
int openDoorTime;
|
||||||
|
|
||||||
// timeResidual is used to handle events that happen every second
|
// timeResidual is used to handle events that happen every second
|
||||||
// like health / armor countdowns and regeneration
|
// like health / armor countdowns and regeneration
|
||||||
int timeResidual;
|
int timeResidual;
|
||||||
|
|
||||||
//Elder: C3A laser tutorial
|
//Elder: C3A laser tutorial
|
||||||
gentity_t *lasersight; // lasersight OR flashlight if in use
|
gentity_t *lasersight; // lasersight OR flashlight if in use
|
||||||
|
|
||||||
// Bleeding server-only cvars
|
// Bleeding server-only cvars
|
||||||
int bleeding; // Blaze: remaining points to bleed away
|
int bleeding; // Blaze: remaining points to bleed away
|
||||||
int bleed_remain; // Blaze: How much left to bleed
|
int bleed_remain; // Blaze: How much left to bleed
|
||||||
int bleedloc; // Blaze: Where are we bleeding
|
int bleedloc; // Blaze: Where are we bleeding
|
||||||
vec3_t bleedloc_offset; // Blaze: location of bleeding (from origin)
|
vec3_t bleedloc_offset; // Blaze: location of bleeding (from origin)
|
||||||
int bleed_delay; // Elder: time for next spurt of blood
|
int bleed_delay; // Elder: time for next spurt of blood
|
||||||
vec3_t bleednorm;
|
vec3_t bleednorm;
|
||||||
//qboolean isBleeding; // Blaze: is client bleeding
|
//qboolean isBleeding; // Blaze: is client bleeding
|
||||||
// int legDamage; // Blaze: Client has leg damage - holds number of hits too
|
// int legDamage; // Blaze: Client has leg damage - holds number of hits too
|
||||||
int bleedtick; // Blaze: Holds # of seconds till bleeding stops.
|
int bleedtick; // Blaze: Holds # of seconds till bleeding stops.
|
||||||
int bleedBandageCount; // Elder: hack to restrict amount of bleeding to 3 points
|
int bleedBandageCount; // Elder: hack to restrict amount of bleeding to 3 points
|
||||||
int headShotTime; // Elder: got headshot?
|
int headShotTime; // Elder: got headshot?
|
||||||
|
|
||||||
//Elder: server only needs to know for sniper spread - ARGH
|
//Elder: server only needs to know for sniper spread - ARGH
|
||||||
// int zoomed; // Hawkins (SSG zoom)
|
// int zoomed; // Hawkins (SSG zoom)
|
||||||
//qboolean semi; // hawkins (semiauto mode for m4, mp5, pistol)
|
//qboolean semi; // hawkins (semiauto mode for m4, mp5, pistol)
|
||||||
int shots; // Blaze: Number of shots fired so far with this weapon
|
int shots; // Blaze: Number of shots fired so far with this weapon
|
||||||
|
int weaponfireNextTime; // for akimbos
|
||||||
int weaponfireNextTime; // for akimbos
|
int lastzoom; // Elder: save last zoom state when firing
|
||||||
int lastzoom; // Elder: save last zoom state when firing
|
|
||||||
|
|
||||||
// These are now obsolete with the new reload code
|
// These are now obsolete with the new reload code
|
||||||
int fastReloads; // Elder: for queuing M3/SSG reloads
|
int fastReloads; // Elder: for queuing M3/SSG reloads
|
||||||
int lastReloadTime; // Elder: for queuing M3/SSG reloads
|
int lastReloadTime; // Elder: for queuing M3/SSG reloads
|
||||||
int reloadAttempts; // Elder: for queuing M3/SSG reloads
|
int reloadAttempts; // Elder: for queuing M3/SSG reloads
|
||||||
int reloadStage; // Elder: 0, 1, 2 for sound queuing - move to stats?
|
int reloadStage; // Elder: 0, 1, 2 for sound queuing - move to stats?
|
||||||
|
int consecutiveShots; // Elder: for M4 ride-up/kick
|
||||||
int consecutiveShots; // Elder: for M4 ride-up/kick
|
int uniqueWeapons; // Elder: formerly a stat, now just a server var
|
||||||
int uniqueWeapons; // Elder: formerly a stat, now just a server var
|
|
||||||
int uniqueItems;
|
int uniqueItems;
|
||||||
int killStreak; // Elder: replaces the old STAT_STREAK
|
int killStreak; // Elder: replaces the old STAT_STREAK
|
||||||
qboolean kevlarHit; // Elder: kevlar hit -- FIXME: poor implementation
|
qboolean kevlarHit; // Elder: kevlar hit -- FIXME: poor implementation
|
||||||
int knife_sound; // NiceAss: What did the player hit while slashing?
|
int knife_sound; // NiceAss: What did the player hit while slashing?
|
||||||
|
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
gentity_t *persistantPowerup;
|
gentity_t *persistantPowerup;
|
||||||
int portalID;
|
int portalID;
|
||||||
int ammoTimes[WP_NUM_WEAPONS];
|
int ammoTimes[WP_NUM_WEAPONS];
|
||||||
int invulnerabilityTime;
|
int invulnerabilityTime;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *areabits;
|
char *areabits;
|
||||||
#ifdef __ZCAM__
|
struct camera_s *camera;
|
||||||
struct camera_s *camera;
|
|
||||||
#endif /* __ZCAM__ */
|
|
||||||
// JBravo adding TP stuff
|
// JBravo adding TP stuff
|
||||||
int specMode;
|
int specMode;
|
||||||
int teamplayWeapon;
|
int teamplayWeapon;
|
||||||
int teamplayItem;
|
int teamplayItem;
|
||||||
int radioGender;
|
int radioGender;
|
||||||
qboolean radioOff;
|
qboolean radioOff;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -603,109 +520,96 @@ struct gclient_s {
|
||||||
//
|
//
|
||||||
// this structure is cleared as each map is entered
|
// this structure is cleared as each map is entered
|
||||||
//
|
//
|
||||||
#define MAX_SPAWN_VARS 64
|
#define MAX_SPAWN_VARS 64
|
||||||
#define MAX_SPAWN_VARS_CHARS 4096
|
#define MAX_SPAWN_VARS_CHARS 4096
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct gclient_s *clients; // [maxclients]
|
struct gclient_s *clients; // [maxclients]
|
||||||
|
|
||||||
struct gentity_s *gentities;
|
struct gentity_s *gentities;
|
||||||
int gentitySize;
|
int gentitySize;
|
||||||
int num_entities; // current number, <= MAX_GENTITIES
|
int num_entities; // current number, <= MAX_GENTITIES
|
||||||
|
int warmupTime; // restart match at this time
|
||||||
int warmupTime; // restart match at this time
|
fileHandle_t logFile;
|
||||||
|
|
||||||
fileHandle_t logFile;
|
|
||||||
|
|
||||||
// store latched cvars here that we want to get at often
|
// store latched cvars here that we want to get at often
|
||||||
int maxclients;
|
int maxclients;
|
||||||
|
|
||||||
int framenum;
|
int framenum;
|
||||||
int time; // in msec
|
int time; // in msec
|
||||||
int previousTime; // so movers can back up when blocked
|
int previousTime; // so movers can back up when blocked
|
||||||
|
int startTime; // level.time the map was started
|
||||||
int startTime; // level.time the map was started
|
|
||||||
|
|
||||||
int teamScores[TEAM_NUM_TEAMS];
|
int teamScores[TEAM_NUM_TEAMS];
|
||||||
int lastTeamLocationTime; // last time of client team location update
|
int lastTeamLocationTime; // last time of client team location update
|
||||||
|
qboolean newSession; // don't use any old session data, because
|
||||||
qboolean newSession; // don't use any old session data, because
|
// we changed gametype
|
||||||
// we changed gametype
|
qboolean restarted; // waiting for a map_restart to fire
|
||||||
|
|
||||||
qboolean restarted; // waiting for a map_restart to fire
|
|
||||||
|
|
||||||
int numConnectedClients;
|
int numConnectedClients;
|
||||||
int numNonSpectatorClients; // includes connecting clients
|
int numNonSpectatorClients; // includes connecting clients
|
||||||
int numPlayingClients; // connected, non-spectators
|
int numPlayingClients; // connected, non-spectators
|
||||||
int sortedClients[MAX_CLIENTS]; // sorted by score
|
int sortedClients[MAX_CLIENTS]; // sorted by score
|
||||||
int follow1, follow2; // clientNums for auto-follow spectators
|
int follow1, follow2; // clientNums for auto-follow spectators
|
||||||
|
int snd_fry; // sound index for standing in lava
|
||||||
int snd_fry; // sound index for standing in lava
|
|
||||||
|
|
||||||
int warmupModificationCount; // for detecting if g_warmup is changed
|
int warmupModificationCount; // for detecting if g_warmup is changed
|
||||||
|
|
||||||
// voting state
|
// voting state
|
||||||
char voteString[MAX_STRING_CHARS];
|
char voteString[MAX_STRING_CHARS];
|
||||||
char voteDisplayString[MAX_STRING_CHARS];
|
char voteDisplayString[MAX_STRING_CHARS];
|
||||||
int voteTime; // level.time vote was called
|
int voteTime; // level.time vote was called
|
||||||
int voteExecuteTime; // time the vote is executed
|
int voteExecuteTime; // time the vote is executed
|
||||||
int voteYes;
|
int voteYes;
|
||||||
int voteNo;
|
int voteNo;
|
||||||
int numVotingClients; // set by CalculateRanks
|
int numVotingClients; // set by CalculateRanks
|
||||||
|
|
||||||
// team voting state
|
// team voting state
|
||||||
char teamVoteString[2][MAX_STRING_CHARS];
|
char teamVoteString[2][MAX_STRING_CHARS];
|
||||||
int teamVoteTime[2]; // level.time vote was called
|
int teamVoteTime[2]; // level.time vote was called
|
||||||
int teamVoteYes[2];
|
int teamVoteYes[2];
|
||||||
int teamVoteNo[2];
|
int teamVoteNo[2];
|
||||||
int numteamVotingClients[2];// set by CalculateRanks
|
int numteamVotingClients[2];// set by CalculateRanks
|
||||||
|
|
||||||
// spawn variables
|
// spawn variables
|
||||||
qboolean spawning; // the G_Spawn*() functions are valid
|
qboolean spawning; // the G_Spawn*() functions are valid
|
||||||
int numSpawnVars;
|
int numSpawnVars;
|
||||||
char *spawnVars[MAX_SPAWN_VARS][2]; // key / value pairs
|
char *spawnVars[MAX_SPAWN_VARS][2]; // key / value pairs
|
||||||
int numSpawnVarChars;
|
int numSpawnVarChars;
|
||||||
char spawnVarChars[MAX_SPAWN_VARS_CHARS];
|
char spawnVarChars[MAX_SPAWN_VARS_CHARS];
|
||||||
|
|
||||||
// intermission state
|
// intermission state
|
||||||
int intermissionQueued; // intermission was qualified, but
|
int intermissionQueued; // intermission was qualified, but
|
||||||
// wait INTERMISSION_DELAY_TIME before
|
// wait INTERMISSION_DELAY_TIME before
|
||||||
// actually going there so the last
|
// actually going there so the last
|
||||||
// frag can be watched. Disable future
|
// frag can be watched. Disable future
|
||||||
// kills during this delay
|
// kills during this delay
|
||||||
int intermissiontime; // time the intermission was started
|
int intermissiontime; // time the intermission was started
|
||||||
char *changemap;
|
char *changemap;
|
||||||
qboolean readyToExit; // at least one client wants to exit
|
qboolean readyToExit; // at least one client wants to exit
|
||||||
int exitTime;
|
int exitTime;
|
||||||
vec3_t intermission_origin; // also used for spectator spawns
|
vec3_t intermission_origin; // also used for spectator spawns
|
||||||
vec3_t intermission_angle;
|
vec3_t intermission_angle;
|
||||||
|
|
||||||
qboolean locationLinked; // target_locations get linked
|
qboolean locationLinked; // target_locations get linked
|
||||||
gentity_t *locationHead; // head of the location list
|
gentity_t *locationHead; // head of the location list
|
||||||
int bodyQueIndex; // dead bodies
|
int bodyQueIndex; // dead bodies
|
||||||
gentity_t *bodyQue[BODY_QUEUE_SIZE];
|
gentity_t *bodyQue[BODY_QUEUE_SIZE];
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
int portalSequence;
|
int portalSequence;
|
||||||
#endif
|
#endif
|
||||||
// Slicer: Matchmode
|
// Slicer: Matchmode
|
||||||
float matchTime;
|
float matchTime;
|
||||||
qboolean inGame;
|
qboolean inGame;
|
||||||
// JBravo adding TP
|
// JBravo adding TP
|
||||||
int lights_camera_action;
|
int lights_camera_action;
|
||||||
qboolean team_round_going;
|
qboolean team_round_going;
|
||||||
int holding_on_tie_check;
|
int holding_on_tie_check;
|
||||||
int team_round_countdown;
|
int team_round_countdown;
|
||||||
qboolean team_game_going;
|
qboolean team_game_going;
|
||||||
int rulecheckfrequency;
|
int rulecheckfrequency;
|
||||||
int current_round_length;
|
int current_round_length;
|
||||||
qboolean spawnPointsLocated;
|
qboolean spawnPointsLocated;
|
||||||
gentity_t *team1spawnpoint;
|
gentity_t *team1spawnpoint;
|
||||||
gentity_t *team2spawnpoint;
|
gentity_t *team2spawnpoint;
|
||||||
vec3_t team1spawn_origin;
|
vec3_t team1spawn_origin;
|
||||||
vec3_t team1spawn_angles;
|
vec3_t team1spawn_angles;
|
||||||
vec3_t team2spawn_origin;
|
vec3_t team2spawn_origin;
|
||||||
vec3_t team2spawn_angles;
|
vec3_t team2spawn_angles;
|
||||||
int fps;
|
int fps;
|
||||||
} level_locals_t;
|
} level_locals_t;
|
||||||
//
|
//
|
||||||
// rxn_game.c
|
// rxn_game.c
|
||||||
|
|
Loading…
Reference in a new issue