Improve output for missing mesh warning

This commit is contained in:
Tom Reynolds 2015-06-10 11:09:40 +02:00
parent 4ab574150a
commit 22e02cbf95
1 changed files with 4 additions and 4 deletions

View File

@ -4198,12 +4198,12 @@ void Unit::setMeshPosInParticleSystem(UnitParticleSystem *ups){
}
}
if( foundMesh == false ) {
string meshesFound="";
for(unsigned i=0; i<model->getMeshCount() ; i++){
meshesFound+= model->getMesh(i)->getName()+", ";
string meshesFound = model->getMesh(0)->getName();
for(unsigned i=1; i<model->getMeshCount() ; i++){
meshesFound+= ", "+model->getMesh(i)->getName();
}
string errorString = "Warning: Particle system is trying to find mesh'"+meshName+"', but just found:\n'"+meshesFound+"' in file:\n'"+model->getFileName()+"'\n";
string errorString = "Warning: Particle system is trying to find mesh '"+meshName+"', but just found:\n'"+meshesFound+"' in file:\n'"+model->getFileName()+"'\n";
//throw megaglest_runtime_error(errorString);
printf("%s",errorString.c_str());
}