From: Rudolf Polzer Date: Sat, 23 Apr 2011 20:27:09 +0000 (+0200) Subject: dom point selection: show a warning when no dom points exist. Added a TODO comment... X-Git-Tag: xonotic-v0.5.0~264^2~22 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f0e41abfce74c5b8d57937988e1e79127cc50317;p=xonotic%2Fxonotic-data.pk3dir.git dom point selection: show a warning when no dom points exist. Added a TODO comment to remove this later, and instead error. --- diff --git a/qcsrc/server/domination.qc b/qcsrc/server/domination.qc index 891863f97..de18bfdd5 100644 --- a/qcsrc/server/domination.qc +++ b/qcsrc/server/domination.qc @@ -614,22 +614,15 @@ void dom_delayedinit() // if no control points are found, spawn defaults if (find(world, classname, "dom_controlpoint") == world) { - // here follow default domination points for each map - /* - if (world.model == "maps/e1m1.bsp") - { - dom_spawnpoint('0 0 0'); - } - else - */ + // TODO in a few months (maybe 2011/08): change this into error() and remove this very poor dom point selection + backtrace("This map contains no dom_controlpoint entities. A very poor dom point placement will be chosen. Please fix the map."); + + // if no supported map was found, make every deathmatch spawn a point + head = find(world, classname, "info_player_deathmatch"); + while (head) { - // if no supported map was found, make every deathmatch spawn a point - head = find(world, classname, "info_player_deathmatch"); - while (head) - { - dom_spawnpoint(head.origin); - head = find(head, classname, "info_player_deathmatch"); - } + dom_spawnpoint(head.origin); + head = find(head, classname, "info_player_deathmatch"); } }