Add a comment for the last revision

This commit is contained in:
Yamagi Burmeister 2011-10-23 21:02:55 +00:00
parent ef85571d07
commit 034e72dced

View file

@ -1185,30 +1185,37 @@ SelectSpawnPoint(edict_t *ent, vec3_t origin, vec3_t angles)
} }
} }
index = ent->client - game.clients; /* If we are in coop and we didn't find a coop
spawnpoint due to map bugs (not correctly
while(counter < 3) connected or the map was loaded via console
and thus no previously map is known to the
client) use one in 384 units radius. */
if (coop->value)
{ {
coopspot = G_Find(coopspot, FOFS(classname), "info_player_coop"); index = ent->client - game.clients;
if (!coopspot) while(counter < 3)
{ {
break; coopspot = G_Find(coopspot, FOFS(classname), "info_player_coop");
}
VectorSubtract(coopspot->s.origin, spot->s.origin, d); if (!coopspot)
if ((VectorLength(d) < 384))
{
if (index == counter)
{ {
spot = coopspot;
gi.dprintf("gotscha!\n");
break; break;
} }
else
VectorSubtract(coopspot->s.origin, spot->s.origin, d);
if ((VectorLength(d) < 384))
{ {
counter++; if (index == counter)
{
spot = coopspot;
break;
}
else
{
counter++;
}
} }
} }
} }