Skip to content

Commit

Permalink
fix crash when gravestones are on some locations on the map
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaulwurff committed Jun 15, 2020
1 parent f38ca54 commit 94d6a2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Gravestones are carried over play sessions, so:

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

## Other Info

Expand Down
2 changes: 1 addition & 1 deletion zscript/gy_EventHandler.zs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class gy_EventHandler : EventHandler
{
let death = gy_Death.fromString(event.name.mid(8));
let pos = death.getLocation();
int i = int(pos.x + pos.y + pos.z) % 4;
int i = abs(int(pos.x + pos.y + pos.z)) % 4;
let c = String.Format("gy_Stone%d", i);
let stone = gy_Stone(Actor.Spawn(c, death.getLocation()));
stone.setObituary(death.getObituary());
Expand Down

0 comments on commit 94d6a2a

Please sign in to comment.