X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=27c04f8a4d02499a2549a81c9aedec74ec53958e;hb=3eb07615a1d828cfe7d7243509820eb8ec7a90b0;hp=d1ead11cbf1f79751c49e1f3bbfad4221e978568;hpb=db3d8b68f0aff3f1304428e9d60836b4a8013a5a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index d1ead11cb..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) { @@ -617,6 +617,7 @@ void GetCvars(float f) GetCvars_handleFloat(s, f, cvar_cl_allow_uid2name, "cl_allow_uid2name"); GetCvars_handleFloat(s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking"); GetCvars_handleFloat(s, f, cvar_cl_movement_track_canjump, "cl_movement_track_canjump"); + GetCvars_handleFloat(s, f, cvar_cl_newusekeysupported, "cl_newusekeysupported"); // fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early) if (f > 0) @@ -739,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 @@ -1121,6 +1122,8 @@ string GetGametype(); // g_world.qc void readlevelcvars(void) { // first load all the mutators + if(cvar("g_invincible_projectiles")) + MUTATOR_ADD(mutator_invincibleprojectiles); if(cvar("g_nix")) MUTATOR_ADD(mutator_nix); if(cvar("g_dodging")) @@ -1180,7 +1183,6 @@ void readlevelcvars(void) g_bloodloss = cvar("g_bloodloss"); sv_maxidle = cvar("sv_maxidle"); sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle"); - sv_pogostick = cvar("sv_pogostick"); g_ctf_reverse = cvar("g_ctf_reverse"); sv_autotaunt = cvar("sv_autotaunt"); sv_taunt = cvar("sv_taunt"); @@ -1290,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; @@ -1456,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; @@ -1630,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) { @@ -2043,7 +2047,6 @@ float MAX_IPBAN_URIS = 16; float URI_GET_DISCARD = 0; float URI_GET_IPBAN = 1; float URI_GET_IPBAN_END = 16; -float URI_GET_PLAYERSTATS_SENT = 17; void URI_Get_Callback(float id, float status, string data) { @@ -2064,10 +2067,6 @@ void URI_Get_Callback(float id, float status, string data) // online ban list OnlineBanList_URI_Get_Callback(id, status, data); } - else if (id == URI_GET_PLAYERSTATS_SENT) - { - PlayerStats_Sent_URI_Get_Callback(id, status, data); - } else { print("Received HTTP request data for an invalid id ", ftos(id), ".\n");