Use setXYZ so front xyz of kart is updated too

This commit is contained in:
Benau 2019-01-07 00:19:22 +08:00
parent 6a361db994
commit b46bd60a53

View File

@ -1127,9 +1127,11 @@ void LinearWorld::restoreCompleteState(const BareNetworkString& b)
for (auto& kart : m_karts)
{
btTransform t;
t.setOrigin(b.getVec3());
Vec3 xyz = b.getVec3();
t.setOrigin(xyz);
t.setRotation(b.getQuat());
kart->setTrans(t);
kart->setXYZ(xyz);
}
for (KartInfo& ki : m_kart_info)
ki.restoreCompleteState(b);