Skip to content

[lua] Assault exit event bug fix and event skipped#10526

Open
Nobutadas wants to merge 1 commit into
LandSandBoat:basefrom
Nobutadas:assault-end-event-bug-fix-and-event-skipped
Open

[lua] Assault exit event bug fix and event skipped#10526
Nobutadas wants to merge 1 commit into
LandSandBoat:basefrom
Nobutadas:assault-end-event-bug-fix-and-event-skipped

Conversation

@Nobutadas

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

  1. In the new Assault framework, if the Assault ends by a teammate OR through the timeout, if the player is in the event, the exit event doesn't fire until the player leaves their current event. This PR will instead have the player quit the event, wait 2 seconds (retail delay), and then fire the exit event.

The way I implemented this is a :release() then a 2 second wait until the exit event to mimic the retail delay. If I didn't have that 2 second wait, the exit event never fires and you are stuck in the assault. With this implementation, technically, the player can spam "enter" to re-enter the event. I think a future PR will also need to freeze or lock the player during all of this.

  1. Adds event skipped to the rune of release.

Video of ending Assault while in an event: https://youtu.be/-1ZAWkKUkQc
Video of Event Skipped: https://youtu.be/YHvsnZkPV50

Steps to test these changes

Go into one of the new assaults, beat it, sit at the rune of release until the timer runs out in that event.

Comment thread scripts/globals/assault/container.lua Outdated
member:setCharVar('assaultEntered', 0)
member:setCharVar('Assault_Armband', 0)
member:startEvent(102)
if member:getID() ~= player:getID() and member:isInEvent() then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if member:getID() ~= player:getID()
I dont understand this check

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.

At this point, the player is wrapping up the Rune of Release event. The exit event (102) will fire automatically after the Rune of Release event ends a fraction of a second later. If I don't have this check, the player who triggered the Rune of Release gets an "Event Skipped." text.

I attached a screenshot of what it looks like on LSB without that check.

Image

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.

I can add a comment explaining it.

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.

Added comment and adjusted timer to 1.

Timer of 1 throws a harmless map warning.
[map][warn] Invalid GP_CLI_COMMAND_EVENTEND packet from Test: Event ID mismatch 102 != 100. (anonymous-namespace'::ValidatedPacketHandler:220) Timer of 500 throws another harmless map warning. [map][warn] Invalid GP_CLI_COMMAND_EVENTEND packet from Test: Not in an event. (anonymous-namespace'::ValidatedPacketHandler:220)

@Nobutadas Nobutadas force-pushed the assault-end-event-bug-fix-and-event-skipped branch 2 times, most recently from 5d69e7a to 84a868c Compare July 7, 2026 19:30
@Nobutadas Nobutadas force-pushed the assault-end-event-bug-fix-and-event-skipped branch from 84a868c to 04752bf Compare July 7, 2026 19:30
@sruon sruon added the hold On hold, pending further action/info label Jul 7, 2026
@Nobutadas

Copy link
Copy Markdown
Contributor Author

@sruon

sruon commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Quick look at the capture shows the following exchange

sync 4251 at 22:52:26.761 EVENTUCOFF sent to client with Mode 25602 (telling it to cancel event 100)
sync 4252 at 22:52:26.828 (+67ms) EVENTEND sent to server with eventId 100 and magic cancel option
sync 4253 at 22:52:27.517 (+689ms) EVENT sent to client with eventId 102 (the actual expel)

It's not really a 2s delay, it's the server waiting for the acknowledgment of the event being cancelled client side before sending the expel.

I need a little time to think through it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold On hold, pending further action/info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants