Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Remove implicit pause system
Browse files Browse the repository at this point in the history
  • Loading branch information
darthdeus committed Feb 1, 2024
1 parent 459566a commit e623afc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
flipping. Note that this also fixes a long standing bug when in some cases sprites would be
blitted flipped upside down.
- Fix linear vs sRGB tinting in blood canvas, see [this commit](https://github.com/darthdeus/comfy/commit/80a0ee8e81d036aadf3da56c2a6ecb3750306dff) for more details.
- Remove implicitly enabled pause system that would toggle `is_paused` on `EngineContext` when
Esc is pressed. This was never really intended and was an oversight.

# v0.3.0

Expand Down
15 changes: 0 additions & 15 deletions comfy/src/update_stages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,21 +481,6 @@ fn update_animated_sprites(c: &mut EngineContext) {
}

fn pause_system(c: &mut EngineContext) {
// TODO: configurable pause
if is_key_pressed(KeyCode::Escape) {
if *c.is_paused.borrow() && *c.show_pause_menu {
info!("Resuming");
*c.is_paused.borrow_mut() = false;
*c.show_pause_menu = false;
} else if !*c.is_paused.borrow() && !*c.show_pause_menu {
info!("Pausing");
*c.is_paused.borrow_mut() = true;
*c.show_pause_menu = true;
} else {
info!("Nothing");
}
}

if !*c.is_paused.borrow() && !c.flags.borrow().contains(PAUSE_PHYSICS) {
cooldowns().tick(c.delta);
notifications().tick(c.delta);
Expand Down

0 comments on commit e623afc

Please sign in to comment.