Fixed object creation after loading save file

Looks like @piotrdz broke it when creating the ObjectCreateParams struct. I'm kinda suprised this remained unnoticed for so long ;)
Reported in issue #570
master
krzys-h 2015-08-19 20:05:36 +02:00
parent 9d6543a947
commit 27bbc27948
2 changed files with 7 additions and 1 deletions

View File

@ -126,6 +126,13 @@ CObject* CObjectManager::CreateObject(ObjectCreateParams params)
params.id = m_nextId;
m_nextId++;
}
else
{
if (params.id >= m_nextId)
{
m_nextId = params.id + 1;
}
}
assert(m_objects.find(params.id) == m_objects.end());

View File

@ -3659,7 +3659,6 @@ void CPhysics::WheelParticle(TraceColor color, float width)
{
Math::Matrix* mat;
Math::Vector goal1, goal2, wheel1, wheel2;
Gfx::ParticleType parti;
float dist1, dist2, step;
mat = m_object->GetWorldMatrix(0);