Skip to content

Makes Client/Mob Login/out behavior match BYOND way more closely#2598

Open
tontyGH wants to merge 5 commits into
OpenDreamProject:masterfrom
tontyGH:match-client-behavior
Open

Makes Client/Mob Login/out behavior match BYOND way more closely#2598
tontyGH wants to merge 5 commits into
OpenDreamProject:masterfrom
tontyGH:match-client-behavior

Conversation

@tontyGH
Copy link
Copy Markdown
Contributor

@tontyGH tontyGH commented May 27, 2026

This is how I atone for making client.mob regress slightly.

@boring-cyborg boring-cyborg Bot added Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime labels May 27, 2026
Comment thread OpenDreamRuntime/DreamConnection.cs Fixed
Comment thread OpenDreamRuntime/DreamConnection.cs Fixed
@tontyGH tontyGH changed the title Makes Client/Mob Login/Logout behavior match BYOND more closely Makes Client/Mob Login/out behavior match BYOND way more closely May 27, 2026
Comment thread DMCompiler/DMStandard/Types/Atoms/Mob.dm
Comment thread DMCompiler/DMStandard/Types/Atoms/Mob.dm
Comment thread OpenDreamRuntime/DreamConnection.cs Outdated
_mob.SpawnProc("Login", usr: _mob).Dispose();
}
if(oldConnection is not null) {
oldConnection.HandleDisconnection();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HandleDisconnection() is for handling the player disconnecting from the server. This has the side effect of deleting the /client as well as preventing future network communication.

Copy link
Copy Markdown
Contributor Author

@tontyGH tontyGH Jun 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, BYOND behaviour for having your mob stolen is being disconnected from the server. This is intentional.

Would I need to implement my own disconnect method or is there something else I should be using? I looked around but nothing else seemed appropriate.

Copy link
Copy Markdown
Member

@wixoaGit wixoaGit Jun 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd want to use Session.Channel.Disconnect() instead of leaving the player in that limbo state deleting the /client does this anyway but that's still a little indirect. Maybe delete the client object instead.

I'm curious if BYOND still disconnects you if you gain another mob before the tick ends?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I'm curious if BYOND still disconnects you if you gain another mob before the tick ends?

It does. BYOND disconnects the client the moment the mob is overriden, even before the first Logout is invoked.

@tontyGH tontyGH requested a review from wixoaGit June 5, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants