Browse Source

Fix #577 dash will now fire onWalk (with isDash parameter).

Also added missing client versions.
BenDol 6 years ago
parent
commit
9f3ebb0036
3 changed files with 7 additions and 3 deletions
  1. 3
    1
      modules/gamelib/game.lua
  2. 3
    1
      src/client/game.cpp
  3. 1
    1
      src/client/protocolgameparse.cpp

+ 3
- 1
modules/gamelib/game.lua View File

@@ -66,7 +66,9 @@ function g_game.getSupportedClients()
66 66
     1012, 1013, 1020, 1021, 1022, 
67 67
     1030, 1031, 1032, 1033, 1034, 
68 68
     1035, 1036, 1037, 1038, 1039, 
69
-    1040, 1041, 1050, 1051
69
+    1040, 1041, 1050, 1051, 1052,
70
+    1053, 1054, 1055, 1056, 1057,
71
+    1058, 1059, 1060, 1061
70 72
   }
71 73
 end
72 74
 

+ 3
- 1
src/client/game.cpp View File

@@ -648,7 +648,7 @@ bool Game::walk(Otc::Direction direction)
648 648
 
649 649
     m_localPlayer->stopAutoWalk();
650 650
 
651
-    g_lua.callGlobalField("g_game", "onWalk", direction);
651
+    g_lua.callGlobalField("g_game", "onWalk", direction, false);
652 652
 
653 653
     forceWalk(direction);
654 654
     m_lastWalkDir = direction;
@@ -713,6 +713,8 @@ bool Game::dashWalk(Otc::Direction direction)
713 713
             return false;
714 714
     }
715 715
 
716
+    g_lua.callGlobalField("g_game", "onWalk", direction, true);
717
+
716 718
     forceWalk(direction);
717 719
     m_dashTimer.restart();
718 720
     m_lastWalkDir = direction;

+ 1
- 1
src/client/protocolgameparse.cpp View File

@@ -405,7 +405,7 @@ void ProtocolGame::parsePlayerHelpers(const InputMessagePtr& msg)
405 405
     if(creature)
406 406
         g_game.processPlayerHelpers(helpers);
407 407
     else
408
-        g_logger.traceError("could not get creature");
408
+        g_logger.traceError(stdext::format("could not get creature with id %d", id));
409 409
 }
410 410
 
411 411
 void ProtocolGame::parseGMActions(const InputMessagePtr& msg)

Loading…
Cancel
Save