diff --git a/src/object/object_manager.cpp b/src/object/object_manager.cpp index d6cac4c8..6c27dd05 100644 --- a/src/object/object_manager.cpp +++ b/src/object/object_manager.cpp @@ -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()); diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index ce1cb8f4..13bcd583 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -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);