| View Issue Details [ Jump to Notes ]  | [ Issue History ] [ Print ]  | 
| ID | Project | Category | View Status | Date Submitted | Last Update | 
| 0001920 | VCMI | Mechanics - Adventure Map | public | 2014-10-13 06:27 | 2022-04-12 08:44 | 
 | 
| Reporter | linuxrocks123 |   | 
| Assigned To | linuxrocks123 |   | 
| Priority | normal | Severity | minor | Reproducibility | always | 
| Status | closed | Resolution | fixed |   | 
| Platform |  | OS |  | OS Version |  | 
| Product Version | 0.96b |   | 
| Target Version |  | Fixed in Version | 0.97 |   | 
 | 
| Summary | 0001920: Pathfinding Bonus Not Applied to Movement | 
| Description | The pathfinding bonus to movement (negation of rough terrain penalty) is not being applied.  A patch to fix is attached. | 
| Steps To Reproduce | 1.  Send a hero with pathfinding onto rough terrain. 
2.  Send a hero without pathfinding onto rough terrain. 
3.  Compare movement distance. | 
| Tags | No tags attached. | 
 | 
| Attached Files |   pathfinding.patch [^] (536 bytes) 2014-10-13 06:27 [Show Content] [Hide Content]diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp
index c013ccd..235a8bd 100644
--- a/lib/mapObjects/CGHeroInstance.cpp
+++ b/lib/mapObjects/CGHeroInstance.cpp
@@ -101,7 +101,11 @@ ui32 CGHeroInstance::getTileCost(const TerrainTile &dest, const TerrainTile &fro
 			}
 		}
 		if (!nativeArmy)
+        {
             ret = VLC->heroh->terrCosts[from.terType];
+            ret-=getSecSkillLevel(SecondarySkill::PATHFINDING)*25;
+            ret = ret < 100 ? 100 : ret;
+        }
  	}
 	return ret;
 }
 | 
 |