Added Team Tactics features

This commit is contained in:
OM 2023-05-21 19:58:32 +02:00
parent 3933e63044
commit 7085d60d02
5 changed files with 105 additions and 15 deletions

View file

@ -297,15 +297,21 @@ typedef struct {
qboolean testGun;
// farplane parameters
float farplane_distance;
float farplane_distance;
float farplane_bias;
vec3_t farplane_color;
qboolean farplane_cull;
qboolean farplane_cull;
int skyboxFarplane;
qboolean renderTerrain;
float farclipOverride;
vec3_t farplaneColorOverride;
// portal sky parameters
qboolean sky_portal;
float sky_alpha;
vec3_t sky_origin;
vec3_t sky_axis[3]; // rotation vectors
vec3_t sky_axis[3]; // rotation vectors
int skyboxSpeed;
// weapon viewkick recoil
float viewkick[2];
@ -371,8 +377,9 @@ typedef struct {
int fraglimit;
int timelimit;
int maxclients;
int cinematic;
char mapname[MAX_QPATH];
int cinematic;
int mapChecksum;
char mapname[MAX_QPATH];
//
// locally derived information from gamestate
@ -475,6 +482,7 @@ int CG_LastAttacker( void );
void CG_Init( clientGameImport_t *imported, int serverMessageNum, int serverCommandSequence, int clientNum );
void CG_Shutdown( void );
void CG_ServerRestarted( void );
void CG_ParseFogInfo(const char* str);
//
// cg_modelanim.cpp

View file

@ -303,6 +303,7 @@ typedef struct {
int framecount;
int frametime; // msec since last frame
float serverFrameTime;
int realtime; // ignores pause
int realFrametime; // ignoring pause, so console always works

View file

@ -66,6 +66,34 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define CS_MOTD 4 // g_motd string for server message of the day
#define CS_WARMUP 5 // server time when the match will be restarted
#if TARGET_GAME_PROTOCOL >= 15
#define CS_MUSIC 6 // MUSIC_NewSoundtrack(cs)
#define CS_FOGINFO 7 // cg.farplane_cull cg.farplane_distance cg.farplane_color[3]
#define CS_SKYINFO 8 // cg.sky_alpha cg.sky_portal
#define CS_GAME_VERSION 9
#define CS_LEVEL_START_TIME 10 // so the timer only shows the current level cgs.levelStartTime
#define CS_CURRENT_OBJECTIVE 11
#define CS_RAIN_DENSITY 12 // cg.rain
#define CS_RAIN_SPEED 13
#define CS_RAIN_SPEEDVARY 14
#define CS_RAIN_SLANT 15
#define CS_RAIN_LENGTH 16
#define CS_RAIN_MINDIST 17
#define CS_RAIN_WIDTH 18
#define CS_RAIN_SHADER 19
#define CS_RAIN_NUMSHADERS 20
#define CS_VOTE_TIME 21
#define CS_VOTE_STRING 22
#define CS_VOTE_YES 23
#define CS_VOTE_NO 24
#define CS_VOTE_UNDECIDED 25
#else
#define CS_MUSIC 8 // MUSIC_NewSoundtrack(cs)
#define CS_FOGINFO 9 // cg.farplane_cull cg.farplane_distance cg.farplane_color[3]
#define CS_SKYINFO 10 // cg.sky_alpha cg.sky_portal
@ -85,6 +113,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define CS_RAIN_SHADER 21
#define CS_RAIN_NUMSHADERS 22
#endif
#define CS_MATCHEND 26 // cgs.matchEndTime
#define CS_MODELS 32
@ -98,11 +128,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define CS_PLAYERS (CS_LIGHTSTYLES+MAX_LIGHTSTYLES) // 1684
#define CS_WEAPONS (CS_PLAYERS+MAX_CLIENTS) // su44 was here
#define CS_TEAMS 1876
#define CS_GENERAL_STRINGS 1877
#define CS_SPECTATORS 1878
#define CS_ALLIES 1879
#define CS_AXIS 1880
#define CS_TEAMS 1892
#define CS_GENERAL_STRINGS 1893
#define CS_SPECTATORS 1894
#define CS_ALLIES 1895
#define CS_AXIS 1896
#define CS_SOUNDTRACK 1881
#define CS_TEAMINFO 1
@ -528,6 +558,15 @@ extern const char *means_of_death_strings[];
#define DF_NO_DROP_WEAPONS (1<<16)
#define DF_NO_FOOTSTEPS (1<<17)
#define DF_WEAPON_LANDMINE_ALWAYS (1<<21)
#define DF_WEAPON_NO_RIFLE (1<<22)
#define DF_WEAPON_NO_SNIPER (1<<23)
#define DF_WEAPON_NO_SMG (1<<24)
#define DF_WEAPON_NO_MG (1<<25)
#define DF_WEAPON_NO_ROCKET (1<<26)
#define DF_WEAPON_NO_SHOTGUN (1<<27)
#define DF_WEAPON_NO_LANDMINE (1<<28)
#define DM_FLAG( flag ) ( g_gametype->integer && ( ( int )dmflags->integer & ( flag ) ) )
// content masks
@ -612,7 +651,49 @@ typedef enum {
void BG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t result );
void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap );
void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap );
void BG_PlayerStateToEntityStateExtraPolate(playerState_t* ps, entityState_t* s, int time, qboolean snap);
#if TARGET_GAME_PROTOCOL >= 15
enum vmAnim_e {
VM_ANIM_DISABLED,
VM_ANIM_IDLE,
VM_ANIM_CHARGE,
VM_ANIM_FIRE,
VM_ANIM_FIRE_SECONDARY,
VM_ANIM_RECHAMBER,
VM_ANIM_RELOAD,
VM_ANIM_RELOAD_SINGLE,
VM_ANIM_RELOAD_END,
VM_ANIM_PULLOUT,
VM_ANIM_PUTAWAY,
VM_ANIM_LADDERSTEP,
VM_ANIM_IDLE_0,
VM_ANIM_IDLE_1,
VM_ANIM_IDLE_2,
};
#else
enum vmAnim_e {
VM_ANIM_IDLE,
VM_ANIM_CHARGE,
VM_ANIM_FIRE,
VM_ANIM_FIRE_SECONDARY,
VM_ANIM_RECHAMBER,
VM_ANIM_RELOAD,
VM_ANIM_RELOAD_SINGLE,
VM_ANIM_RELOAD_END,
VM_ANIM_PULLOUT,
VM_ANIM_PUTAWAY,
VM_ANIM_LADDERSTEP
VM_ANIM_IDLE_0,
VM_ANIM_IDLE_1,
VM_ANIM_IDLE_2,
VM_ANIM_DISABLED,
};
#endif
#ifdef __cplusplus
}

View file

@ -468,8 +468,8 @@ typedef struct {
// little-endian "2015"
#define BSP_BETA_VERSION 18 // Beta Allied Assault
#define BSP_BASE_VERSION 19 // vanilla Allied Assault
#define BSP_VERSION 19 // current Allied Assault
#define BSP_MIN_VERSION 18 // Beta Allied Assault
#define BSP_MAX_VERSION 21 // Breakthrough
// there shouldn't be any problem with increasing these values at the

View file

@ -2233,9 +2233,9 @@ void RE_LoadWorldMap( const char *name ) {
c_gridVerts = 0;
i = LittleLong(header.version);
if (i < BSP_BASE_VERSION || i > BSP_VERSION) {
if (i < BSP_MIN_VERSION || i > BSP_MAX_VERSION) {
ri.Error(ERR_DROP, "RE_LoadWorldMap: %s has wrong version number (%i should be between %i and %i)",
name, i, BSP_BASE_VERSION, BSP_VERSION);
name, i, BSP_MIN_VERSION, BSP_MAX_VERSION);
}
// load into heap