Made item visible when loading in (somehow prevented on multiplayer servers when client)
@@ -192,6 +192,7 @@ private void linkHeldItemLocationForLocalPlayer(EntityRef newItem, EntityRef old
heldItemTransformComponent = new FirstPersonHeldItemTransformComponent();
clientHeldItem.addComponent(heldItemTransformComponent);
}
+
Location.attachChild(mountPointComponent.mountPointEntity, clientHeldItem,
heldItemTransformComponent.translate,
new Quat4f(
@@ -199,6 +200,8 @@ private void linkHeldItemLocationForLocalPlayer(EntityRef newItem, EntityRef old
TeraMath.DEG_TO_RAD * heldItemTransformComponent.rotateDegrees.x,
TeraMath.DEG_TO_RAD * heldItemTransformComponent.rotateDegrees.z),
heldItemTransformComponent.scale);
+
+ currentHeldItem = clientHeldItem;
}
}
}
@@ -254,8 +257,7 @@ public void update(float delta) {
}
@Override
- public void preSave()
- {
+ public void preSave() {
if (clientHeldItem != EntityRef.NULL){
clientHeldItem.destroy();
}
