diff options
Diffstat (limited to 'src/hole.cpp')
| -rw-r--r-- | src/hole.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/hole.cpp b/src/hole.cpp index fa4a80d6..6a48e57b 100644 --- a/src/hole.cpp +++ b/src/hole.cpp @@ -18,7 +18,18 @@ hole_proto::hole_proto(hole_proto&&) noexcept = default; hole_proto& hole_proto::operator=(hole_proto&&) noexcept = default; bool hole_proto::flags::operator==(const struct flags&) const = default; -bool hole_proto::operator==(const hole_proto&) const = default; + +bool hole_proto::operator==(const object_proto& oʹ) const +{ + if (type != oʹ.type) + return false; + + if (!object_proto::operator==(oʹ)) + return false; + + const auto& o = static_cast<const hole_proto&>(oʹ); + return height == o.height && z_offset == o.z_offset && flags == o.flags; +} hole_proto::hole_proto() { |
