]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove a bit more dead code and put an include in the right place
authorMario <mario@smbclan.net>
Sat, 9 Jun 2018 16:48:10 +0000 (02:48 +1000)
committerMario <mario@smbclan.net>
Sat, 9 Jun 2018 16:48:10 +0000 (02:48 +1000)
qcsrc/common/mapobjects/triggers.qh
qcsrc/server/cheats.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/weapons/throwing.qc

index bfb32696a53e16c94d7c1c3d55d8f38af1b1cb0a..82e7d54f0283781eb42fde552e99adfc14c6b4da 100644 (file)
@@ -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);
index aa38904526e95a9eba875c9b3d7a9104daaeb08f..0b3c1b27d6bf211336acbe16c4daffa60df81d9a 100644 (file)
@@ -23,6 +23,7 @@
 #include <common/weapons/_all.qh>
 
 #include "../common/mapobjects/subs.qh"
+#include <common/mapobjects/triggers.qh>
 
 #include "../common/mapobjects/func/breakable.qh"
 
index 5230bd8ea6ac1279c964cf61a8f052cedfa5806a..1db5dd0c5b637244ef97e3a68271975bd393b8d0 100644 (file)
@@ -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)
 
index ba0b5e96be1b53942e887d4065595140b7b78a05..a8c2a76fc9bbb80375a2b5512e81ec7afa59319f 100644 (file)
@@ -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());
index 8eb8beeca0336c79604197037489f5f05403093d..dcf9ee41b33f2805c2364b4c909bda592ff4feb7 100644 (file)
@@ -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