Skip to content

Commit

Permalink
Fixed|Multiplayer: Picked up items disappear when they shouldn't
Browse files Browse the repository at this point in the history
An oversight in the weapon pickup logic.

IssueID #1714
  • Loading branch information
skyjake committed Apr 22, 2014
1 parent bb21ca2 commit c4d2fb5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/plugins/doom/src/p_inter.c
Expand Up @@ -550,6 +550,12 @@ static dd_bool pickupWeapon(player_t *plr, weapontype_t weaponType,
}
}

if(IS_NETGAME && G_Ruleset_Deathmatch() != 2)
{
// Leave placed weapons forever on net games.
return false;
}

return pickedWeapon;
}

Expand Down
4 changes: 4 additions & 0 deletions doomsday/plugins/heretic/src/p_inter.c
Expand Up @@ -576,6 +576,10 @@ static dd_bool pickupWeapon(player_t *plr, weapontype_t weaponType,
}
}

// Leave placed weapons forever on net games.
if(IS_NETGAME && !G_Ruleset_Deathmatch())
return false;

return pickedWeapon;
}

Expand Down
4 changes: 4 additions & 0 deletions doomsday/plugins/hexen/src/p_inter.c
Expand Up @@ -414,6 +414,10 @@ dd_bool P_GiveWeapon2(player_t *plr, weapontype_t weaponType, playerclass_t matc
gaveWeapons |= (int)giveOneWeapon(plr, weaponType, matchClass) << (int)weaponType;
}

// Leave placed weapons forever on net games.
if(IS_NETGAME && !G_Ruleset_Deathmatch())
return false;

return gaveWeapons != 0;
}

Expand Down

0 comments on commit c4d2fb5

Please sign in to comment.