Skip to content

Commit

Permalink
Heretic: Fixing multiplayer issues
Browse files Browse the repository at this point in the history
Fixed problems with the inventory (more issues remain there). Also
fixed ammo amount updates and intermission interaction.
  • Loading branch information
skyjake committed May 7, 2011
1 parent b5a4f9b commit 28804c6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/dd_loop.c
Expand Up @@ -364,7 +364,7 @@ void DD_Ticker(timespan_t time)

// Set frametime back by one tick (to stay in the 0..1 range).
realFrameTimePos -= 1;
assert(realFrameTimePos < 1);
//assert(realFrameTimePos < 1);

// Camera smoothing: now that the world tic has occurred, the next sharp
// position can be processed.
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/hu_inventory.c
Expand Up @@ -606,7 +606,7 @@ void Hu_InventoryOpen(int player, boolean show)
return;

plr = &players[player];
if(!((plr->plr->flags & DDPF_LOCAL) && plr->plr->inGame))
if(!plr->plr->inGame)
return;

inv = &hudInventories[player];
Expand Down Expand Up @@ -688,7 +688,7 @@ boolean Hu_InventoryMove(int player, int dir, boolean canWrap, boolean silent)
return false;

plr = &players[player];
if(!((plr->plr->flags & DDPF_LOCAL) && plr->plr->inGame))
if(!plr->plr->inGame)
return false;
inv = &hudInventories[player];

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/common/src/p_player.c
Expand Up @@ -341,6 +341,7 @@ void P_ShotAmmo(player_t *player)
player->ammo[i].owned = MAX_OF(0,
player->ammo[i].owned - wInfo->mode[fireMode].perShot[i]);
}
player->update |= PSF_AMMO;
}

/**
Expand Down
7 changes: 4 additions & 3 deletions doomsday/plugins/common/src/p_user.c
Expand Up @@ -1836,11 +1836,12 @@ void P_PlayerThink(player_t *player, timespan_t ticLength)
if(!IS_CLIENT) // Locally only.
{
P_PlayerThinkSounds(player);
}

#if __JHERETIC__ || __JHEXEN__
P_PlayerThinkInventory(player);
P_PlayerThinkInventory(player);
P_PlayerThinkItems(player);
#endif
P_PlayerThinkItems(player);
}

P_PlayerThinkUse(player);
P_PlayerThinkWeapons(player);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/jheretic/src/in_lude.c
Expand Up @@ -405,8 +405,8 @@ void IN_Ticker(void)
IN_WaitStop();
return;
}
IN_CheckForSkip();
}
IN_CheckForSkip();

// Counter for general background animation.
bcnt++;
Expand Down Expand Up @@ -489,7 +489,7 @@ void IN_CheckForSkip(void)

for(i = 0, player = players; i < MAXPLAYERS; ++i, player++)
{
if(players->plr->inGame)
if(player->plr->inGame)
{
if(player->brain.attack)
{
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jhexen/src/in_lude.c
Expand Up @@ -307,7 +307,7 @@ static void CheckForSkip(void)

for(i = 0, player = players; i < MAXPLAYERS; ++i, player++)
{
if(players[i].plr->inGame)
if(player->plr->inGame)
{
if(player->brain.attack)
{
Expand Down

0 comments on commit 28804c6

Please sign in to comment.