Skip to content

Commit

Permalink
Client: Reveal automap for PT_ALLMAP
Browse files Browse the repository at this point in the history
The client needs to reveal the automap when it receives
an update about the Map power up.
  • Loading branch information
skyjake committed Aug 9, 2011
1 parent 37cd2c1 commit 371157c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions doomsday/plugins/common/src/d_netcl.c
Expand Up @@ -486,6 +486,15 @@ void NetCl_UpdatePlayerState(byte *data, int plrNum)
ST_HUDUnHide(plrNum, HUE_ON_PICKUP_POWER);

pl->powers[i] = val;

// Should we reveal the map?
if(val && i == PT_ALLMAP && plrNum == CONSOLEPLAYER)
{
#ifdef _DEBUG
Con_Message("NetCl_UpdatePlayerState: Revealing automap.\n");
#endif
AM_RevealMap(AM_MapForPlayer(plrNum), true);
}
}
}
#endif
Expand Down
3 changes: 1 addition & 2 deletions doomsday/plugins/common/src/d_netsv.c
Expand Up @@ -1076,8 +1076,7 @@ void NetSv_SendPlayerState(int srcPlrNum, int destPlrNum, int flags,
int i, k;

if(IS_CLIENT || !pl->plr->inGame ||
(destPlrNum >= 0 && destPlrNum < MAXPLAYERS &&
!players[destPlrNum].plr->inGame))
(destPlrNum >= 0 && destPlrNum < MAXPLAYERS && !players[destPlrNum].plr->inGame))
return;

#ifdef _DEBUG
Expand Down

0 comments on commit 371157c

Please sign in to comment.