MantisBT - Zandronum
View Issue Details
0002192Zandronum[All Projects] Bugpublic2015-04-16 14:212025-04-08 12:09
Arco 
Dusk 
normalminoralways
needs reviewopen 
MicrosoftWindowsXP/Vista/7
2.0 
 
0002192: sv_sharekeys doesn't account for sv_coop_loseinventory upon respawning
When both sv_sharekeys and sv_coop_loseinventory are true, you'll lose all of the keys in your inventory when you die.
1. zandronum.exe -iwad doom2.wad -host -warp map02
2. Make sure sv_sharekeys and sv_coop_loseinventory are true at the same time.
3. Collect a key and then type "kill" in console.
4. Respawn.
No tags attached.
Issue History
2015-04-16 14:21ArcoNew Issue
2015-04-16 14:22ArcoDescription Updatedbug_revision_view_page.php?rev_id=6968#r6968
2015-04-16 15:42DuskAssigned To => Dusk
2015-04-16 15:42DuskStatusnew => assigned
2015-04-16 15:46DuskNote Added: 0012118
2015-04-16 15:51DuskNote Edited: 0012118bug_revision_view_page.php?bugnote_id=12118#r6970
2015-04-16 15:51DuskStatusassigned => needs review
2015-04-16 15:52DuskStatusneeds review => assigned
2015-04-16 20:11DuskNote Added: 0012120
2015-04-16 20:11DuskStatusassigned => needs review
2016-01-15 05:23ArcoNote Added: 0014094
2025-04-08 12:09unknownnaNote Added: 0024396

Notes
(0012118)
Dusk   
2015-04-16 15:46   
(edited on: 2015-04-16 15:51)
sv_coop_losekeys appears to also be affected...

This is somewhat problematic. sv_coop_loseinventory causes the player mobj to call DestroyAllInventory, which does exactly that. It is also used elsewhere, including AActor::Destroy... so I'm a bit uncomfortable in putting a shared keys exception in the mix. That limits our options a bit:

- replace the DestroyAllInventory call with a for loop. This causes a delta increase but would keep us to retain the functionality of both cvars
- apply shared keys effect after APlayerPawn::FilterCoopRespawnInventory has done its job. IMO this is probably the best solution, though can cause some bandwidth increase though since players don't die very often this is probably neglegible.
- force sv_coop_loseinventory and sv_coop_losekeys off if sv_sharekeys is on. IMO this is a last-ditch measure and not one I want to pursue.

(0012120)
Dusk   
2015-04-16 20:11   
Done:'https://bitbucket.org/crimsondusk/zandronum-sandbox/compare/d6dc2ef..eba5568 [^]'
I decided to give it a bit more rework than originally intended. Again.
(0014094)
Arco   
2016-01-15 05:23   
The link appears to have been deleted...
(0024396)
unknownna   
2025-04-08 12:09   
While investigating some other issue, I came across this, and the issue still persists to 3.2. The collected keys are needlessly removed from the inventory upon respawning if "sv_coop_loseinventory" and/or "sv_coop_losekeys" are set to 1. Newly connected clients and spectators turning into real players however get all the collected keys stored on the server.