non-overlapping player spawns in arena modes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2454 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2008-08-31 13:07:28 +00:00
parent 1301c5d88d
commit aab03618a5
3 changed files with 83 additions and 16 deletions
+4 -2
View File
@@ -340,13 +340,15 @@ void findplayerstart(playerent *d, bool mapcenter, int arenaspawn)
entity *e = NULL;
if(!mapcenter)
{
int type = m_teammode ? team_int(d->team) : 100;
if(m_arena && arenaspawn > -1)
{
; // unfinished
int x = -1;
loopi(arenaspawn) x = findentity(PLAYERSTART, x+1, type);
if(x >= 0) e = &ents[x];
}
else if(m_teammode || m_arena)
{
int type = m_teammode ? team_int(d->team) : 100;
loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1, type);
if(spawncycle >= 0) e = &ents[spawncycle];
}