- Fixed: player_t::GetSpawnClass() always returned the spawn flags for the

local player, so co-op games would spawn only the things relevant for the
  local player and not all the things relevant for all players.


SVN r344 (trunk)
This commit is contained in:
Randy Heit 2006-10-01 01:38:37 +00:00
commit c0bd4e54f4
3 changed files with 20 additions and 3 deletions

View file

@ -1197,12 +1197,24 @@ bool AInventory::TryPickup (AActor *toucher)
CCMD (printinv)
{
AInventory *item;
int pnum = consoleplayer;
if (players[consoleplayer].mo == NULL)
#ifdef _DEBUG
// Only allow peeking on other players' inventory in debug builds.
if (argv.argc() > 1)
{
pnum = atoi (argv[1]);
if (pnum < 0 || pnum >= MAXPLAYERS)
{
return;
}
}
#endif
if (players[pnum].mo == NULL)
{
return;
}
for (item = players[consoleplayer].mo->Inventory; item != NULL; item = item->Inventory)
for (item = players[pnum].mo->Inventory; item != NULL; item = item->Inventory)
{
Printf ("%s #%u (%d/%d)\n", item->GetClass()->TypeName.GetChars(),
item->InventoryID,