X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=27c04f8a4d02499a2549a81c9aedec74ec53958e;hb=d0048a7d590a5485313c93328627b9df7a2ca47f;hp=c80e9ca03e26f52a6c41aad5ae355ebd27f82393;hpb=8aa33216649215618dd1de7be0f48ca77449bb0c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index c80e9ca03..27c04f8a4 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -367,13 +367,13 @@ void spawnfunc_target_location() self.classname = "target_location"; // location name in netname // eventually support: count, teamgame selectors, line of sight? -}; +} void spawnfunc_info_location() { self.classname = "target_location"; self.message = self.netname; -}; +} string NearestLocation(vector p) { @@ -740,13 +740,13 @@ string playername(entity p) vector randompos(vector m1, vector m2) { - local vector v; + vector v; m2 = m2 - m1; v_x = m2_x * random() + m1_x; v_y = m2_y * random() + m1_y; v_z = m2_z * random() + m1_z; return v; -}; +} //#NO AUTOCVARS START @@ -1292,7 +1292,9 @@ float sound_allowed(float dest, entity e) { if (e.classname == "body") e = e.enemy; - if (e.owner && e.owner != e) + else if (e.realowner && e.realowner != e) + e = e.realowner; + else if (e.owner && e.owner != e) e = e.owner; else break; @@ -1458,7 +1460,7 @@ float spamsound(entity e, float chan, string samp, float vol, float atten) void play2team(float t, string filename) { - local entity head; + entity head; if (autocvar_bot_sound_monopoly) return; @@ -1632,7 +1634,7 @@ void precache() if(autocvar_sv_precacheweapons) { //precache weapon models/sounds - local float wep; + float wep; wep = WEP_FIRST; while (wep <= WEP_LAST) {