From: Mario Date: Mon, 9 Jan 2017 07:41:18 +0000 (+1000) Subject: Fix invasion spawn priority preferring spawns that have been used recently X-Git-Tag: xonotic-v0.8.2~311 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e1922234564c911fad5b2dc6668545286dc8e081;p=xonotic%2Fxonotic-data.pk3dir.git Fix invasion spawn priority preferring spawns that have been used recently --- diff --git a/qcsrc/server/mutators/mutator/gamemode_invasion.qc b/qcsrc/server/mutators/mutator/gamemode_invasion.qc index aff46112c..e62a392ce 100644 --- a/qcsrc/server/mutators/mutator/gamemode_invasion.qc +++ b/qcsrc/server/mutators/mutator/gamemode_invasion.qc @@ -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;