Browse Source

fix chest opening animation offset

Kolja Strohm 1 year ago
parent
commit
428d1f9a8a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      FactoryCraft/Chest.cpp

+ 3 - 3
FactoryCraft/Chest.cpp

@@ -34,7 +34,7 @@ void Chest::onDialogClosed(Framework::Text dialogId)
             Chunk::index(Dimension::chunkCoordinates(getPos())),
             1,
             1.0,
-            Vec3<float>(1.f, 1.f, 0.45f),
+            Vec3<float>(0.5f, 0.f, 0.45f),
             Vec3<float>(0.0f, 0.f, 0.f)); // close the chest over one second
         Game::INSTANCE->broadcastMessage(msg);
     }
@@ -118,7 +118,7 @@ void Chest::interact(Item* zItem, Entity* zActor)
             Chunk::index(Dimension::chunkCoordinates(getPos())),
             1,
             1.0,
-            Vec3<float>(1.f, 1.f, 0.45f),
+            Vec3<float>(0.5f, 0.f, 0.45f),
             Vec3<float>(
                 0.0f, (float)(PI / 2.0), 0.f)); // open the chest over 1 second
         Game::INSTANCE->broadcastMessage(msg);
@@ -135,7 +135,7 @@ void Chest::sendModelInfo(NetworkMessage* zMessage)
             Chunk::index(Dimension::chunkCoordinates(getPos())),
             1,
             0.0,
-            Vec3<float>(1.f, 1.f, 0.45f),
+            Vec3<float>(0.5f, 0.f, 0.45f),
             Vec3<float>(
                 0.0f, (float)(PI / 2.0), 0.f)); // open the chest instantly
     }