From bdf314dec20e13f9621717ab4bbe2f077090298f Mon Sep 17 00:00:00 2001 From: Razish Date: Mon, 12 Feb 2024 19:55:47 +1100 Subject: [PATCH 1/3] move BASE_COMPAT flag behind cmake option BuildMPWithCompatMode, add g_fixWeaponAttackAnim making use of CS_LEGACY_FIXES --- CMakeLists.txt | 11 +- codemp/cgame/cg_event.c | 2 - codemp/cgame/cg_main.c | 1 + codemp/cgame/cg_players.c | 8 +- codemp/cgame/cg_servercmds.c | 3 +- codemp/cgame/cg_weapons.c | 10 +- codemp/game/NPC_AI_GalakMech.c | 8 +- codemp/game/bg_misc.c | 36 ++++- codemp/game/bg_pmove.c | 4 +- codemp/game/bg_public.h | 14 +- codemp/game/bg_saga.c | 6 +- codemp/game/g_active.c | 16 +- codemp/game/g_combat.c | 18 +-- codemp/game/g_cvar.c | 21 ++- codemp/game/g_xcvar.h | 277 +++++++++++++++++---------------- codemp/qcommon/q_shared.h | 4 - 16 files changed, 226 insertions(+), 213 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d32ed22ab8..857e171c4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,8 @@ option(BuildMPGame "Whether to create projects for the MP server-side gamecode ( option(BuildMPCGame "Whether to create projects for the MP clientside gamecode (cgamex86.dll)" ON) option(BuildMPUI "Whether to create projects for the MP UI code (uix86.dll)" ON) option(BuildMPRend2 "Whether to create projects for the EXPERIMENTAL MP rend2 renderer (rd-rend2_x86.dll)" ON) +option(BuildMPWithCompatMode "Build MP modules to be network-compatible with legacy clients/servers" ON) + option(BuildSPEngine "Whether to create projects for the SP engine (openjk_sp.exe)" ON) option(BuildSPGame "Whether to create projects for the SP gamecode (jagamex86.dll)" ON) option(BuildSPRdVanilla "Whether to create projects for the SP default renderer (rdsp-vanilla_x86.dll)" ON) @@ -193,11 +195,11 @@ if(WIN64) endif() if (APPLE) - set(SharedDefines "MACOS_X") + set(SharedDefines ${SharedDefines} "MACOS_X") endif() if (NOT WIN32 AND NOT APPLE) - set(SharedDefines "ARCH_STRING=\"${Architecture}\"") + set(SharedDefines ${SharedDefines} "ARCH_STRING=\"${Architecture}\"") endif() if(CMAKE_SYSTEM_NAME MATCHES "BSD") @@ -303,6 +305,11 @@ if(BuildPortableVersion) set(BUILD_PORTABLE ON) endif() +# TODO: this should eventually be removed completely +if(BuildMPWithCompatMode) + set(SharedDefines ${SharedDefines} "BASE_COMPAT") +endif() + #============================================================================= # # Generate version file diff --git a/codemp/cgame/cg_event.c b/codemp/cgame/cg_event.c index 98d3992a7c..45af332e4a 100644 --- a/codemp/cgame/cg_event.c +++ b/codemp/cgame/cg_event.c @@ -3341,7 +3341,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { // // powerup events // -#ifdef BASE_COMPAT case EV_POWERUP_QUAD: DEBUGNAME("EV_POWERUP_QUAD"); if ( es->number == cg.snap->ps.clientNum ) { @@ -3358,7 +3357,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { } //trap->S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.protectSound ); break; -#endif // BASE_COMPAT case EV_FORCE_DRAINED: DEBUGNAME("EV_FORCE_DRAINED"); diff --git a/codemp/cgame/cg_main.c b/codemp/cgame/cg_main.c index b7fcdcb01f..12bbd470ec 100644 --- a/codemp/cgame/cg_main.c +++ b/codemp/cgame/cg_main.c @@ -2631,6 +2631,7 @@ Ghoul2 Insert End CG_ParseEntitiesFromString(); BG_FixSaberMoveData(); + BG_FixWeaponAttackAnim(); } //makes sure returned string is in localized format diff --git a/codemp/cgame/cg_players.c b/codemp/cgame/cg_players.c index d9262deb87..300503a8d4 100644 --- a/codemp/cgame/cg_players.c +++ b/codemp/cgame/cg_players.c @@ -4499,11 +4499,9 @@ static void CG_PlayerPowerups( centity_t *cent, refEntity_t *torso ) { return; } - #ifdef BASE_COMPAT - // quad gives a dlight - if ( powerups & ( 1 << PW_QUAD ) ) - trap->R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1 ); - #endif // BASE_COMPAT + // quad gives a dlight + if ( powerups & ( 1 << PW_QUAD ) ) + trap->R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1 ); if (cent->currentState.eType == ET_NPC) assert(cent->npcClient); diff --git a/codemp/cgame/cg_servercmds.c b/codemp/cgame/cg_servercmds.c index c10ffbaadf..91f0272944 100644 --- a/codemp/cgame/cg_servercmds.c +++ b/codemp/cgame/cg_servercmds.c @@ -911,8 +911,9 @@ static void CG_ConfigStringModified( void ) { CG_ShaderStateChanged(); } else if ( num == CS_LEGACY_FIXES ) { - // LEGACYFIX_SABERMOVEDATA may have changed + // LEGACYFIX_SABERMOVEDATA etc may have changed BG_FixSaberMoveData(); + BG_FixWeaponAttackAnim(); } else if ( num >= CS_LIGHT_STYLES && num < CS_LIGHT_STYLES + (MAX_LIGHT_STYLES * 3)) { diff --git a/codemp/cgame/cg_weapons.c b/codemp/cgame/cg_weapons.c index f6f191e0e9..4bb3b55524 100644 --- a/codemp/cgame/cg_weapons.c +++ b/codemp/cgame/cg_weapons.c @@ -1910,12 +1910,10 @@ void CG_FireWeapon( centity_t *cent, qboolean altFire ) { } } - #ifdef BASE_COMPAT - // play quad sound if needed - if ( cent->currentState.powerups & ( 1 << PW_QUAD ) ) { - //trap->S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.media.quadSound ); - } - #endif // BASE_COMPAT + // play quad sound if needed + if ( cent->currentState.powerups & ( 1 << PW_QUAD ) ) { + //trap->S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.media.quadSound ); + } // play a sound diff --git a/codemp/game/NPC_AI_GalakMech.c b/codemp/game/NPC_AI_GalakMech.c index b8fd462f7c..b3bae38ca5 100644 --- a/codemp/game/NPC_AI_GalakMech.c +++ b/codemp/game/NPC_AI_GalakMech.c @@ -1181,9 +1181,7 @@ void NPC_BSGM_Attack( void ) //if ( NPC->client->ps.powerups[PW_GALAK_SHIELD] > 0 ) if (0) { - #ifdef BASE_COMPAT - NPCS.NPC->client->ps.powerups[PW_BATTLESUIT] = level.time + ARMOR_EFFECT_TIME; - #endif + NPCS.NPC->client->ps.powerups[PW_BATTLESUIT] = level.time + ARMOR_EFFECT_TIME; G_Damage( NPCS.NPC->enemy, NPCS.NPC, NPCS.NPC, NULL, NPCS.NPC->r.currentOrigin, 100, DAMAGE_NO_KNOCKBACK, MOD_UNKNOWN ); } else @@ -1208,9 +1206,7 @@ void NPC_BSGM_Attack( void ) //FIXME: debounce this? NPCS.NPCInfo->touchedByPlayer = NULL; //FIXME: some shield effect? - #ifdef BASE_COMPAT - NPCS.NPC->client->ps.powerups[PW_BATTLESUIT] = level.time + ARMOR_EFFECT_TIME; - #endif + NPCS.NPC->client->ps.powerups[PW_BATTLESUIT] = level.time + ARMOR_EFFECT_TIME; VectorSubtract( NPCS.NPC->enemy->r.currentOrigin, NPCS.NPC->r.currentOrigin, smackDir ); smackDir[2] += 30; diff --git a/codemp/game/bg_misc.c b/codemp/game/bg_misc.c index fb6181812f..b283dcc446 100644 --- a/codemp/game/bg_misc.c +++ b/codemp/game/bg_misc.c @@ -312,9 +312,7 @@ int WeaponAttackAnim[WP_NUM_WEAPONS] = BOTH_THERMAL_THROW,//WP_THERMAL, BOTH_ATTACK3,//BOTH_ATTACK11,//WP_TRIP_MINE, BOTH_ATTACK3,//BOTH_ATTACK12,//WP_DET_PACK, - #ifndef BASE_COMPAT - BOTH_ATTACK3,//WP_CONCUSSION, - #endif // BASE_COMPAT + BOTH_ATTACK3,//WP_CONCUSSION, BOTH_ATTACK2,//WP_BRYAR_OLD, //NOT VALID (e.g. should never really be used): @@ -322,6 +320,32 @@ int WeaponAttackAnim[WP_NUM_WEAPONS] = BOTH_ATTACK1//WP_TURRET, }; +void BG_FixWeaponAttackAnim(void) { +#if defined(_GAME) + const qboolean doFix = !!g_fixWeaponAttackAnim.integer; +#elif defined(_CGAME) + const char *cs = CG_ConfigString(CS_LEGACY_FIXES); + const uint32_t legacyFixes = strtoul(cs, NULL, 0); + const qboolean doFix = !!(legacyFixes & (1 << LEGACYFIX_WEAPONATTACKANIM)); +#elif defined(UI_BUILD) + const qboolean doFix = qtrue; // no chance of prediction error from UI code +#endif + int *move; + + for (move = WeaponAttackAnim; move - WeaponAttackAnim < ARRAY_LEN(WeaponAttackAnim); move++) { + const weapon_t wpIndex = (weapon_t)(move - WeaponAttackAnim); + if (wpIndex == WP_CONCUSSION) { + *move = doFix ? BOTH_ATTACK3 : BOTH_ATTACK2; + } else if (wpIndex == WP_BRYAR_OLD) { + *move = doFix ? BOTH_ATTACK2 : BOTH_STAND1; + } else if (wpIndex == WP_EMPLACED_GUN) { + *move = doFix ? BOTH_STAND1 : BOTH_ATTACK1; + } else if (wpIndex == WP_TURRET) { + *move = doFix ? BOTH_ATTACK1 : BOTH_ATTACK2; // better than UB? + } + } +} + qboolean BG_FileExists( const char *fileName ) { if ( fileName && fileName[0] ) { fileHandle_t f = NULL_FILE; @@ -2439,10 +2463,8 @@ const char *eventnames[EV_NUM_ENTITY_EVENTS] = { "EV_DEATH3", "EV_OBITUARY", - #ifdef BASE_COMPAT - "EV_POWERUP_QUAD", - "EV_POWERUP_BATTLESUIT", - #endif // BASE_COMPAT + "EV_POWERUP_QUAD", + "EV_POWERUP_BATTLESUIT", //"EV_POWERUP_REGEN", "EV_FORCE_DRAINED", diff --git a/codemp/game/bg_pmove.c b/codemp/game/bg_pmove.c index 62ac9c8772..7440e5d696 100644 --- a/codemp/game/bg_pmove.c +++ b/codemp/game/bg_pmove.c @@ -5481,7 +5481,7 @@ static void PM_Footsteps( void ) { } else { -#ifndef BASE_COMPAT // FIXME: this doesn't break base compatibility at all, remove #ifndef +#ifndef BASE_COMPAT if ( pm->ps->weapon != WP_SABER ) { desiredAnim = BOTH_RUN1; @@ -5547,7 +5547,7 @@ static void PM_Footsteps( void ) { bobmove = 0.2f; // walking bobs slow if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { -#ifndef BASE_COMPAT // fixme, doesn't break base compat if enabled (I tested this to be sure) +#ifndef BASE_COMPAT if( pm->ps->weapon != WP_SABER ) { desiredAnim = BOTH_WALKBACK1; diff --git a/codemp/game/bg_public.h b/codemp/game/bg_public.h index 4cb83fe577..0206843b0a 100644 --- a/codemp/game/bg_public.h +++ b/codemp/game/bg_public.h @@ -158,6 +158,7 @@ Ghoul2 Insert End typedef enum legacyFixes_e { LEGACYFIX_SABERMOVEDATA = 0, + LEGACYFIX_WEAPONATTACKANIM, /* m m ""# " m m # # mmm m m # mmm mmm mm#mm mmm m mm # @@ -714,10 +715,8 @@ typedef enum { typedef enum { PW_NONE, - #ifdef BASE_COMPAT - PW_QUAD, - PW_BATTLESUIT, - #endif // BASE_COMPAT + PW_QUAD, + PW_BATTLESUIT, PW_PULL, @@ -924,10 +923,8 @@ typedef enum { EV_DEATH3, EV_OBITUARY, - #ifdef BASE_COMPAT - EV_POWERUP_QUAD, - EV_POWERUP_BATTLESUIT, - #endif // BASE_COMPAT + EV_POWERUP_QUAD, + EV_POWERUP_BATTLESUIT, EV_FORCE_DRAINED, @@ -1734,6 +1731,7 @@ qboolean BG_InSaberLockOld( int anim ); qboolean BG_InSaberLock( int anim ); void BG_FixSaberMoveData( void ); +void BG_FixWeaponAttackAnim( void ); void BG_SaberStartTransAnim( int clientNum, int saberAnimLevel, int weapon, int anim, float *animSpeed, int broken ); diff --git a/codemp/game/bg_saga.c b/codemp/game/bg_saga.c index d67e339d80..e1ab740c6a 100644 --- a/codemp/game/bg_saga.c +++ b/codemp/game/bg_saga.c @@ -157,10 +157,8 @@ stringID_table_t HoldableTable[] = stringID_table_t PowerupTable[] = { ENUM2STRING(PW_NONE), - #ifdef BASE_COMPAT - ENUM2STRING(PW_QUAD), - ENUM2STRING(PW_BATTLESUIT), - #endif // BASE_COMPAT + ENUM2STRING(PW_QUAD), + ENUM2STRING(PW_BATTLESUIT), ENUM2STRING(PW_PULL), ENUM2STRING(PW_REDFLAG), ENUM2STRING(PW_BLUEFLAG), diff --git a/codemp/game/g_active.c b/codemp/game/g_active.c index 8fd94adc50..5f1f90c44e 100644 --- a/codemp/game/g_active.c +++ b/codemp/game/g_active.c @@ -144,9 +144,7 @@ Check for lava / slime contents and drowning ============= */ void P_WorldEffects( gentity_t *ent ) { -#ifdef BASE_COMPAT qboolean envirosuit = qfalse; -#endif int waterlevel; if ( ent->client->noclip ) { @@ -156,19 +154,15 @@ void P_WorldEffects( gentity_t *ent ) { waterlevel = ent->waterlevel; - #ifdef BASE_COMPAT - envirosuit = ent->client->ps.powerups[PW_BATTLESUIT] > level.time; - #endif // BASE_COMPAT + envirosuit = ent->client->ps.powerups[PW_BATTLESUIT] > level.time; // // check for drowning // if ( waterlevel == 3 ) { - #ifdef BASE_COMPAT - // envirosuit give air - if ( envirosuit ) - ent->client->airOutTime = level.time + 10000; - #endif // BASE_COMPAT + // envirosuit give air + if ( envirosuit ) + ent->client->airOutTime = level.time + 10000; // if out of air, start drowning if ( ent->client->airOutTime < level.time) { @@ -208,11 +202,9 @@ void P_WorldEffects( gentity_t *ent ) { { if ( ent->health > 0 && ent->client->tempSpectate < level.time && ent->pain_debounce_time <= level.time ) { - #ifdef BASE_COMPAT if ( envirosuit ) G_AddEvent( ent, EV_POWERUP_BATTLESUIT, 0 ); else - #endif { if ( ent->watertype & CONTENTS_LAVA ) G_Damage( ent, NULL, NULL, NULL, NULL, 30*waterlevel, 0, MOD_LAVA ); diff --git a/codemp/game/g_combat.c b/codemp/game/g_combat.c index 3540974377..caed2fa430 100644 --- a/codemp/game/g_combat.c +++ b/codemp/game/g_combat.c @@ -4908,17 +4908,15 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_ } } - #ifdef BASE_COMPAT - // battlesuit protects from all radius damage (but takes knockback) - // and protects 50% against all damage - if ( client && client->ps.powerups[PW_BATTLESUIT] ) { - G_AddEvent( targ, EV_POWERUP_BATTLESUIT, 0 ); - if ( ( dflags & DAMAGE_RADIUS ) || ( mod == MOD_FALLING ) ) { - return; - } - damage *= 0.5; + // battlesuit protects from all radius damage (but takes knockback) + // and protects 50% against all damage + if ( client && client->ps.powerups[PW_BATTLESUIT] ) { + G_AddEvent( targ, EV_POWERUP_BATTLESUIT, 0 ); + if ( ( dflags & DAMAGE_RADIUS ) || ( mod == MOD_FALLING ) ) { + return; } - #endif + damage *= 0.5; + } // add to the attacker's hit counter (if the target isn't a general entity like a prox mine) if ( attacker->client && targ != attacker && targ->health > 0 diff --git a/codemp/game/g_cvar.c b/codemp/game/g_cvar.c index c0839be5e7..bebb018faa 100644 --- a/codemp/game/g_cvar.c +++ b/codemp/game/g_cvar.c @@ -23,6 +23,7 @@ along with this program; if not, see . #include +#include "bg_public.h" #include "g_local.h" #include "game/bg_public.h" @@ -30,21 +31,29 @@ along with this program; if not, see . // Cvar callbacks // -static void CVU_FixSaberMoveData(void) { - BG_FixSaberMoveData(); - +static void UpdateLegacyFixesConfigstring( legacyFixes_t legacyFix, qboolean enabled ) { char sLegacyFixes[32]; trap->GetConfigstring(CS_LEGACY_FIXES, sLegacyFixes, sizeof(sLegacyFixes)); uint32_t legacyFixes = strtoul(sLegacyFixes, NULL, 0); - if (g_fixSaberMoveData.integer) { - legacyFixes |= (1 << LEGACYFIX_SABERMOVEDATA); + if (enabled) { + legacyFixes |= (1 << legacyFix); } else { - legacyFixes &= ~(1 << LEGACYFIX_SABERMOVEDATA); + legacyFixes &= ~(1 << legacyFix); } trap->SetConfigstring(CS_LEGACY_FIXES, va("%" PRIu32, legacyFixes)); } +static void CVU_FixSaberMoveData(void) { + BG_FixSaberMoveData(); + UpdateLegacyFixesConfigstring( LEGACYFIX_SABERMOVEDATA, g_fixSaberMoveData.integer ); +} + +static void CVU_FixWeaponAttackAnim(void) { + BG_FixWeaponAttackAnim(); + UpdateLegacyFixesConfigstring( LEGACYFIX_WEAPONATTACKANIM, g_fixWeaponAttackAnim.integer ); +} + // // Cvar table // diff --git a/codemp/game/g_xcvar.h b/codemp/game/g_xcvar.h index b21a6c430c..57c43fa6a1 100644 --- a/codemp/game/g_xcvar.h +++ b/codemp/game/g_xcvar.h @@ -34,149 +34,150 @@ along with this program; if not, see . #define XCVAR_DEF( ... ) #endif -XCVAR_DEF( bg_fighterAltControl, "0", NULL, CVAR_SYSTEMINFO, qtrue ) -XCVAR_DEF( capturelimit, "8", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) -XCVAR_DEF( com_optvehtrace, "0", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( d_altRoutes, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_asynchronousGroupAI, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_break, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_JediAI, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_noGroupAI, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_noroam, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_npcai, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_npcaiming, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_npcfreeze, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_noIntermissionWait, "0", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( d_patched, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_perPlayerGhoul2, "0", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( d_powerDuelPrint, "0", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( d_projectileGhoul2Collision, "1", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( d_saberAlwaysBoxTrace, "0", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( d_saberBoxTraceSize, "0", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( d_saberCombat, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( d_saberGhoul2Collision, "1", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( d_saberInterpolate, "0", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( d_saberKickTweak, "1", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( d_saberSPStyleDamage, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( d_saberStanceDebug, "0", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( d_siegeSeekerNPC, "0", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( dedicated, "0", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( developer, "0", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( dmflags, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( duel_fraglimit, "10", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) -XCVAR_DEF( fraglimit, "20", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) -XCVAR_DEF( g_adaptRespawn, "1", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_allowDuelSuicide, "1", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_allowHighPingDuelist, "1", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_allowNPC, "1", NULL, CVAR_CHEAT, qtrue ) -XCVAR_DEF( g_allowTeamVote, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_allowVote, "-1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_antiFakePlayer, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_armBreakage, "0", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_austrian, "0", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_autoMapCycle, "0", NULL, CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) -XCVAR_DEF( g_banIPs, "", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_charRestrictRGB, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_duelWeaponDisable, "1", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qtrue ) -XCVAR_DEF( g_debugAlloc, "0", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_debugDamage, "0", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_debugMelee, "0", NULL, CVAR_SERVERINFO, qtrue ) -XCVAR_DEF( g_debugMove, "0", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_debugSaberLocks, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( g_debugServerSkel, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( bg_fighterAltControl, "0", NULL, CVAR_SYSTEMINFO, qtrue ) +XCVAR_DEF( capturelimit, "8", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) +XCVAR_DEF( com_optvehtrace, "0", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( d_altRoutes, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_asynchronousGroupAI, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_break, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_JediAI, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_noGroupAI, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_noroam, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_npcai, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_npcaiming, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_npcfreeze, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_noIntermissionWait, "0", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( d_patched, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_perPlayerGhoul2, "0", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( d_powerDuelPrint, "0", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( d_projectileGhoul2Collision, "1", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( d_saberAlwaysBoxTrace, "0", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( d_saberBoxTraceSize, "0", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( d_saberCombat, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( d_saberGhoul2Collision, "1", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( d_saberInterpolate, "0", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( d_saberKickTweak, "1", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( d_saberSPStyleDamage, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( d_saberStanceDebug, "0", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( d_siegeSeekerNPC, "0", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( dedicated, "0", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( developer, "0", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( dmflags, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( duel_fraglimit, "10", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) +XCVAR_DEF( fraglimit, "20", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) +XCVAR_DEF( g_adaptRespawn, "1", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_allowDuelSuicide, "1", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_allowHighPingDuelist, "1", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_allowNPC, "1", NULL, CVAR_CHEAT, qtrue ) +XCVAR_DEF( g_allowTeamVote, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_allowVote, "-1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_antiFakePlayer, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_armBreakage, "0", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_austrian, "0", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_autoMapCycle, "0", NULL, CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) +XCVAR_DEF( g_banIPs, "", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_charRestrictRGB, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_duelWeaponDisable, "1", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qtrue ) +XCVAR_DEF( g_debugAlloc, "0", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_debugDamage, "0", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_debugMelee, "0", NULL, CVAR_SERVERINFO, qtrue ) +XCVAR_DEF( g_debugMove, "0", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_debugSaberLocks, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( g_debugServerSkel, "0", NULL, CVAR_CHEAT, qfalse ) #ifdef _DEBUG -XCVAR_DEF( g_disableServerG2, "0", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_disableServerG2, "0", NULL, CVAR_NONE, qtrue ) #endif -XCVAR_DEF( g_dismember, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_doWarmup, "0", NULL, CVAR_NONE, qtrue ) -//XCVAR_DEF( g_engineModifications, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_ff_objectives, "0", NULL, CVAR_CHEAT|CVAR_NORESTART, qtrue ) -XCVAR_DEF( g_filterBan, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_fixSaberDisarmBonus, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_fixSaberMoveData, "1", CVU_FixSaberMoveData, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_forceBasedTeams, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qfalse ) -XCVAR_DEF( g_forceClientUpdateRate, "250", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_forceDodge, "1", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_forcePowerDisable, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qtrue ) -XCVAR_DEF( g_forceRegenTime, "200", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_forceRespawn, "60", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_fraglimitVoteCorrection, "1", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_friendlyFire, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_friendlySaber, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_g2TraceLod, "3", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_gametype, "0", NULL, CVAR_SERVERINFO|CVAR_LATCH, qfalse ) -XCVAR_DEF( g_gravity, "800", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_inactivity, "0", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_jediVmerc, "0", NULL, CVAR_SERVERINFO|CVAR_LATCH|CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_knockback, "1000", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_locationBasedDamage, "1", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_log, "games.log", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_logClientInfo, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_logSync, "0", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_maxConnPerIP, "3", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_maxForceRank, "7", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qfalse ) -XCVAR_DEF( g_maxGameClients, "0", NULL, CVAR_SERVERINFO|CVAR_LATCH|CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_maxHolocronCarry, "3", NULL, CVAR_LATCH, qfalse ) -XCVAR_DEF( g_motd, "", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_needpass, "0", NULL, CVAR_SERVERINFO|CVAR_ROM, qfalse ) -XCVAR_DEF( g_noSpecMove, "0", NULL, CVAR_SERVERINFO, qtrue ) -XCVAR_DEF( g_npcspskill, "0", NULL, CVAR_ARCHIVE|CVAR_INTERNAL, qfalse ) -XCVAR_DEF( g_password, "", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_powerDuelEndHealth, "90", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_powerDuelStartHealth, "150", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_privateDuel, "1", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_randFix, "1", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_restarted, "0", NULL, CVAR_ROM, qfalse ) -XCVAR_DEF( g_saberBladeFaces, "1", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_saberDamageScale, "1", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_dismember, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_doWarmup, "0", NULL, CVAR_NONE, qtrue ) +//XCVAR_DEF( g_engineModifications, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_ff_objectives, "0", NULL, CVAR_CHEAT|CVAR_NORESTART, qtrue ) +XCVAR_DEF( g_filterBan, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_fixSaberDisarmBonus, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_fixSaberMoveData, "1", CVU_FixSaberMoveData, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_fixWeaponAttackAnim, "1", CVU_FixWeaponAttackAnim, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_forceBasedTeams, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qfalse ) +XCVAR_DEF( g_forceClientUpdateRate, "250", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_forceDodge, "1", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_forcePowerDisable, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qtrue ) +XCVAR_DEF( g_forceRegenTime, "200", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_forceRespawn, "60", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_fraglimitVoteCorrection, "1", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_friendlyFire, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_friendlySaber, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_g2TraceLod, "3", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_gametype, "0", NULL, CVAR_SERVERINFO|CVAR_LATCH, qfalse ) +XCVAR_DEF( g_gravity, "800", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_inactivity, "0", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_jediVmerc, "0", NULL, CVAR_SERVERINFO|CVAR_LATCH|CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_knockback, "1000", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_locationBasedDamage, "1", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_log, "games.log", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_logClientInfo, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_logSync, "0", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_maxConnPerIP, "3", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_maxForceRank, "7", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qfalse ) +XCVAR_DEF( g_maxGameClients, "0", NULL, CVAR_SERVERINFO|CVAR_LATCH|CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_maxHolocronCarry, "3", NULL, CVAR_LATCH, qfalse ) +XCVAR_DEF( g_motd, "", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_needpass, "0", NULL, CVAR_SERVERINFO|CVAR_ROM, qfalse ) +XCVAR_DEF( g_noSpecMove, "0", NULL, CVAR_SERVERINFO, qtrue ) +XCVAR_DEF( g_npcspskill, "0", NULL, CVAR_ARCHIVE|CVAR_INTERNAL, qfalse ) +XCVAR_DEF( g_password, "", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_powerDuelEndHealth, "90", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_powerDuelStartHealth, "150", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_privateDuel, "1", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_randFix, "1", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_restarted, "0", NULL, CVAR_ROM, qfalse ) +XCVAR_DEF( g_saberBladeFaces, "1", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_saberDamageScale, "1", NULL, CVAR_ARCHIVE, qtrue ) #ifdef DEBUG_SABER_BOX -XCVAR_DEF( g_saberDebugBox, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( g_saberDebugBox, "0", NULL, CVAR_CHEAT, qfalse ) #endif #ifndef FINAL_BUILD -XCVAR_DEF( g_saberDebugPrint, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( g_saberDebugPrint, "0", NULL, CVAR_CHEAT, qfalse ) #endif -XCVAR_DEF( g_saberDmgDelay_Idle, "350", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_saberDmgDelay_Wound, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_saberDmgVelocityScale, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_saberLockFactor, "2", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_saberLocking, "1", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_saberLockRandomNess, "2", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_saberRealisticCombat, "0", NULL, CVAR_CHEAT, qfalse ) -XCVAR_DEF( g_saberRestrictForce, "0", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_saberTraceSaberFirst, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_saberWallDamageScale, "0.4", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_securityLog, "1", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_showDuelHealths, "0", NULL, CVAR_SERVERINFO, qfalse ) -XCVAR_DEF( g_siegeRespawn, "20", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_siegeTeam1, "none", NULL, CVAR_ARCHIVE|CVAR_SERVERINFO, qfalse ) -XCVAR_DEF( g_siegeTeam2, "none", NULL, CVAR_ARCHIVE|CVAR_SERVERINFO, qfalse ) -XCVAR_DEF( g_siegeTeamSwitch, "1", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_slowmoDuelEnd, "0", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_smoothClients, "1", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_spawnInvulnerability, "3000", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_speed, "250", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_statLog, "0", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_statLogFile, "statlog.log", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_stepSlideFix, "1", NULL, CVAR_SERVERINFO, qtrue ) -XCVAR_DEF( g_synchronousClients, "0", NULL, CVAR_SYSTEMINFO, qfalse ) -XCVAR_DEF( g_teamAutoJoin, "0", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_teamForceBalance, "0", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_timeouttospec, "70", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_userinfoValidate, "25165823", NULL, CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( g_useWhileThrowing, "1", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( g_voteDelay, "3000", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( g_warmup, "20", NULL, CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( g_weaponDisable, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qtrue ) -XCVAR_DEF( g_weaponRespawn, "5", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( gamedate, SOURCE_DATE, NULL, CVAR_ROM, qfalse ) -XCVAR_DEF( gamename, GAMEVERSION, NULL, CVAR_SERVERINFO|CVAR_ROM, qfalse ) -XCVAR_DEF( pmove_fixed, "0", NULL, CVAR_SYSTEMINFO|CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( pmove_float, "0", NULL, CVAR_SYSTEMINFO|CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( pmove_msec, "8", NULL, CVAR_SYSTEMINFO|CVAR_ARCHIVE, qtrue ) -XCVAR_DEF( RMG, "0", NULL, CVAR_NONE, qtrue ) -XCVAR_DEF( sv_cheats, "1", NULL, CVAR_NONE, qfalse ) -XCVAR_DEF( sv_fps, "40", NULL, CVAR_ARCHIVE|CVAR_SERVERINFO, qtrue ) -XCVAR_DEF( sv_maxclients, "8", NULL, CVAR_SERVERINFO|CVAR_LATCH|CVAR_ARCHIVE, qfalse ) -XCVAR_DEF( timelimit, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) +XCVAR_DEF( g_saberDmgDelay_Idle, "350", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_saberDmgDelay_Wound, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_saberDmgVelocityScale, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_saberLockFactor, "2", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_saberLocking, "1", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_saberLockRandomNess, "2", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_saberRealisticCombat, "0", NULL, CVAR_CHEAT, qfalse ) +XCVAR_DEF( g_saberRestrictForce, "0", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_saberTraceSaberFirst, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_saberWallDamageScale, "0.4", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_securityLog, "1", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_showDuelHealths, "0", NULL, CVAR_SERVERINFO, qfalse ) +XCVAR_DEF( g_siegeRespawn, "20", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_siegeTeam1, "none", NULL, CVAR_ARCHIVE|CVAR_SERVERINFO, qfalse ) +XCVAR_DEF( g_siegeTeam2, "none", NULL, CVAR_ARCHIVE|CVAR_SERVERINFO, qfalse ) +XCVAR_DEF( g_siegeTeamSwitch, "1", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_slowmoDuelEnd, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_smoothClients, "1", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_spawnInvulnerability, "3000", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_speed, "250", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_statLog, "0", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_statLogFile, "statlog.log", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_stepSlideFix, "1", NULL, CVAR_SERVERINFO, qtrue ) +XCVAR_DEF( g_synchronousClients, "0", NULL, CVAR_SYSTEMINFO, qfalse ) +XCVAR_DEF( g_teamAutoJoin, "0", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_teamForceBalance, "0", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_timeouttospec, "70", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_userinfoValidate, "25165823", NULL, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_useWhileThrowing, "1", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( g_voteDelay, "3000", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( g_warmup, "20", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_weaponDisable, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qtrue ) +XCVAR_DEF( g_weaponRespawn, "5", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( gamedate, SOURCE_DATE, NULL, CVAR_ROM, qfalse ) +XCVAR_DEF( gamename, GAMEVERSION, NULL, CVAR_SERVERINFO|CVAR_ROM, qfalse ) +XCVAR_DEF( pmove_fixed, "0", NULL, CVAR_SYSTEMINFO|CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( pmove_float, "0", NULL, CVAR_SYSTEMINFO|CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( pmove_msec, "8", NULL, CVAR_SYSTEMINFO|CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( RMG, "0", NULL, CVAR_NONE, qtrue ) +XCVAR_DEF( sv_cheats, "1", NULL, CVAR_NONE, qfalse ) +XCVAR_DEF( sv_fps, "40", NULL, CVAR_ARCHIVE|CVAR_SERVERINFO, qtrue ) +XCVAR_DEF( sv_maxclients, "8", NULL, CVAR_SERVERINFO|CVAR_LATCH|CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( timelimit, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_NORESTART, qtrue ) #undef XCVAR_DEF diff --git a/codemp/qcommon/q_shared.h b/codemp/qcommon/q_shared.h index cea7b5c833..526ede7d25 100644 --- a/codemp/qcommon/q_shared.h +++ b/codemp/qcommon/q_shared.h @@ -44,10 +44,6 @@ along with this program; if not, see . #define MAX_TEAMNAME 32 #define MAX_MASTER_SERVERS 5 // number of supported master servers -#define BASE_COMPAT // some unused and leftover code has been stripped out, but this breaks compatibility - // between base<->modbase clients and servers (mismatching events, powerups, etc) - // leave this defined to ensure compatibility - #include "qcommon/q_math.h" #include "qcommon/q_color.h" #include "qcommon/q_string.h" From 9299c02197a9de6bc4f1245cdc61c5e499feafdc Mon Sep 17 00:00:00 2001 From: Razish Date: Mon, 12 Feb 2024 21:41:26 +1100 Subject: [PATCH 2/3] remove BASE_COMPAT and BuildMPWithCompatMode, add g_fixRunWalkAnims --- CMakeLists.txt | 5 - codemp/game/bg_pmove.c | 264 ++++++++++++++++++++-------------------- codemp/game/bg_public.h | 1 + codemp/game/g_cvar.c | 8 +- codemp/game/g_xcvar.h | 1 + 5 files changed, 137 insertions(+), 142 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 857e171c4c..52b2f6509c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,11 +305,6 @@ if(BuildPortableVersion) set(BUILD_PORTABLE ON) endif() -# TODO: this should eventually be removed completely -if(BuildMPWithCompatMode) - set(SharedDefines ${SharedDefines} "BASE_COMPAT") -endif() - #============================================================================= # # Generate version file diff --git a/codemp/game/bg_pmove.c b/codemp/game/bg_pmove.c index 7440e5d696..894867f1c4 100644 --- a/codemp/game/bg_pmove.c +++ b/codemp/game/bg_pmove.c @@ -5161,6 +5161,16 @@ int PM_LegsSlopeBackTransition(int desiredAnim) return resultingAnim; } +static qboolean BG_AreRunWalkAnimsFixed(void) { +#if defined(_GAME) + return !!g_fixRunWalkAnims.integer; +#elif defined(_CGAME) + const char *cs = CG_ConfigString(CS_LEGACY_FIXES); + const uint32_t legacyFixes = strtoul(cs, NULL, 0); + return !!(legacyFixes & (1 << LEGACYFIX_RUNWALKANIMS)); +#endif +} + /* =============== PM_Footsteps @@ -5430,116 +5440,106 @@ static void PM_Footsteps( void ) { #endif else if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { -#ifndef BASE_COMPAT - if( pm->ps->weapon != WP_SABER ) - { + if ( BG_AreRunWalkAnimsFixed() && pm->ps->weapon != WP_SABER ) { desiredAnim = BOTH_RUNBACK1; } - else - { -#endif - switch (pm->ps->fd.saberAnimLevel) - { - case SS_STAFF: - if ( pm->ps->saberHolstered > 1 ) - {//saber off - desiredAnim = BOTH_RUNBACK1; - } - else - { - //desiredAnim = BOTH_RUNBACK_STAFF; - //hmm.. stuff runback anim is pretty messed up for some reason. - desiredAnim = BOTH_RUNBACK2; - } - break; - case SS_DUAL: - if ( pm->ps->saberHolstered > 1 ) - {//sabers off - desiredAnim = BOTH_RUNBACK1; - } - else - { - //desiredAnim = BOTH_RUNBACK_DUAL; - //and so is the dual - desiredAnim = BOTH_RUNBACK2; - } - break; - default: - if ( pm->ps->saberHolstered ) - {//saber off - desiredAnim = BOTH_RUNBACK1; - } - else + else { + switch (pm->ps->fd.saberAnimLevel) { - desiredAnim = BOTH_RUNBACK2; + case SS_STAFF: + if ( pm->ps->saberHolstered > 1 ) + {//saber off + desiredAnim = BOTH_RUNBACK1; + } + else + { + //desiredAnim = BOTH_RUNBACK_STAFF; + //hmm.. stuff runback anim is pretty messed up for some reason. + desiredAnim = BOTH_RUNBACK2; + } + break; + case SS_DUAL: + if ( pm->ps->saberHolstered > 1 ) + {//sabers off + desiredAnim = BOTH_RUNBACK1; + } + else + { + //desiredAnim = BOTH_RUNBACK_DUAL; + //and so is the dual + desiredAnim = BOTH_RUNBACK2; + } + break; + default: + if ( pm->ps->saberHolstered ) + {//saber off + desiredAnim = BOTH_RUNBACK1; + } + else + { + desiredAnim = BOTH_RUNBACK2; + } + break; } - break; - } -#ifndef BASE_COMPAT } -#endif } else { -#ifndef BASE_COMPAT - if ( pm->ps->weapon != WP_SABER ) + if ( BG_AreRunWalkAnimsFixed() && pm->ps->weapon != WP_SABER ) { desiredAnim = BOTH_RUN1; } else { -#endif - switch (pm->ps->fd.saberAnimLevel) - { - case SS_STAFF: - if ( pm->ps->saberHolstered > 1 ) - {//blades off - desiredAnim = BOTH_RUN1; - } - else if ( pm->ps->saberHolstered == 1 ) - {//1 blade on - desiredAnim = BOTH_RUN2; - } - else + switch (pm->ps->fd.saberAnimLevel) { - if (pm->ps->fd.forcePowersActive & (1<ps->saberHolstered > 1 ) + {//blades off + desiredAnim = BOTH_RUN1; + } + else if ( pm->ps->saberHolstered == 1 ) + {//1 blade on + desiredAnim = BOTH_RUN2; + } + else { + if (pm->ps->fd.forcePowersActive & (1<ps->saberHolstered > 1 ) + {//blades off desiredAnim = BOTH_RUN1; } + else if ( pm->ps->saberHolstered == 1 ) + {//1 saber on + desiredAnim = BOTH_RUN2; + } else { - desiredAnim = BOTH_RUN_STAFF; + desiredAnim = BOTH_RUN_DUAL; } + break; + default: + if ( pm->ps->saberHolstered ) + {//saber off + desiredAnim = BOTH_RUN1; + } + else + { + desiredAnim = BOTH_RUN2; + } + break; } - break; - case SS_DUAL: - if ( pm->ps->saberHolstered > 1 ) - {//blades off - desiredAnim = BOTH_RUN1; - } - else if ( pm->ps->saberHolstered == 1 ) - {//1 saber on - desiredAnim = BOTH_RUN2; - } - else - { - desiredAnim = BOTH_RUN_DUAL; - } - break; - default: - if ( pm->ps->saberHolstered ) - {//saber off - desiredAnim = BOTH_RUN1; - } - else - { - desiredAnim = BOTH_RUN2; - } - break; } -#ifndef BASE_COMPAT - } -#endif } } else @@ -5547,58 +5547,54 @@ static void PM_Footsteps( void ) { bobmove = 0.2f; // walking bobs slow if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { -#ifndef BASE_COMPAT - if( pm->ps->weapon != WP_SABER ) + if ( BG_AreRunWalkAnimsFixed() && pm->ps->weapon != WP_SABER ) { desiredAnim = BOTH_WALKBACK1; } else { -#endif - switch (pm->ps->fd.saberAnimLevel) - { - case SS_STAFF: - if ( pm->ps->saberHolstered > 1 ) - { - desiredAnim = BOTH_WALKBACK1; - } - else if ( pm->ps->saberHolstered ) - { - desiredAnim = BOTH_WALKBACK2; - } - else - { - desiredAnim = BOTH_WALKBACK_STAFF; - } - break; - case SS_DUAL: - if ( pm->ps->saberHolstered > 1 ) - { - desiredAnim = BOTH_WALKBACK1; - } - else if ( pm->ps->saberHolstered ) - { - desiredAnim = BOTH_WALKBACK2; - } - else - { - desiredAnim = BOTH_WALKBACK_DUAL; - } - break; - default: - if ( pm->ps->saberHolstered ) - { - desiredAnim = BOTH_WALKBACK1; - } - else + switch (pm->ps->fd.saberAnimLevel) { - desiredAnim = BOTH_WALKBACK2; + case SS_STAFF: + if ( pm->ps->saberHolstered > 1 ) + { + desiredAnim = BOTH_WALKBACK1; + } + else if ( pm->ps->saberHolstered ) + { + desiredAnim = BOTH_WALKBACK2; + } + else + { + desiredAnim = BOTH_WALKBACK_STAFF; + } + break; + case SS_DUAL: + if ( pm->ps->saberHolstered > 1 ) + { + desiredAnim = BOTH_WALKBACK1; + } + else if ( pm->ps->saberHolstered ) + { + desiredAnim = BOTH_WALKBACK2; + } + else + { + desiredAnim = BOTH_WALKBACK_DUAL; + } + break; + default: + if ( pm->ps->saberHolstered ) + { + desiredAnim = BOTH_WALKBACK1; + } + else + { + desiredAnim = BOTH_WALKBACK2; + } + break; } - break; - } -#ifndef BASE_COMPAT } -#endif } else { @@ -5610,12 +5606,10 @@ static void PM_Footsteps( void ) { { desiredAnim = BOTH_WALK1; } -#ifndef BASE_COMPAT - else if ( pm->ps->weapon != WP_SABER ) + else if ( BG_AreRunWalkAnimsFixed() && pm->ps->weapon != WP_SABER ) { desiredAnim = BOTH_WALK1; } -#endif else { switch (pm->ps->fd.saberAnimLevel) diff --git a/codemp/game/bg_public.h b/codemp/game/bg_public.h index 0206843b0a..1c2d7b6311 100644 --- a/codemp/game/bg_public.h +++ b/codemp/game/bg_public.h @@ -159,6 +159,7 @@ Ghoul2 Insert End typedef enum legacyFixes_e { LEGACYFIX_SABERMOVEDATA = 0, LEGACYFIX_WEAPONATTACKANIM, + LEGACYFIX_RUNWALKANIMS, /* m m ""# " m m # # mmm m m # mmm mmm mm#mm mmm m mm # diff --git a/codemp/game/g_cvar.c b/codemp/game/g_cvar.c index bebb018faa..e2c7600e0c 100644 --- a/codemp/game/g_cvar.c +++ b/codemp/game/g_cvar.c @@ -46,12 +46,16 @@ static void UpdateLegacyFixesConfigstring( legacyFixes_t legacyFix, qboolean ena static void CVU_FixSaberMoveData(void) { BG_FixSaberMoveData(); - UpdateLegacyFixesConfigstring( LEGACYFIX_SABERMOVEDATA, g_fixSaberMoveData.integer ); + UpdateLegacyFixesConfigstring(LEGACYFIX_SABERMOVEDATA, g_fixSaberMoveData.integer); +} + +static void CVU_FixRunWalkAnims(void) { + UpdateLegacyFixesConfigstring(LEGACYFIX_RUNWALKANIMS, g_fixRunWalkAnims.integer); } static void CVU_FixWeaponAttackAnim(void) { BG_FixWeaponAttackAnim(); - UpdateLegacyFixesConfigstring( LEGACYFIX_WEAPONATTACKANIM, g_fixWeaponAttackAnim.integer ); + UpdateLegacyFixesConfigstring(LEGACYFIX_WEAPONATTACKANIM, g_fixWeaponAttackAnim.integer); } // diff --git a/codemp/game/g_xcvar.h b/codemp/game/g_xcvar.h index 57c43fa6a1..df9ee8094a 100644 --- a/codemp/game/g_xcvar.h +++ b/codemp/game/g_xcvar.h @@ -94,6 +94,7 @@ XCVAR_DEF( g_ff_objectives, "0", NULL, CVAR_CHEAT|CVAR_NORESTART, XCVAR_DEF( g_filterBan, "1", NULL, CVAR_ARCHIVE, qfalse ) XCVAR_DEF( g_fixSaberDisarmBonus, "1", NULL, CVAR_ARCHIVE, qfalse ) XCVAR_DEF( g_fixSaberMoveData, "1", CVU_FixSaberMoveData, CVAR_ARCHIVE, qfalse ) +XCVAR_DEF( g_fixRunWalkAnims, "1", CVU_FixRunWalkAnims, CVAR_ARCHIVE, qfalse ) XCVAR_DEF( g_fixWeaponAttackAnim, "1", CVU_FixWeaponAttackAnim, CVAR_ARCHIVE, qfalse ) XCVAR_DEF( g_forceBasedTeams, "0", NULL, CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, qfalse ) XCVAR_DEF( g_forceClientUpdateRate, "250", NULL, CVAR_NONE, qfalse ) From f6df307ca7ff6f22043321ffdd9a00d542aaf4a6 Mon Sep 17 00:00:00 2001 From: Razish Date: Mon, 12 Feb 2024 21:43:03 +1100 Subject: [PATCH 3/3] actually remove BuildMPWithCompatMode --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52b2f6509c..c168794694 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ option(BuildMPGame "Whether to create projects for the MP server-side gamecode ( option(BuildMPCGame "Whether to create projects for the MP clientside gamecode (cgamex86.dll)" ON) option(BuildMPUI "Whether to create projects for the MP UI code (uix86.dll)" ON) option(BuildMPRend2 "Whether to create projects for the EXPERIMENTAL MP rend2 renderer (rd-rend2_x86.dll)" ON) -option(BuildMPWithCompatMode "Build MP modules to be network-compatible with legacy clients/servers" ON) option(BuildSPEngine "Whether to create projects for the SP engine (openjk_sp.exe)" ON) option(BuildSPGame "Whether to create projects for the SP gamecode (jagamex86.dll)" ON)