Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  applying corpes in group  (Read 23 times)

0 Members and 0 Guests are viewing this topic.

Dolfo

« on: 05, April 2024, 05:16:24 »
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()
Code: [Select]
/* 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.
« Last Edit: 05, April 2024, 12:17:37 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Tags:
 

Related Topics

  Subject / Started by Replies Last post
16 Replies
3922 Views
Last post 28, April 2006, 10:31:39
by Demiurge
2 Replies
1129 Views
Last post 28, April 2006, 03:31:07
by ThePlaneskeeper
6 Replies
2253 Views
Last post 22, May 2014, 17:05:38
by smacky
23 Replies
473 Views
Last post 02, April 2023, 20:17:21
by petarkiller
Group Exp

Started by Dolfo « 1 2 » Suggestions

20 Replies
281 Views
Last post 25, August 2023, 02:06:27
by Dolfo