Skip to content

Commit

Permalink
docs: comment about game stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Jan 31, 2024
1 parent c2f749e commit a878793
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/scp-foundation-site-director/game/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ impl Plugin for GameControlPlugin {
fn exit_system(mut exit: EventWriter<AppExit>) {
if SHOULD_EXIT.load(Ordering::SeqCst) {
console::log_1(&"exit_system".into());
// this stop the game. (Tested by switch to calendar layout, and log in system stops.)
exit.send(AppExit);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/scp-foundation-site-director/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ScpFoundationSiteDirectorGameWidget extends GameWidget {
* Delay init next game to next tick (game loop frame), so last game (if any) can be destroyed first.
* Without setTimeout, there will be `already borrowed: BorrowMutError` `RuntimeError: unreachable executed` error, when switch from one game to another.
*
* // TODO: But sometimes there still be `Uncaught TypeError: wasm is undefined` `Uncaught RuntimeError: unreachable` `Uncaught TypeError: Cannot read properties of undefined (reading 'wasm_bindgen__convert__closures__invoke0_mut__h9f5f8d8886b9ec6c')` `Uncaught TypeError: Cannot read properties of undefined (reading '__wbindgen_export_3')` error, when switch from one game to another, maybe switch is too fast? Change from `0` to `1000` some times still cannot fixes this, and it slowdown the game init. And this error throw on global can't be catch here.
* // TODO: But sometimes there still be `Uncaught TypeError: wasm is undefined` `Uncaught RuntimeError: unreachable` `Uncaught TypeError: Cannot read properties of undefined (reading 'wasm_bindgen__convert__closures__invoke0_mut__h9f5f8d8886b9ec6c')` `Uncaught TypeError: Cannot read properties of undefined (reading '__wbindgen_export_3')` error, when switch from one game to another, maybe switch is too fast? Change from `0` to `1000` some times still cannot fixes this, even the game should have been stopped. And it slowdown the game init. And this error throw on global can't be catch here.
*/
setTimeout(async () => {
await this.initializeGameCanvas();
Expand Down

0 comments on commit a878793

Please sign in to comment.