X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Futil.qc;h=b6e2f348b7753a8bd3aeb1c9d4924161c171f7b6;hb=c1b058929459a95a525deff9e0ebb76a513a7c22;hp=4a3b2dbf4924feebfb9bbf6e5b6a61c25d2bfa3f;hpb=c6d440124df99b8b1f48fe7666332273535eb413;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 4a3b2dbf4..b6e2f348b 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -4,7 +4,7 @@ #include "../dpdefs/csprogsdefs.qh" #include "../client/defs.qh" #include "constants.qh" - #include "../warpzonelib/mathlib.qh" + #include "../client/mutators/events.qh" #include "mapinfo.qh" #include "notifications.qh" #include "deathtypes.qh" @@ -12,10 +12,10 @@ #elif defined(SVQC) #include "../dpdefs/progsdefs.qh" #include "../dpdefs/dpextensions.qh" - #include "../warpzonelib/mathlib.qh" #include "constants.qh" #include "../server/autocvars.qh" #include "../server/defs.qh" + #include "../server/mutators/events.qh" #include "notifications.qh" #include "deathtypes.qh" #include "mapinfo.qh" @@ -2059,6 +2059,10 @@ float get_model_parameters(string m, float sk) } get_model_parameters_fixbone = 0; +#ifndef MENUQC + MUTATOR_CALLHOOK(ClearModelParams); +#endif + if (!m) return 1; @@ -2120,6 +2124,9 @@ float get_model_parameters(string m, float sk) get_model_parameters_bone_upperbody = s; if(c == "bone_weapon") get_model_parameters_bone_weapon = s; + #ifndef MENUQC + MUTATOR_CALLHOOK(GetModelParams, c, s); + #endif for(int i = 0; i < MAX_AIM_BONES; ++i) if(c == strcat("bone_aim", ftos(i))) { @@ -2236,30 +2243,6 @@ float u8_strsize(string s) return l; } -// translation helpers -string language_filename(string s) -{ - string fn; - float fh; - fn = prvm_language; - if(fn == "" || fn == "dump") - return s; - fn = strcat(s, ".", fn); - if((fh = fopen(fn, FILE_READ)) >= 0) - { - fclose(fh); - return fn; - } - return s; -} -string CTX(string s) -{ - float p = strstrofs(s, "^", 0); - if(p < 0) - return s; - return substring(s, p+1, -1); -} - // x-encoding (encoding as zero length invisible string) const string XENCODE_2 = "xX"; const string XENCODE_22 = "0123456789abcdefABCDEF"; @@ -2570,7 +2553,7 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t #ifdef SVQC vector combine_to_vector(float x, float y, float z) { - vector result; result.x = x; result.y = y; result.z = z; + vector result; result_x = x; result_y = y; result_z = z; return result; }