From 2cb45f876f91024bd1aec398089eb62f6a809923 Mon Sep 17 00:00:00 2001 From: titiger Date: Sun, 5 Jan 2014 23:56:45 +0100 Subject: [PATCH 1/2] no click on buttons while preview map is in zoomed state --- source/glest_game/menu/menu_state_connected_game.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index b27d7095..184afab9 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -1175,6 +1175,7 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){ cleanupMapPreviewTexture(); } + return; } if(this->zoomedMap==true){ return; From aee2417ce1054a2aa44749bf359f362e9c31314c Mon Sep 17 00:00:00 2001 From: titiger Date: Sun, 5 Jan 2014 23:57:29 +0100 Subject: [PATCH 2/2] Additional warning for modders to find problems with mesh bound particles. --- source/shared_lib/sources/graphics/particle.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/shared_lib/sources/graphics/particle.cpp b/source/shared_lib/sources/graphics/particle.cpp index 717e20af..d200e5ff 100644 --- a/source/shared_lib/sources/graphics/particle.cpp +++ b/source/shared_lib/sources/graphics/particle.cpp @@ -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; igetMeshCount() ; 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; igetMeshCount() ; 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