Fix direct loading of xware in coop

A superfluous unnamed info_player_start screwed up the info_coop_start
selection heuristic. It's unneeded in coop play, therefor remove it.
This commit is contained in:
Yamagi Burmeister 2013-03-24 09:37:40 +01:00
parent 2346274d8f
commit 3f1380caac
2 changed files with 18 additions and 7 deletions

6
TODO
View File

@ -2,12 +2,6 @@ Maps with broken single player spawn point:
- None :)
Maps with broken coop spawnpoints:
- xware: The info_player_start is at the same place as the first
info_coop_start. So the second player is placed in the same
place as the first one... This only happens when the map is
loaded by console, not when entering from xreactor. Possible
solutions: 1) mapquirk, move the first info_coop_start out
of the way. 2) logic quirk, simulate entering from xreactor.
- xship: Has only one info_player_start and no info_coop_start. The
solution is to synthesize 3 info_coop_start by map quirks,
but there's hardly any room for them...

View File

@ -15,7 +15,21 @@ void Touch_Item(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
void
SP_FixCoopSpots(edict_t *self)
{
/* Necessary for savegame compatiblity */
/* Entity number 292 is an unnamed info_player_start
next to a named info_player_start. Delete it, if
we're in coop since it screws up the spawnpoint
selection heuristic in SelectCoopSpawnPoint().
This unnamed info_player_start is selected as
spawnpoint for player 0, therefor none of the
named info_coop_start() matches... */
if(Q_stricmp(level.mapname, "xware") == 0)
{
if (self->s.number == 292)
{
G_FreeEdict(self);
self = NULL;
}
}
}
void
@ -46,6 +60,9 @@ SP_info_player_start(edict_t *self)
{
return;
}
/* Fix coop spawn points */
SP_FixCoopSpots(self);
}
/*