From 5e5f85d9e3dd2bb2905d9a0336354a0ff83063af Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sat, 25 Jan 2014 17:17:34 -0500 Subject: [PATCH] Add proper cvar for the gameplayfix setting --- defaultXonotic.cfg | 2 ++ qcsrc/client/movetypes.qc | 4 ++-- qcsrc/client/movetypes.qh | 5 ++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 624a581a3..c6fa7642b 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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 diff --git a/qcsrc/client/movetypes.qc b/qcsrc/client/movetypes.qc index 2e75a1bf8..88e921cbe 100644 --- a/qcsrc/client/movetypes.qc +++ b/qcsrc/client/movetypes.qc @@ -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); } } diff --git a/qcsrc/client/movetypes.qh b/qcsrc/client/movetypes.qh index a578e0c91..287226e53 100644 --- a/qcsrc/client/movetypes.qh +++ b/qcsrc/client/movetypes.qh @@ -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); -- 2.39.2