I try to understand code around this logic.
We have filter in view.inv AddInventory() where server only send corpses to the client of the player owning this corpse.
But at the moment a player applies his corpse, server send an update item, what is redirected to insert item. This should normally not be send to other players, when we want to filter out this item. But atm other players clients get this information and show these corpses.
At this state client and server are asyncron. Other player can make a step aside and walk back the spot, then the corpse is vanished. This behavior must be around container_link logics, where all players client get be informed, that there was a corpse inserted (redirected update) on that map spot.
This leads for sure to situations, where client send the wrong corpses to server. We had this, when in group, players used "loot all" and looted the wrong corpse.
We need to find this place, where server sends this insert item to wrong clients.
Edit:
For sure we have a call for NotifyClients() for this corpse.
Edit:
We should filter this out in NotifyClients()
/* If op (not this) is on a map... */
if (op->map)
{
// we need to filter out clients not allowed to see this corpse
// this is a check for SUBTYPE_CONTAINER_CORPSE_group not owned by "this"
if (op->type == CONTAINER &&
op->subtype == SUBTYPE_CONTAINER_CORPSE_group &&
op->slaying != pl->ob->name)
{
continue;
}
But we should stop this server/client asyncronities. If this is the reason, we loop endless, this would be a really bad site effect of sending a client wrong corpse.
The whole redirection to insert cmd, when we only want an update is broken.
Vanishing bags at stacks above 15 or wrong sended corpses in group looting? We need to stop this.
This shows also, that we can't trust client. If client sends a "get all" on an object, what should normally not sended to client before, that's wrong.
So filtering out not owned corpses is not enough. We need to check also the object, client is sending, if this is allowed for the client or not.
I need to build a sanity check in "get all" and auto loot for that scenario, but this could happen everywhere, also on examine and I dunno what sa mode can bug around this client filtering.
I am also not sure, if our server looping comes from here? I temporary deactivated "get all" and auto loot. We need to see, if we "crash"(loop) more.