Browse Source

Fixed 'hide' command behaving incorrectly during Urho cooldown period.

Lasse Öörni 11 years ago
parent
commit
1ed123194c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Samples/26_ConsoleInput/ConsoleInput.cpp

+ 1 - 1
Source/Samples/26_ConsoleInput/ConsoleInput.cpp

@@ -219,7 +219,7 @@ void ConsoleInput::HandleInput(const String& input)
         }
         }
         else if (inputLower == "hide")
         else if (inputLower == "hide")
         {
         {
-            if (urhoThreat_)
+            if (urhoThreat_ > 0)
             {
             {
                 bool evadeSuccess = hunger_ > 2 || Random() < 0.5f;
                 bool evadeSuccess = hunger_ > 2 || Random() < 0.5f;
                 if (evadeSuccess)
                 if (evadeSuccess)