From 41972988855d298135bd5ee9100c657995fa52e1 Mon Sep 17 00:00:00 2001 From: driAn Date: Wed, 15 Nov 2006 19:59:42 +0000 Subject: [PATCH] no message git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@683 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 7242fb01..6759d8e4 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -315,12 +315,16 @@ float nearestenemy(vec place, char *team) int findplayerstart(playerent *d) { - if(m_teammode) + int r = fixspawn-->0 ? 4 : rnd(10)+1; + + if(m_teammode) loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1, rb_team_int(d->team)); + else if(m_arena) loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1); + else { int bestent = -1; float bestdist = -1; - loopi(rnd(4)+1) + loopi(r) { spawncycle = findentity(PLAYERSTART, spawncycle+1, rb_team_int(d->team)); if(spawncycle < 0 || spawncycle >= ents.length()) continue; @@ -329,12 +333,8 @@ int findplayerstart(playerent *d) }; return bestent; - } - else - { - int r = fixspawn-->0 ? 4 : rnd(10)+1; - loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1); }; + return spawncycle; }; void spawnplayer(playerent *d) // place at random spawn