EQEmu / Server

Open Source Fan-Based EverQuest Emulator Server project
https://docs.eqemu.io/
GNU General Public License v3.0
447 stars 411 forks source link

A well timed NPC summon can pull a player across zones #1523

Open Isaaru opened 3 years ago

Isaaru commented 3 years ago

so im looking at mob summoning since there seems to be an occasional race condition between gate/summon where the gate triggers a MovePC() but the client doesn't communicate the character has left the zone fast enough so the mob triggers a MovePC() via summon and summons the toon back across server lines:

https://github.com/EQEmu/Server/blob/master/zone/mob.cpp#L4734C1-L4822C2

Original Post: https://discord.com/channels/212663220849213441/213021985465303040/673588922298794002

Isaaru commented 9 months ago

image

I know we're having issues replicating this, but it is a thing still.

nytmyr commented 9 months ago

image

I know we're having issues replicating this, but it is a thing still.

Could you post a snippet of your logs with this info to show times?

There's always that brief delay when you see zoning vs when you load in to the zone, wondering if clients aren't fully removed from the entity list and/or target if the mob until the client registers as zoning in to the other zone and that's what is causing it to pull you back.

A group member will pop up on the your group window before the member fully zones in, same with being greyed out if they zone out. They'll be in the window for a moment once before greying out of the group window

Isaaru commented 9 months ago

Waiting to see if user has logs. Me personally, when I was trying to replicate this, it didn't matter what I did, one summoning mob or a hundred, I couldn't get it to fire off. But randomly one day, boom, I got summoned across lines. It's so inconsistent it's ridiculous.

Edit: No logs :(

Valorith commented 9 months ago

Maybe we try adding an aggro wipe for the player right before the teleport goes through? Not sure how hard that would be...

nytmyr commented 9 months ago

Wondering if we could do something like a bZoning check on summon if that'll make a difference. Looks like that gets set once the client detects a zone change is happening.

Valorith commented 9 months ago

I tried this (https://github.com/EQEmu/Server/pull/3600) but someone reported zone deadlocks from it. No earthly idea how that simple check could cause that...but /shrug

nytmyr commented 9 months ago

Agreed, odd issue for sure.

Thinking something like :

if (target->IsClient()) {

To

if (target->IsClient() && !target->CastToClient()->bZoning) {