]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix invasion spawn priority preferring spawns that have been used recently
authorMario <mario@smbclan.net>
Mon, 9 Jan 2017 07:41:18 +0000 (17:41 +1000)
committerMario <mario@smbclan.net>
Mon, 9 Jan 2017 07:41:18 +0000 (17:41 +1000)
qcsrc/server/mutators/mutator/gamemode_invasion.qc

index aff46112c763f7ea47070e56cff43407a30d187d..e62a392ceac648250c100656868633ba5531a645 100644 (file)
@@ -48,7 +48,7 @@ entity invasion_PickSpawn()
 
        IL_EACH(g_invasion_spawns, true,
        {
-               RandomSelection_AddEnt(it, 1, ((time >= it.spawnshieldtime) ? 0.2 : 1)); // give recently used spawnpoints a very low rating
+               RandomSelection_AddEnt(it, 1, ((time < it.spawnshieldtime) ? 0.2 : 1)); // give recently used spawnpoints a very low rating
                it.spawnshieldtime = time + autocvar_g_invasion_spawnpoint_spawn_delay;
        });
 
@@ -317,6 +317,7 @@ MUTATOR_HOOKFUNCTION(inv, OnEntityPreSpawn)
 {
        entity ent = M_ARGV(0, entity);
 
+       // TODO: allow these as "rogues" or something
        if(startsWith(ent.classname, "monster_"))
        if(!(ent.spawnflags & MONSTERFLAG_SPAWNED))
                return true;