From: Mario Date: Fri, 24 Jun 2016 06:38:44 +0000 (+1000) Subject: Fix a warning when spawning in CTS X-Git-Tag: xonotic-v0.8.2~700^2~133 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d2cda9bbc1122e3e4d7534bd87694f0990865a08;p=xonotic%2Fxonotic-data.pk3dir.git Fix a warning when spawning in CTS --- diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 21112d93f..4be19b879 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -252,16 +252,16 @@ vector Spawn_Score(entity this, entity spot, float mindist, float teamcheck) if(spot.target != "") { int found = 0; - FOREACH_ENTITY_STRING(targetname, spot.target, + for(entity targ = findchain(targetname, spot.target); targ; targ = targ.chain) { ++found; - if(it.spawn_evalfunc) + if(targ.spawn_evalfunc) { - spawn_score = it.spawn_evalfunc(it, this, spot, spawn_score); + spawn_score = targ.spawn_evalfunc(targ, this, spot, spawn_score); if(spawn_score.x < 0) return spawn_score; } - }); + } if(!found) {