Add proper cvar for the gameplayfix setting
authorSamual Lenks <samual@xonotic.org>
Sat, 25 Jan 2014 22:17:34 +0000 (17:17 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 25 Jan 2014 22:17:34 +0000 (17:17 -0500)
defaultXonotic.cfg
qcsrc/client/movetypes.qc
qcsrc/client/movetypes.qh

index 624a581..c6fa764 100644 (file)
@@ -1079,6 +1079,8 @@ sv_gameplayfix_delayprojectiles 0
 sv_gameplayfix_q2airaccelerate 1
 sv_gameplayfix_stepmultipletimes 1
 
+cl_gameplayfix_fixedcheckwatertransition 1
+
 // delay for "kill" to prevent abuse
 set g_balance_kill_delay 2
 set g_balance_kill_antispam 5
index 2e75a1b..88e921c 100644 (file)
@@ -92,7 +92,7 @@ void _Movetype_CheckWaterTransition(entity ent) // SV_CheckWaterTransition
        if(!ent.move_watertype)
        {
                // just spawned here
-               if(!autocvar_sv_gameplayfix_fixedcheckwatertransition)
+               if(!autocvar_cl_gameplayfix_fixedcheckwatertransition)
                {
                        ent.move_watertype = contents;
                        ent.move_waterlevel = 1;
@@ -114,7 +114,7 @@ void _Movetype_CheckWaterTransition(entity ent) // SV_CheckWaterTransition
        else
        {
                ent.move_watertype = CONTENT_EMPTY;
-               ent.move_waterlevel = (autocvar_sv_gameplayfix_fixedcheckwatertransition ? 0 : contents);
+               ent.move_waterlevel = (autocvar_cl_gameplayfix_fixedcheckwatertransition ? 0 : contents);
        }
 }
 
index a578e0c..287226e 100644 (file)
@@ -13,9 +13,8 @@
 .float move_bounce_stopspeed;
 .float move_nomonsters; // -1 for MOVE_NORMAL, otherwise a MOVE_ constant
 
-// TODO: what to do with this? in Xonotic, we always have it enabled anyway
-// however, it is a server setting which could in theory be disabled...?
-float autocvar_sv_gameplayfix_fixedcheckwatertransition; 
+// should match sv_gameplayfix_fixedcheckwatertransition
+var float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
 
 void Movetype_Physics_MatchTicrate(float tr, float sloppy);
 void Movetype_Physics_MatchServer(float sloppy);