From: Mario Date: Sun, 5 Apr 2015 11:44:32 +0000 (+1000) Subject: Remove boolean function X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c05ced3f396673cbe61f5e35cdfa0bba3ff3470f;p=xonotic%2Fxonotic-data.pk3dir.git Remove boolean function --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 2618c34b3..ff09b1606 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -339,9 +339,6 @@ string formatmessage(string msg) return msg; } -float boolean(float value) { // if value is 0 return false (0), otherwise return true (1) - return (value == 0) ? false : true; -} /* ============= @@ -483,8 +480,8 @@ void GetCvars(float f) 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"); - 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); + self.cvar_cl_accuracy_data_share = (self.cvar_cl_accuracy_data_share == 0) ? false : true; + self.cvar_cl_accuracy_data_receive = (self.cvar_cl_accuracy_data_receive == 0) ? false : true; GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign"); GetCvars_handleFloat(s, f, cvar_cl_allow_uid2name, "cl_allow_uid2name");