Fix warning when eliminate a kart in battle mode

This commit is contained in:
Benau 2016-10-08 08:35:07 +08:00
parent 5c4b61a26e
commit 59edb96489
2 changed files with 4 additions and 3 deletions

View File

@ -405,7 +405,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(
World::getWorld()->getIdent() == IDENT_CUTSCENE);
m_model_file = model_file;
file_manager->pushTextureSearchPath(StringUtils::getPath(model_file));
if (file_manager->fileExists(model_file))
{
if (animated)
@ -419,6 +419,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(
throw std::runtime_error("Model '" + model_file + "' cannot be found");
}
file_manager->popTextureSearchPath();
init(NULL, NULL, true);
} // TrackObjectPresentationMesh