Skip to content

Commit 1ac0522

Browse files
authored
door: fix sprite loading (#2077)
1 parent ab9a342 commit 1ac0522

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/trigger/door.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Door::Door(const ReaderMapping& mapping) :
3434
target_spawnpoint(),
3535
script(),
3636
sprite_name("images/objects/door/door.sprite"),
37-
sprite(SpriteManager::current()->create(sprite_name)),
37+
sprite(),
3838
stay_open_timer(),
3939
m_flip(NO_FLIP)
4040
{
@@ -46,6 +46,7 @@ Door::Door(const ReaderMapping& mapping) :
4646

4747
mapping.get("script", script);
4848

49+
sprite = SpriteManager::current()->create(sprite_name);
4950
sprite->set_action("closed");
5051
m_col.m_bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
5152

0 commit comments

Comments
 (0)