Send a `quitting` argument to the GameQuit Lua hook.
-
Send quitting
argument to determine whether we're quitting the game, or just exiting to the title screen. -
Call the Lua hook irregardless if we're playing or not.
Merge request reports
Activity
I am fine with 1), but against 2), because that hook was intended to be specifically called when a playing session ends ("game" refers to a game session, not the whole game).
Edited by LJ SonicMaybe just add another parameter that tells Lua whether or not the game was in the middle of a play session? That way you can have the functionality of both if you want.
But I'm curious, if you're removing the
if (Playing())
from quitting the game from the title screen, then why not in every other instance thatLUAh_GameQuit
is called? Seems kinda odd to have an exception for only one version of quitting.I have to agree with @SMS_Alfredo that
if (Playing)
should not only be removed from the code that is called when the quit the game from the title screen, and also, I should exposePlaying()
, which is a better solution than adding booleans to theGameQuit
hook in my opinion, because it can be used for other hooks that don't have aplayer_t
argument as well.Edited by ChaoLoveIceMDBoyadded 1 commit
- 119d2e9e - Remove the rest of the Playing() checks for GameQuit hook
mentioned in commit 9ea969b6