From: Florian Paul Schmidt Date: Sat, 20 Mar 2010 11:52:21 +0000 (+0100) Subject: - made stuff local X-Git-Tag: xonotic-v0.1.0preview~680^2~20 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c629bdffdad22defbee05a1b54e9c52a9a0c2085;p=xonotic%2Fxonotic-data.pk3dir.git - made stuff local --- diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 6d8838e8f..f18c610aa 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -637,5 +637,3 @@ string deathmessage; .float cvar_cl_accuracy_data_share; .float cvar_cl_accuracy_data_receive; - -.float cvar_cl_dodging_timeout; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 38c5bd03c..0cf246331 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -593,6 +593,8 @@ float w_getbestweapon(entity e); void GetCvars(float f) { string s; + MUTATOR_CALLHOOK(GetCvars); + if (f > 0) s = strcat1(argv(f)); GetCvars_handleFloat(s, f, autoswitch, "cl_autoswitch"); @@ -619,7 +621,6 @@ void GetCvars(float f) GetCvars_handleFloat(s, f, cvar_cl_hitsound, "cl_hitsound"); GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_share, "cl_accuracy_data_share"); GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_receive, "cl_accuracy_data_receive"); - GetCvars_handleFloat(s, f, cvar_cl_dodging_timeout, "cl_dodging_timeout"); self.cvar_cl_accuracy_data_share = boolean(self.cvar_cl_accuracy_data_share); self.cvar_cl_accuracy_data_receive = boolean(self.cvar_cl_accuracy_data_receive); diff --git a/qcsrc/server/mutators/base.qh b/qcsrc/server/mutators/base.qh index 61eb83127..749582665 100644 --- a/qcsrc/server/mutators/base.qh +++ b/qcsrc/server/mutators/base.qh @@ -54,3 +54,4 @@ MUTATOR_HOOKABLE(OnEntityPreSpawn); // return error to prevent entity spawn, or MUTATOR_HOOKABLE(PlayerPreThink); MUTATOR_HOOKABLE(GetPressedKeys); MUTATOR_HOOKABLE(PlayerPhysics); +MUTATOR_HOOKABLE(GetCvars); diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator_dodging.qc index 4b1660b67..dbafdc67c 100644 --- a/qcsrc/server/mutators/mutator_dodging.qc +++ b/qcsrc/server/mutators/mutator_dodging.qc @@ -1,4 +1,7 @@ +.float cvar_cl_dodging_timeout; + + // these are used to store the last key press time for each of the keys.. .float last_FORWARD_KEY_time; .float last_BACKWARD_KEY_time; @@ -31,6 +34,14 @@ void dodging_Initialize() { self.dodging_direction_y = 0; } +MUTATOR_HOOKFUNCTION(dodging_GetCvars) { + string s; + float f; + + GetCvars_handleFloat(s, f, cvar_cl_dodging_timeout, "cl_dodging_timeout"); + return 0; +} + MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) { float common_factor; diff --git a/qcsrc/server/mutators/mutator_dodging.qh b/qcsrc/server/mutators/mutator_dodging.qh index ab0c01417..8e8be2513 100644 --- a/qcsrc/server/mutators/mutator_dodging.qh +++ b/qcsrc/server/mutators/mutator_dodging.qh @@ -1 +1,2 @@ -// \ No newline at end of file +float g_dodging; +