Skip to content

Multiplayer: disallow disconnection victories for co-op maps + refactor#4847

Merged
Loobinex merged 3 commits into
dkfans:masterfrom
rainlizard:refactor-disconnection-code8
May 28, 2026
Merged

Multiplayer: disallow disconnection victories for co-op maps + refactor#4847
Loobinex merged 3 commits into
dkfans:masterfrom
rainlizard:refactor-disconnection-code8

Conversation

@rainlizard
Copy link
Copy Markdown
Contributor

@rainlizard rainlizard commented May 27, 2026

  • Fixed the issue of "If all human players are allied then one leaves, all others win."

  • Also in addition I've added a function are_disconnect_victories_allowed() which checks if any players have any human enemies at the start, if not then disconnections won't play into the winstate at all.

  • Some of the leaving and disconnection code was scattered and confusing, I've centralized it with this refactor.

  • Removed the unused PckA_SaveGameAndQuit.

Something for mapmakers to keep in mind is the way this command works:

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
	WIN_GAME
ENDIF

It checks if other keepers are "friendly or defeated", so being allied can fulfill the win condition. That means testing this PR with all players allied is a little difficult on the original MP maps because you just win instantly thanks to that DKScript.

@rainlizard rainlizard changed the title Multiplayer: a match with no enemy players cannot be won via disconnects + refactor Multiplayer: disallow disconnection victories for co-op maps + refactor May 27, 2026
@rainlizard rainlizard marked this pull request as draft May 27, 2026 18:22
@rainlizard rainlizard marked this pull request as ready for review May 27, 2026 18:22
@Loobinex Loobinex self-requested a review May 27, 2026 18:27
@rainlizard rainlizard marked this pull request as draft May 27, 2026 18:37
@rainlizard rainlizard marked this pull request as ready for review May 27, 2026 18:42
Grammar correction (infinitive form ends in -er)
@Loobinex Loobinex merged commit 2b9fd1b into dkfans:master May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants