summaryrefslogtreecommitdiff
path: root/objects.go
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-04-21 23:07:10 +0100
committerdavidovski <david@davidovski.xyz>2024-04-21 23:07:10 +0100
commitcffac12303402c3bfd2d7eb8ab982bdaa86bd72d (patch)
treef7ecba13c8ab5d90275de2da97ad6a7c818f544b /objects.go
parent39b86eddf0404d9fd39a32724e47fd54629189a5 (diff)
hold r to rewind
Diffstat (limited to 'objects.go')
-rw-r--r--objects.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/objects.go b/objects.go
index 0bc8b62..e24e331 100644
--- a/objects.go
+++ b/objects.go
@@ -225,7 +225,9 @@ func OnCollideSpring(this, other *GameObject) bool {
}
func OnCollideSpike(this, other *GameObject) bool {
- other.game.ResetAll()
+ if other == this.game.player {
+ other.game.ResetAll()
+ }
return true
}