rewrking/DynRPG-system-opengl

BetterAEP-stopping code should probably stop the "stop event" and not the "change variable"

Opened this issue · 0 comments

https://github.com/andrew-r-king/system_opengl/blob/36be405086233664e2cab8894ce5cb9ba9add7b4/src/main.cpp#L923

I guess the code is supposed to catch the call to BetterAEP's "shut down" command.

However, what it actually does is intercepting a call to "change variable" if the next command is "stop event". It seems it does not work if there is anything (e.g. a comment) between the two, and furthermore it only stops changing the variable, not calling "stop event", so the variable will be what it was before and then the event may actually be stopped (if it was 0) or the load menu opened (if it was 1) because BetterAEP will still run on the following "stop event" command!

I think the better way to handle this would be to intercept the stop event command itself and check the variable value.