diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-19 00:03:12 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-19 00:03:46 +0100 |
commit | f3f99d56ad6cd66e74e6958d46a12cc56f584984 (patch) | |
tree | 4206d13f3091f822d7ee3b34ced82163ed7f50cf /src/entity.cpp | |
parent | 4d9a82b720c8ce74b94f43f72ddd819ef21abbdf (diff) |
move some deserialize path's asserts to soft asserts
Diffstat (limited to 'src/entity.cpp')
-rw-r--r-- | src/entity.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index 820d0456..70e0ffb5 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -3,6 +3,7 @@ #include "rotation.inl" #include "anim-atlas.hpp" #include "RTree.hpp" +#include "compat/exception.hpp" #include <algorithm> namespace floormat { @@ -13,7 +14,7 @@ entity_proto::~entity_proto() noexcept = default; entity_proto::entity_proto() = default; entity_proto::entity_proto(const entity_proto&) = default; -entity::entity(object_id id, struct chunk& c, entity_type type, const entity_proto& proto) noexcept : +entity::entity(object_id id, struct chunk& c, entity_type type, const entity_proto& proto) : id{id}, c{&c}, atlas{proto.atlas}, offset{proto.offset}, bbox_offset{proto.bbox_offset}, bbox_size{proto.bbox_size}, delta{proto.delta}, @@ -22,8 +23,8 @@ entity::entity(object_id id, struct chunk& c, entity_type type, const entity_pro fm_assert(type == proto.type); if (atlas) { - fm_assert(atlas->check_rotation(r)); - fm_assert(frame < atlas->info().nframes); + fm_soft_assert(atlas->check_rotation(r)); + fm_soft_assert(frame < atlas->info().nframes); } } |