Skip to content

Commit

Permalink
fix gravestones not loading sometimes more
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaulwurff committed Jun 14, 2020
1 parent 4bcc205 commit e306bed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Gravestones are carried over play sessions, so:
## Acknowledgments

- Thanks to Captain J for gravestone sprites.
- Thanks to Dr_Cosmobyte for feature suggestions.

## Other Info

Expand Down
13 changes: 8 additions & 5 deletions zscript/gy_EventHandler.zs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
class gy_EventHandler : EventHandler
{

/**
* Doing this in WordLoaded doesn't work for some reason if the game is
* started straight to map, like `gzdoom +map map01`.
*/
override
void WorldTick()
{
if (Level.time != 3) { return; }
if (_isFired)
{
return;
}

_isFired = true;

let storage = gy_Storage.of();

Expand Down Expand Up @@ -103,4 +104,6 @@ class gy_EventHandler : EventHandler
}
}

private bool _isFired;

} // class gy_EventHandler

0 comments on commit e306bed

Please sign in to comment.