summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/character.cpp2
-rw-r--r--src/entity.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/character.cpp b/src/character.cpp
index 0dbaa157..e6f2da04 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -214,7 +214,7 @@ character::character(object_id id, struct chunk& c, const character_proto& proto
if (!name)
name = "(Unnamed)"_s;
if (!atlas)
- atlas = loader.anim_atlas("npc-walk", loader.ANIM_PATH);
+ const_cast<std::shared_ptr<anim_atlas>&>(atlas) = loader.anim_atlas("npc-walk", loader.ANIM_PATH);
fm_soft_assert(atlas->check_rotation(r));
entity::set_bbox_(offset, bbox_offset, Vector2ub(iTILE_SIZE2/2), pass);
}
diff --git a/src/entity.hpp b/src/entity.hpp
index f696b43b..409d0354 100644
--- a/src/entity.hpp
+++ b/src/entity.hpp
@@ -42,7 +42,7 @@ struct entity
const object_id id = 0;
uint64_t last_update = 0;
struct chunk* const c;
- std::shared_ptr<anim_atlas> atlas;
+ const std::shared_ptr<anim_atlas> atlas;
const global_coords coord;
const Vector2b offset, bbox_offset;
const Vector2ub bbox_size;