Fix temple arena broken rescue in graphical server

This commit is contained in:
Benau 2021-06-25 19:35:37 +08:00
parent 26b5d413e4
commit d2df7c6de9
3 changed files with 11 additions and 1 deletions

View File

@ -2868,7 +2868,10 @@ void Track::copyFromMainProcess()
{
TrackObject* clone = to->cloneToChild();
if (clone)
{
m_track_object_manager->insertObject(clone);
m_track_object_manager->insertDriveableObject(clone);
}
}
m_track_mesh = new TriangleMesh(/*can_be_transformed*/false);

View File

@ -273,6 +273,13 @@ void TrackObjectManager::insertObject(TrackObject* object)
m_all_objects.push_back(object);
}
// ----------------------------------------------------------------------------
void TrackObjectManager::insertDriveableObject(TrackObject* object)
{
if (object && object->isDriveable())
m_driveable_objects.push_back(object);
}
// ----------------------------------------------------------------------------
/** Removes the object from the scene graph, bullet, and the list of
* track objects, and then frees the object.

View File

@ -70,7 +70,7 @@ public:
bool interpolate_normal = false) const;
void insertObject(TrackObject* object);
void insertDriveableObject(TrackObject* object);
void removeObject(TrackObject* who);
void removeDriveableObject(TrackObject* obj) { m_driveable_objects.remove(obj); }
TrackObject* getTrackObject(const std::string& libraryInstance, const std::string& name);