fixing vicious bug in scene code

This commit is contained in:
2024-12-27 23:28:51 +01:00
parent 4e326db10d
commit 49002fdd98
8 changed files with 45 additions and 43 deletions

View File

@@ -34,7 +34,7 @@ namespace mlx
{
if(!drawable || drawable->GetType() != DrawableType::Sprite)
return false;
return static_cast<Sprite*>(drawable.get())->GetTexture() == texture &&
return static_cast<Sprite*>(drawable.get())->GetTexture().Get() == texture.Get() &&
drawable->GetPosition() == position &&
drawable->GetScale() == Vec2f{ scale_x, scale_y } &&
drawable->GetRotation().ToEulerAngles() == EulerAnglesf{ 0.0f, 0.0f, rotation };