]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More intrusiveness
authorMario <mario@smbclan.net>
Sun, 21 Aug 2016 11:12:56 +0000 (21:12 +1000)
committerMario <mario@smbclan.net>
Sun, 21 Aug 2016 11:12:56 +0000 (21:12 +1000)
qcsrc/common/triggers/func/breakable.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/client.qc
qcsrc/server/defs.qh
qcsrc/server/sv_main.qc

index 2b7a1155f483b101c8b122a5986df60f8d270219..b922a65b6af994501fc21bc0e5d8152e190eef83 100644 (file)
@@ -351,7 +351,7 @@ spawnfunc(func_breakable)
        this.reset = func_breakable_reset;
        this.reset(this);
 
-       this.init_for_player_needed = 1;
+       IL_PUSH(g_initforplayer, this);
        this.init_for_player = func_breakable_init_for_player;
 
        CSQCMODEL_AUTOINIT(this);
index 502e2532c6924add3d39208cbf90298d6781f450..ca12d0d651cf53e9caa39a6afa01bd3528a466f8 100644 (file)
@@ -436,7 +436,7 @@ void bot_removefromlargestteam()
        int bestcount = 0;
 
        int bcount = 0;
-       FOREACH_ENTITY_FLOAT(isbot, true,
+       FOREACH_CLIENT(it.isbot,
        {
                ++bcount;
 
@@ -486,7 +486,7 @@ void bot_removenewest()
        entity best = NULL;
        int bcount = 0;
 
-       FOREACH_ENTITY_FLOAT(isbot, true,
+       FOREACH_CLIENT(it.isbot,
        {
                ++bcount;
 
index 0c6f66a2cc2cbc23347298bf54582a29d827ecdb..47bbbc5452b3f2049afa04a708a6d91d28fcdf7a 100644 (file)
@@ -1196,7 +1196,7 @@ void ClientConnect(entity this)
        if (IS_REAL_CLIENT(this))
                sv_notice_join(this);
 
-       FOREACH_ENTITY_FLOAT(init_for_player_needed, true, {
+       IL_EACH(g_initforplayer, it.init_for_player, {
                it.init_for_player(it, this);
        });
 
index e2e73c58d88ca53080800d423f88af2ffdf98a3a..b36906c7f430a801e2df13444e700872ea96d715 100644 (file)
@@ -426,7 +426,6 @@ const int MIF_GUIDED_CONFUSABLE = MIF_GUIDED_HEAT | MIF_GUIDED_AI;
 
 .string cvar_cl_physics;
 
-.bool init_for_player_needed;
 .void(entity this, entity player) init_for_player;
 
 IntrusiveList g_monsters;
@@ -449,3 +448,6 @@ STATIC_INIT(g_projectiles) { g_projectiles = IL_NEW(); }
 
 IntrusiveList g_items;
 STATIC_INIT(g_items) { g_items = IL_NEW(); }
+
+IntrusiveList g_initforplayer;
+STATIC_INIT(g_initforplayer) { g_initforplayer = IL_NEW(); }
index 1bb6974eb03ccf0460c46210dda635f8ec45a34f..5dbcc8fd25161848bedcc1e5d99c07f6cf385adf 100644 (file)
@@ -191,7 +191,7 @@ void StartFrame()
        }
 #endif
 
-       FOREACH_ENTITY_FLOAT(csqcprojectile_clientanimate, true, CSQCProjectile_Check(it));
+       IL_EACH(g_projectiles, it.csqcprojectile_clientanimate, CSQCProjectile_Check(it));
 
        if (RedirectionThink()) return;