Fix walk interval calculation
This commit is contained in:
		
							parent
							
								
									59b6abfa09
								
							
						
					
					
						commit
						8e437e27c7
					
				|  | @ -266,9 +266,9 @@ void Creature::walk(const Position& oldPos, const Position& newPos) | |||
| 
 | ||||
|     // calculates walk interval
 | ||||
|     int groundSpeed = 0; | ||||
|     TilePtr oldTile = g_map.getTile(oldPos); | ||||
|     if(oldTile) | ||||
|         groundSpeed = oldTile->getGroundSpeed(); | ||||
|     TilePtr tile = g_map.getTile(newPos); | ||||
|     if(tile) | ||||
|         groundSpeed = tile->getGroundSpeed(); | ||||
| 
 | ||||
|     float interval = 1000; | ||||
|     if(groundSpeed > 0 && m_speed > 0) | ||||
|  |  | |||
|  | @ -526,7 +526,7 @@ void Game::autoWalk(const std::vector<Otc::Direction>& dirs) | |||
| 
 | ||||
|     m_protocolGame->sendAutoWalk(dirs); | ||||
| 
 | ||||
|     g_lua.callGlobalField("g_game", "onAutoWalk", direction); | ||||
|     g_lua.callGlobalField("g_game", "onAutoWalk", dirs); | ||||
| } | ||||
| 
 | ||||
| void Game::forceWalk(Otc::Direction direction) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Eduardo Bart
						Eduardo Bart