diff options
Diffstat (limited to 'src/character.cpp')
| -rw-r--r-- | src/character.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/character.cpp b/src/character.cpp index d75070e8..88a575f9 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -92,6 +92,7 @@ character_proto& character_proto::operator=(const character_proto&) = default; character_proto::character_proto() { type = entity_type::character; + atlas = loader.anim_atlas("npc-walk", loader.ANIM_PATH); } bool character_proto::operator==(const entity_proto& e0) const @@ -215,8 +216,6 @@ character::character(object_id id, struct chunk& c, const character_proto& proto { if (!name) name = "(Unnamed)"_s; - if (!atlas) - 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); } |
