-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a delay to the pause feature #6643
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the following error when unpausing:
WARNING: Error running '/lua/ui/game/gamemain.lua:ReceiveChat': ...\lua\ui\game\gamemain.lua(747): access to nonexistent global variable "SendResumedBy"
stack traceback:
[C]: in function `error'
...\lua\system\config.lua(58): in function <...\lua\system\config.lua:57>
...\lua\ui\game\gamemain.lua(747): in function `func'
...\lua\ui\game\gamemain.lua(1082): in function <...\lua\ui\game\gamemain.lua:1066>
The debug logging should be removed too.
The rest of the general functionality of the unpause delay works in my testing.
local oldSessionRequestPause = _G.SessionRequestPause | ||
_G.SessionRequestPause = function() | ||
-- makes no sense to request a pause on top of a pause | ||
if SessionIsPaused() then | ||
return | ||
end | ||
|
||
oldSessionRequestPause() | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this hook is necessary. Shouldn't the nonsensical case be handled by the engine already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this hook is necessary. Shouldn't the nonsensical case be handled by the engine already?
I'll check this evening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am not mistaken then the message would be sent and it would override the person who initiated the pause.
Had to add that before, but I'll say then now: change these messages (pause/unpause/want to continue) to notification messages. Meaning that message is not typed by a player, but rather provided by a system. |
Is there an existing system for this? If not, then it's out of scope of this particular pull request in my opinion. |
Co-authored-by: lL1l1 <[email protected]>
Co-authored-by: lL1l1 <[email protected]>
Co-authored-by: lL1l1 <[email protected]>
Co-authored-by: lL1l1 <[email protected]>
Co-authored-by: lL1l1 <[email protected]>
Co-authored-by: lL1l1 <[email protected]>
Co-authored-by: lL1l1 <[email protected]>
Co-authored-by: lL1l1 <[email protected]>
There is one that is used for notifications, such as HQ upgrades and ACU enhancements. |
That is Notify, which originates from the sim if I am not mistaken. |
@lL1l1 I think I processed your feedback. |
Description of the proposed changes
Related to:
Introduces a small delay before user A can resume the session after a pause initiated by user B. At all times, user B can resume immediately. A chat message is posted when a user pauses the session, attempts to resume the session and when the session is resumed.
Testing done on the proposed changes
Launched the game directly into the match maker lobby with the LaunchScripts made by @lL1l1 .
Checklist