X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=fd9520fe8c8564706d21b830aa340a2da9ea7aa0;hb=036ae8fdbc2cfad6331dbc249e6fa3c29e6f9b29;hp=ee993d5ec09b39c864a9b4220b3d328f4c5910f7;hpb=dd70edcca2f19a7b95b1f0441db75c154bf10606;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index ee993d5ec..fd9520fe8 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -155,63 +155,6 @@ void GameLogClose() } } -float spawnpoint_nag; -void relocate_spawnpoint() -{ - // nudge off the floor - setorigin(self, self.origin + '0 0 1'); - - tracebox(self.origin, PL_MIN, PL_MAX, self.origin, TRUE, self); - if (trace_startsolid) - { - vector o; - o = self.origin; - self.mins = PL_MIN; - self.maxs = PL_MAX; - if (!move_out_of_solid(self)) - objerror("could not get out of solid at all!"); - print("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1')); - print(" needs to be moved out of solid, e.g. by '", ftos(self.origin_x - o_x)); - print(" ", ftos(self.origin_y - o_y)); - print(" ", ftos(self.origin_z - o_z), "'\n"); - if (autocvar_g_spawnpoints_auto_move_out_of_solid) - { - if (!spawnpoint_nag) - print("\{1}^1NOTE: this map needs FIXING (it contains spawnpoints in solid, see server log)\n"); - spawnpoint_nag = 1; - } - else - { - setorigin(self, o); - self.mins = self.maxs = '0 0 0'; - objerror("player spawn point in solid, mapper sucks!\n"); - return; - } - } - - self.use = spawnpoint_use; - self.team_saved = self.team; - if (!self.cnt) - self.cnt = 1; - - if (have_team_spawns != 0) - if (self.team) - have_team_spawns = 1; - have_team_spawns_forteam[self.team] = 1; - - if (autocvar_r_showbboxes) - { - // show where spawnpoints point at too - makevectors(self.angles); - entity e; - e = spawn(); - e.classname = "info_player_foo"; - setorigin(e, self.origin + v_forward * 24); - setsize(e, '-8 -8 -8', '8 8 8'); - e.solid = SOLID_TRIGGER; - } -} - #define strstr strstrofs /* // NOTE: DO NOT USE THIS FUNCTION TOO OFTEN. @@ -515,7 +458,7 @@ void GetCvars_handleFloatOnce(string thisname, float f, .float field, string nam stuffcmd(self, strcat("cl_cmd sendcvar ", name, "\n")); } } -float w_getbestweapon(entity e); +float w_getbestweapon(entity e); // WEAPONTODO string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(string wo) { string o; @@ -699,11 +642,11 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns) d = FALSE; } else if (g_cts) - d = (i == WEP_SHOTGUN); + d = (i == WEP_SHOTGUN); // todo: how to handle shotgun in CTS mode? we're removing it.. so.... else if (g_nexball) d = 0; // weapon is set a few lines later else - d = (i == WEP_LASER || i == WEP_SHOTGUN); + d = (i == WEP_LASER); if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook d |= (i == WEP_HOOK); @@ -923,7 +866,7 @@ void readplayerstartcvars() { e = get_weaponinfo(i); if(WEPSET_CONTAINS_AW(start_weapons, i) || WEPSET_CONTAINS_AW(warmup_start_weapons, i)) - weapon_action(i, WR_PRECACHE); + WEP_ACTION(i, WR_INIT); } start_ammo_shells = max(0, start_ammo_shells); @@ -1444,18 +1387,6 @@ void precache() precache_sound ("weapons/hook_impact.wav"); // hook } - if(autocvar_sv_precacheweapons) - { - //precache weapon models/sounds - float wep; - wep = WEP_FIRST; - while (wep <= WEP_LAST) - { - weapon_action(wep, WR_PRECACHE); - wep = wep + 1; - } - } - precache_model("models/elaser.mdl"); precache_model("models/laser.mdl"); precache_model("models/ebomb.mdl");