summaryrefslogtreecommitdiffhomepage
path: root/src/critter.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-05-28 04:48:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-05-28 04:58:10 +0200
commitccbf628602e1093bd4d29312113b7dc18ec918b0 (patch)
treebeb3507d4831a5b50b43ccbc73c416ae360cd10a /src/critter.cpp
parent6f4e493d7cbe514527e2b2d942040609ef930da9 (diff)
also fix broken protos for {critter,light}_proto
Diffstat (limited to 'src/critter.cpp')
-rw-r--r--src/critter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/critter.cpp b/src/critter.cpp
index 4c04022c..7b337953 100644
--- a/src/critter.cpp
+++ b/src/critter.cpp
@@ -346,7 +346,7 @@ bool critter_proto::operator==(const object_proto& e0) const
return false;
const auto& s0 = static_cast<const critter_proto&>(e0);
- return name == s0.name && playable == s0.playable;
+ return name == s0.name && Math::abs(speed - s0.speed) < 1e-8f && playable == s0.playable;
}
void critter::set_keys(bool L, bool R, bool U, bool D) { moves = { L, R, U, D, moves.AUTO, }; }