Kaynağa Gözat

Destroy sprite animation

Daniele Bartolini 11 yıl önce
ebeveyn
işleme
14081f60ac
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      engine/world/unit.cpp

+ 5 - 0
engine/world/unit.cpp

@@ -110,6 +110,11 @@ void Unit::create_objects(const Matrix4x4& pose)
 //-----------------------------------------------------------------------------
 void Unit::destroy_objects()
 {
+	if (m_sprite_animation)
+	{
+		m_world.sprite_animation_player()->destroy_sprite_animation(m_sprite_animation);
+	}
+
 	default_allocator().deallocate(m_values);
 
 	// Destroy cameras