From: Mario Date: Sat, 9 Jun 2018 16:48:10 +0000 (+1000) Subject: Remove a bit more dead code and put an include in the right place X-Git-Tag: xonotic-v0.8.5~2094 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e34dc09cdfe8226382a6879ab8e4d67a11a7582c;p=xonotic%2Fxonotic-data.pk3dir.git Remove a bit more dead code and put an include in the right place --- diff --git a/qcsrc/common/mapobjects/triggers.qh b/qcsrc/common/mapobjects/triggers.qh index bfb32696a..82e7d54f0 100644 --- a/qcsrc/common/mapobjects/triggers.qh +++ b/qcsrc/common/mapobjects/triggers.qh @@ -21,6 +21,9 @@ string trigger_magicear_processmessage_forallears(entity source, float teamsay, void target_voicescript_next(entity pl); void target_voicescript_clear(entity pl); +void SUB_DontUseTargets(entity this, entity actor, entity trigger); +void SUB_UseTargets(entity this, entity actor, entity trigger); + void SUB_UseTargets_PreventReuse(entity this, entity actor, entity trigger); void generic_setactive(entity this, int act); diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index aa3890452..0b3c1b27d 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -23,6 +23,7 @@ #include #include "../common/mapobjects/subs.qh" +#include #include "../common/mapobjects/func/breakable.qh" diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 5230bd8ea..1db5dd0c5 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -277,9 +277,6 @@ void W_Porto_Remove (entity p); // Nexball float g_nexball_meter_period; -void SUB_DontUseTargets(entity this, entity actor, entity trigger); -void SUB_UseTargets(entity this, entity actor, entity trigger); - .void(entity this) reset; // if set, an entity is reset using this .void(entity this) reset2; // if set, an entity is reset using this (after calling ALL the reset functions for other entities) diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index ba0b5e96b..a8c2a76fc 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -505,38 +505,6 @@ void cvar_changes_init() cvar_purechanges = strzone(cvar_purechanges); } -void detect_maptype() -{ -#if 0 - vector o, v; - float i; - - for (;;) - { - o = world.mins; - o.x += random() * (world.maxs.x - world.mins.x); - o.y += random() * (world.maxs.y - world.mins.y); - o.z += random() * (world.maxs.z - world.mins.z); - - tracebox(o, STAT(PL_MIN), STAT(PL_MAX), o - '0 0 32768', MOVE_WORLDONLY, NULL); - if(trace_fraction == 1) - continue; - - v = trace_endpos; - - for(i = 0; i < 64; i += 4) - { - tracebox(o, '-1 -1 -1' * i, '1 1 1' * i, o - '0 0 32768', MOVE_WORLDONLY, NULL); - if(trace_fraction == 1) - continue; - LOG_INFO(ftos(i), " -> ", vtos(trace_endpos)); - } - - break; - } -#endif -} - entity randomseed; bool RandomSeed_Send(entity this, entity to, int sf) { @@ -869,8 +837,6 @@ spawnfunc(worldspawn) next_pingtime = time + 5; - detect_maptype(); - // set up information replies for clients and server to use maplist_reply = strzone(getmaplist()); lsmaps_reply = strzone(getlsmaps()); diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 8eb8beeca..dcf9ee41b 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -152,19 +152,7 @@ bool W_IsWeaponThrowable(entity this, int w) if(w == WEP_Null.m_id) return false; - #if 0 - if(start_weapons & WepSet_FromWeapon(Weapons_from(w))) - { - // start weapons that take no ammo can't be dropped (this prevents dropping the laser, as long as it continues to use no ammo) - if(start_items & IT_UNLIMITED_WEAPON_AMMO) - return false; - if((Weapons_from(w)).ammo_type == RESOURCE_NONE) - return false; - } - return true; - #else return (Weapons_from(w)).weaponthrowable; - #endif } // toss current weapon