Player is not preserved between levels
Using r1647, player's health/weapons/ammo/armor is not preserved between levels. This reportedly doesn't happen to all clients.
Have not been able to reproduce
Yes. This appears to be fixed. Closing bug. Will reopen if I experience the issue again.
Hex_Vulture reports that this is still happening.
< HeX9109> Reproduced
< HeX9109> Had 4 of the same clients in a server, used player 4 to gather stuff in e1m1 and exit
< HeX9109> next level I kept stuffs
< HeX9109> I join a server with player 5 and switch to player 1, next level I lose everything
Hex and I figured out how to reproduce this earlier. When players connect to Odamex servers, the server continues to assign higher and higher player ids. When a player's ID is equal or greater to 5, they will lose all items/weapons/status on every level change. Any players in the 1-4 range will keep their items.
Fixed in r1762. Please test.
Tested with Ladna, Hex, and Almn on r1762. Fix seems to work! Great job Hyper Eye, marking resolved
I'm going to go ahead and paste some IRC chat log in here just in case this breaks again:
[19:56] <@Hyper_Eye> Hmmm... here was the commit log on that... - Add P_PreservePlayer() and use it to handle coop player preservation at level start.
[19:56] <@Hyper_Eye> - Use G_DoReborn() to handle coop player spawn at level start instead of P_SpawnPlayer().
[19:56] <@Hyper_Eye> Fixes bug 590
[19:57] <@Hyper_Eye> So.. I added the P_PreservePlayer() function to fix that bug.
[19:57] <@Hyper_Eye> I wonder if this was another code merge boo boo.
[19:58] <dr_sean> I don't see a call to P_PreservePlayer() in G_DoReborn()
[19:59] <@Hyper_Eye> Here is where the call was when it was implemented: http://odamex.net/svn/diff.php?repname=Odamex&path=%2Ftrunk%2Fcommon%2Fp_setup.cpp&rev=1762&peg=1762
[20:00] <@Hyper_Eye> It looks like it is missing.
[20:00] <dr_sean> ok, it's still in that same place
[20:00] <@Hyper_Eye> Oh... I must have goofed my search then.
[20:00] <dr_sean> it's in p_setup.cpp
[20:01] <@Hyper_Eye> Oh... it was renamed.
[20:01] <dr_sean> oh, yeah
[20:01] <dr_sean> I set up a printf in SV_PreservePlayer and it's definitely called in 0.6-dev, but it appears to do nothing, probably because some other function jacked the player's inventory prior
[20:04] <@Hyper_Eye> Well.. I'll toss in a breakpoint and see which condition is not being met.
[20:04] <dr_sean> I'm doing the same
[20:14] <@Hyper_Eye> yeah... by the time it gets there it shows me only owning a pistol and fist.
[20:14] <@Hyper_Eye> I'm betting this is a p_mobj merge issue...
[20:17] <@Hyper_Eye> I would suspect P_SpawnMapThing()
[20:18] <@Hyper_Eye> I think I may be onto it.
[20:18] <dr_sean> ok, i'm comparing that function side-by-side with the 0.5.1 version
[20:20] <@Hyper_Eye> I'm about to try a change.
[20:26] <@Hyper_Eye> yeah... merge bug.
[20:26] <@Hyper_Eye> Is there a ticket for this issue?
[20:35] <dr_sean> I don't think there is
[20:36] <dr_sean> I'll post a bug to the tracker and then verify when it's committed or whatever
[20:37] <CIA-4> hypereye 0.6-dev * r2201 /common/p_mobj.cpp: The server should use SV_PreservePlayer() to handle spawning a coop player when the level changes.
This had to be re-fixed as of r2201