no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@683 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-11-15 19:59:42 +00:00
parent c0fde75873
commit 4197298885
+7 -7
View File
@@ -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