Skip to content

Instantly share code, notes, and snippets.

@Wolfolo
Created August 6, 2018 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wolfolo/a9c22553e1a3ce3eabd23bb020c6e783 to your computer and use it in GitHub Desktop.
Save Wolfolo/a9c22553e1a3ce3eabd23bb020c6e783 to your computer and use it in GitHub Desktop.
Fix for road convert cost
diff --git a/src/road.h b/src/road.h
index 1fc9b3c..4aa5c95 100644
--- a/src/road.h
+++ b/src/road.h
@@ -227,7 +227,7 @@ static inline Money RoadConvertCost(RoadTypeIdentifier from, RoadTypeIdentifier
/* Get the costs for removing and building anew
* A conversion can never be more costly */
- Money rebuildcost = RoadBuildCost(to) - _price[PR_CLEAR_ROAD];
+ Money rebuildcost = RoadBuildCost(to) + _price[PR_CLEAR_ROAD];
/* Conversion between somewhat compatible roadtypes:
* Pay 1/8 of the target road cost (labour costs) and additionally any difference in the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment