]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Quick fix to Lugaru's freezing at going out of focus
[lugaru.git] / Source / GameTick.cpp
index 5c8b4acd77ef67faaadbdaee4fe991ef27b0d20b..8138608f19f01a8c7e85a23631300f4138587ed4 100644 (file)
@@ -34,6 +34,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 using namespace std;
 
+// Added more evilness needed for MSVC
+#ifdef _MSC_VER
+       #define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)
+       #define snprintf(buf, size, format, ...) _sprintf_p(buf, size, format)
+#endif
+
+
 extern float multiplier;
 extern XYZ viewer;
 extern int environment;
@@ -101,6 +108,7 @@ extern bool foliage;
 extern bool trilinear;
 extern bool damageeffects;
 extern bool showpoints;
+extern bool showdamagebar; // (des)activate the damage bar
 extern bool texttoggle;
 extern bool alwaysblur;
 extern float gamespeed;
@@ -3109,6 +3117,9 @@ void      Game::Tick()
                                mainmenu=18;
                                keyselect = -1;
                        }
+                       if(Button() && !oldbutton && selected == 13) {
+                               showdamagebar=!showdamagebar;
+                       }
                        if(Button()&&!oldbutton&&selected==8){
                                float gLoc[3]={0,0,0};
                                float vel[3]={0,0,0};