]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename sv_vq3compat to sv_q3defragcompat to clarify its purpose
authorMario <mario.mario@y7mail.com>
Thu, 9 Jan 2020 11:22:04 +0000 (21:22 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 9 Jan 2020 11:22:04 +0000 (21:22 +1000)
qcsrc/common/mapobjects/func/button.qc
qcsrc/common/mapobjects/trigger/hurt.qc
qcsrc/common/mapobjects/trigger/jumppads.qc
qcsrc/common/mapobjects/trigger/multi.qc
qcsrc/common/physics/player.qc
qcsrc/common/stats.qh
qcsrc/server/autocvars.qh
qcsrc/server/g_world.qc
xonotic-server.cfg

index a9c0fa7261124747d1392ea785cdcd53ebb609d7..423ac5e7b6d927f9fa2f8cdd42cf9797fe6b2f56 100644 (file)
@@ -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 != "")
index ccdf2c7d0b96a291086be949e2c53db8180b725d..8c21c509c5643419bb937d1d4170a81d711f12df 100644 (file)
@@ -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 == "")
index f4b3e455a1309e1f0a0d44b7542f4ae38689117c..2c160eae95e8a05e75f1ead2512b81c257716242 100644 (file)
@@ -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;
index 1fef1ffb356b2e63d817a33b27c02389b6d00a7c..df915a649695c34ade16a31051dc9bdb6ce02b32 100644 (file)
@@ -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;
index 02657dee8db2f80360d38e04cd83d917cc3d06dc..82dca53520597de2d7377a18f6e4085bf51b9df1 100644 (file)
@@ -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
index 8b769538e900f03bb467eb3d1cdb21c00b6e3a3d..7d2aae5f42b70dd2c3e09f9fe2a8533a7a5f396c 100644 (file)
@@ -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"
index 415fedab8edacd0c977e956b508de864e1d542f7..a8195451f441057629f4076c19b16b3bdd38fa78 100644 (file)
@@ -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;
index 80ecd2a31333ea2998cf14027de9150b42067ddc..6ee29474e5470944cf7122279c8213ecd91f57a4 100644 (file)
@@ -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")) != "")
        {
index fad9b90f611fc6380b01ea28337f827a6a23749b..25c7b74845b4c12b562b6122fe7d818988e0632b 100644 (file)
@@ -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)"