Merge branch 'master' of github-softcoder-megaglest:MegaGlest/megaglest-source

This commit is contained in:
SoftCoder 2014-01-08 12:49:25 -08:00
commit 0bf6d94d3e
2 changed files with 14 additions and 0 deletions

View File

@ -1175,6 +1175,7 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
cleanupMapPreviewTexture();
}
return;
}
if(this->zoomedMap==true){
return;

View File

@ -1162,6 +1162,7 @@ void UnitParticleSystem::initParticle(Particle *p, int particleIndex){
Vec3f combinedOffset=Vec3f(offset);
if(meshName!="" && unitModel!=NULL){
//printf("meshName set unitModel given\n");
bool foundMesh=false;
for(uint i=0; i<unitModel->getMeshCount() ; i++){
//printf("meshName=%s\n",unitModel->getMesh(i)->getName().c_str());
if(unitModel->getMesh(i)->getName()==meshName){
@ -1171,8 +1172,20 @@ void UnitParticleSystem::initParticle(Particle *p, int particleIndex){
combinedOffset.x+=verticepos->x;
combinedOffset.y+=verticepos->y;
combinedOffset.z+=verticepos->z;
foundMesh==true;
break;
}
}
if( foundMesh == false ) {
string meshesFound="";
for(uint i=0; i<unitModel->getMeshCount() ; i++){
meshesFound+= unitModel->getMesh(i)->getName()+", ";
}
string errorString = "Warning: Particle system is trying to find mesh'"+meshName+"', but just found:\n'"+meshesFound+"' in file:\n'"+unitModel->getFileName()+"'\n";
//throw megaglest_runtime_error(errorString);
printf("%s",errorString.c_str());
}
}
#ifdef USE_STREFLOP