Clients who leave my Realistic Space server leave behind their player object, which can then still be acted upon by forces such as other players or suffocation. When the client rejoins, they re-inherit their player, and (theoretically) get all their tools back.
The problem is, I can't replicate the problem. The relevant code is:
package RealSpace
{
...
function GameConnection::createPlayer(%cl, %trans)
{
...
if(isObject(%pl))
{
%cl.setControlObject(%pl);
if(isObject(%this = %pl.client) && %this.getClassName() $= "AIConnection")
{
%cl.batteryPower = %this.batteryPower;
%cl.suitDamage = %this.suitDamage;
%cl.noSuit = %this.noSuit;
%this.delete();
}
%pl.client = %cl;
%cl.player = %pl;
PersistentPlayers.remove(%pl);
%pl.setShapeNameColor("1 1 1");
for(%i=0;%i<5;%i++)
messageClient(%cl, 'MsgItemPickup', '', %i, isObject(%tool = %pl.tool[%i]) ? %tool.getID() : -1, 1);
}
...
}
...
};
activatePackage("RealSpace");
Clearly, there's something more that controls player creation and/or spawning for the first time, but I can't figure it out.