server icon indicating copy to clipboard operation
server copied to clipboard

🐛 GM entity visible without being physically present and or connected

Open HaxPrime opened this issue 2 years ago • 6 comments

  • [x] I have paid attention to this example and will edit again if need be to not break the formatting, or I will be ignored
  • [x] I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated
  • [x] I have read and understood the Contributing Guide

Steps to reproduce

I can't reliably reproduce this error.

Sometimes GM entities will appear in the jeuno moghouse to players when in fact the GM account is offline and has been for many hours. Others times the GM entity will be online and appear in the jeuno moghouse to players.

Expected behavior

GM entity should not be in unexpected position.

Screenshots

Auron_2022 09 25_045440 In this screenshot I was offline from the server for a few hours when this player reported it. Kurma_2022 09 29_094054 Here I was online but in Port Jeuno when the player reported this. hax_ffxi_2022 09 29_10 41 19

842-d0ffc4c9-829b-4400-b3a7-1ec995a7133e.png)

HaxPrime avatar Sep 30 '22 16:09 HaxPrime

worth noting that while this was happening i checked our accounts_sessions table and didn't see an entry for this GM char present.

CatsEyeXI avatar Sep 30 '22 17:09 CatsEyeXI

some more info, appears to only be happening inside mog houses, and only with GM characters. I can confirm that I had been standing in this position maybe 30 mins earlier...

Also, we have our login server on a reboot timer (1 hr)... not sure if this could be exacerbating the issue. image image

CatsEyeXI avatar Oct 01 '22 19:10 CatsEyeXI

image

CatsEyeXI avatar Oct 02 '22 02:10 CatsEyeXI

Appears to no longer be limited to GM's

image

CatsEyeXI avatar Oct 10 '22 15:10 CatsEyeXI

Is Ramsay a GM, or someone who can instant logout?

WinterSolstice8 avatar Oct 10 '22 15:10 WinterSolstice8

No, they aren't.

On Mon, Oct 10, 2022 at 11:36 AM WinterSolstice8 @.***> wrote:

Is Ramsay a GM, or someone who can instant logout?

— Reply to this email directly, view it on GitHub https://github.com/LandSandBoat/server/issues/2837#issuecomment-1273496613, or unsubscribe https://github.com/notifications/unsubscribe-auth/APSKOWKBSSZCXD7NPAONFHTWCQZWJANCNFSM6AAAAAAQZ6DXBM . You are receiving this because you commented.Message ID: @.***>

CatsEyeXI avatar Oct 11 '22 12:10 CatsEyeXI

void CLuaBaseEntity::setGMHidden(bool isHidden)
{
    XI_DEBUG_BREAK_IF(m_PBaseEntity->objtype != TYPE_PC);

    auto* PChar         = static_cast<CCharEntity*>(m_PBaseEntity);
    PChar->m_isGMHidden = isHidden;

    if (PChar->loc.zone)
    {
        if (PChar->m_isGMHidden)
        {
            PChar->loc.zone->UpdateCharPacket(PChar, ENTITY_DESPAWN, UPDATE_NONE);
        }
        else
        {
            PChar->loc.zone->UpdateCharPacket(PChar, ENTITY_SPAWN, UPDATE_NONE);
        }
    }
}

I think this is caused by unhiding in the moghouse. It injects a spawn packet to everyone in range (which would be everyone in the moghouse since everyone is "nearby" in that tiny room)

Perhaps a check for

        else if(PChar->m_moghouseID == 0)
        {
            PChar->loc.zone->UpdateCharPacket(PChar, ENTITY_SPAWN, UPDATE_NONE);
        }

could solve this?

WinterSolstice8 avatar Feb 07 '23 05:02 WinterSolstice8