diff --git a/src/Renderer/Sprite.cc b/src/Renderer/Sprite.cc index e8f9c9c..086b580 100644 --- a/src/Renderer/Sprite.cc +++ b/src/Renderer/Sprite.cc @@ -34,10 +34,10 @@ namespace volt::renderer { { // NOTE: leave the rvalue Sprite object in an invalid state (id <= 0), so when it gets destroyed (after it's moved) // it doesn't get unloaded from GPU's VRAM (i.e. leave the moved-from object as a hollow object (empty state)). - m_width = 0; - m_height = 0; + s.m_width = 0; + s.m_height = 0; s.m_data = {}; - m_name.clear(); + s.m_name.clear(); } Sprite::~Sprite(void) { diff --git a/src/Runtime/Scene.cc b/src/Runtime/Scene.cc index 741553f..8fc6f4f 100644 --- a/src/Runtime/Scene.cc +++ b/src/Runtime/Scene.cc @@ -65,7 +65,7 @@ namespace volt::runtime { m_worldID = b2CreateWorld(&worldDef); } ForAll([this](auto e, auto &t, auto &rb, auto &sr) { - rb.SetExtent({sr.scale * sr.sprite.width() * 0.5f, sr.scale * sr.sprite.height() * 0.5f}); + rb.SetExtent({t.scale * sr.sprite.width() * 0.5f, t.scale * sr.sprite.height() * 0.5f}); b2BodyDef bodyDef { b2DefaultBodyDef() }; bodyDef.type = static_cast(rb.type); bodyDef.gravityScale = rb.gravityScale;