From c726884106c898a2e1d3f33cf0bf0bb2542fe5e1 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 9 Jan 2020 21:22:04 +1000 Subject: [PATCH] Rename sv_vq3compat to sv_q3defragcompat to clarify its purpose --- qcsrc/common/mapobjects/func/button.qc | 2 +- qcsrc/common/mapobjects/trigger/hurt.qc | 4 ++-- qcsrc/common/mapobjects/trigger/jumppads.qc | 4 ++-- qcsrc/common/mapobjects/trigger/multi.qc | 2 +- qcsrc/common/physics/player.qc | 14 +++++++------- qcsrc/common/stats.qh | 4 ++-- qcsrc/server/autocvars.qh | 2 +- qcsrc/server/g_world.qc | 2 +- xonotic-server.cfg | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/qcsrc/common/mapobjects/func/button.qc b/qcsrc/common/mapobjects/func/button.qc index a9c0fa726..423ac5e7b 100644 --- a/qcsrc/common/mapobjects/func/button.qc +++ b/qcsrc/common/mapobjects/func/button.qc @@ -206,7 +206,7 @@ spawnfunc(func_button) if (!this.lip) this.lip = 4; - if(this.wait == -1 && autocvar_sv_vq3compat) + if(this.wait == -1 && autocvar_sv_q3defragcompat) this.wait = 0.1; // compatibility for q3df: "instant" return if(this.noise != "") diff --git a/qcsrc/common/mapobjects/trigger/hurt.qc b/qcsrc/common/mapobjects/trigger/hurt.qc index ccdf2c7d0..8c21c509c 100644 --- a/qcsrc/common/mapobjects/trigger/hurt.qc +++ b/qcsrc/common/mapobjects/trigger/hurt.qc @@ -25,7 +25,7 @@ void trigger_hurt_touch(entity this, entity toucher) if (toucher.triggerhurttime < time) { EXACTTRIGGER_TOUCH(this, toucher); - toucher.triggerhurttime = time + ((autocvar_sv_vq3compat && !(this.spawnflags & HURT_SLOW)) ? 0.1 : 1); + toucher.triggerhurttime = time + ((autocvar_sv_q3defragcompat && !(this.spawnflags & HURT_SLOW)) ? 0.1 : 1); entity own; own = this.enemy; @@ -66,7 +66,7 @@ spawnfunc(trigger_hurt) this.use = trigger_hurt_use; this.enemy = world; // I hate you all if (!this.dmg) - this.dmg = ((autocvar_sv_vq3compat) ? 5 : 10000); + this.dmg = ((autocvar_sv_q3defragcompat) ? 5 : 10000); if (this.message == "") this.message = "was in the wrong place"; if (this.message2 == "") diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qc b/qcsrc/common/mapobjects/trigger/jumppads.qc index f4b3e455a..2c160eae9 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qc +++ b/qcsrc/common/mapobjects/trigger/jumppads.qc @@ -135,9 +135,9 @@ bool jumppad_push(entity this, entity targ) vector org = targ.origin; #ifdef SVQC - if(autocvar_sv_vq3compat) + if(autocvar_sv_q3defragcompat) #elif defined(CSQC) - if(STAT(VQ3COMPAT)) + if(STAT(Q3DEFRAGCOMPAT)) #endif { org.z += targ.mins_z; diff --git a/qcsrc/common/mapobjects/trigger/multi.qc b/qcsrc/common/mapobjects/trigger/multi.qc index 1fef1ffb3..df915a649 100644 --- a/qcsrc/common/mapobjects/trigger/multi.qc +++ b/qcsrc/common/mapobjects/trigger/multi.qc @@ -176,7 +176,7 @@ spawnfunc(trigger_multiple) this.wait = 0; this.use = multi_use; - if(this.wait == -1 && autocvar_sv_vq3compat) + if(this.wait == -1 && autocvar_sv_q3defragcompat) this.wait = 0.1; // compatibility for q3df: "instant" return EXACTTRIGGER_INIT; diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 02657dee8..82dca5352 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -53,13 +53,13 @@ void Physics_UpdateStats(entity this) : 0; STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod; } - bool vq3compat = autocvar_sv_vq3compat && autocvar_sv_vq3compat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences - STAT(PL_MIN, this) = (vq3compat) ? '-15 -15 -24' : autocvar_sv_player_mins; - STAT(PL_MAX, this) = (vq3compat) ? '15 15 32' : autocvar_sv_player_maxs; - STAT(PL_VIEW_OFS, this) = (vq3compat) ? '0 0 26' : autocvar_sv_player_viewoffset; - STAT(PL_CROUCH_MIN, this) = (vq3compat) ? '-15 -15 -24' : autocvar_sv_player_crouch_mins; - STAT(PL_CROUCH_MAX, this) = (vq3compat) ? '15 15 16' : autocvar_sv_player_crouch_maxs; - STAT(PL_CROUCH_VIEW_OFS, this) = (vq3compat) ? '0 0 12' : autocvar_sv_player_crouch_viewoffset; + bool q3dfcompat = autocvar_sv_q3defragcompat && autocvar_sv_q3defragcompat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences + STAT(PL_MIN, this) = (q3dfcompat) ? '-15 -15 -24' : autocvar_sv_player_mins; + STAT(PL_MAX, this) = (q3dfcompat) ? '15 15 32' : autocvar_sv_player_maxs; + STAT(PL_VIEW_OFS, this) = (q3dfcompat) ? '0 0 26' : autocvar_sv_player_viewoffset; + STAT(PL_CROUCH_MIN, this) = (q3dfcompat) ? '-15 -15 -24' : autocvar_sv_player_crouch_mins; + STAT(PL_CROUCH_MAX, this) = (q3dfcompat) ? '15 15 16' : autocvar_sv_player_crouch_maxs; + STAT(PL_CROUCH_VIEW_OFS, this) = (q3dfcompat) ? '0 0 12' : autocvar_sv_player_crouch_viewoffset; // old stats // fix some new settings diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 8b769538e..7d2aae5f4 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -319,9 +319,9 @@ bool autocvar_sv_slick_applygravity; REGISTER_STAT(SLICK_APPLYGRAVITY, bool, autocvar_sv_slick_applygravity) #ifdef SVQC -bool autocvar_sv_vq3compat; +bool autocvar_sv_q3defragcompat; #endif -REGISTER_STAT(VQ3COMPAT, bool, autocvar_sv_vq3compat) +REGISTER_STAT(Q3DEFRAGCOMPAT, bool, autocvar_sv_q3defragcompat) #ifdef SVQC #include "physics/movetypes/movetypes.qh" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 415fedab8..a8195451f 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -529,4 +529,4 @@ bool autocvar_sv_showspectators; bool autocvar_g_weaponswitch_debug; bool autocvar_g_weaponswitch_debug_alternate; bool autocvar_g_allow_checkpoints; -bool autocvar_sv_vq3compat_changehitbox = false; +bool autocvar_sv_q3defragcompat_changehitbox = false; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 80ecd2a31..6ee29474e 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -873,7 +873,7 @@ spawnfunc(worldspawn) MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1); if(fexists(strcat("scripts/", mapname, ".defi"))) - cvar_settemp("sv_vq3compat", "1"); + cvar_settemp("sv_q3defragcompat", "1"); if(whichpack(strcat("maps/", mapname, ".cfg")) != "") { diff --git a/xonotic-server.cfg b/xonotic-server.cfg index fad9b90f6..25c7b7484 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -487,7 +487,7 @@ sv_gameplayfix_gravityunaffectedbyticrate 1 sv_gameplayfix_nogravityonground 1 set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)" -set sv_vq3compat 0 "toggle for some compatibility hacks (for VQ3 and CPM map compatibility in mapinfo files)" +set sv_q3defragcompat 0 "toggle for some compatibility hacks (for Q3DF map compatibility)" set g_movement_highspeed 1 "multiplier scale for movement speed (applies to sv_maxspeed and sv_maxairspeed, also applies to air acceleration when g_movement_highspeed_q3_compat is set to 0)" set g_movement_highspeed_q3_compat 0 "apply speed modifiers to air movement in a more Q3-compatible way (only apply speed buffs and g_movement_highspeed to max air speed, not to acceleration)" -- 2.39.2