From 2ab5eee78b495ec73049c8446a0ed37ab4ff0920 Mon Sep 17 00:00:00 2001 From: matthijs Date: Mon, 2 May 2005 22:13:20 +0000 Subject: (svn r2255) - Fix: [ 9680363 ] [NPF] Broken buoy handling for ships Buoys will now try to get within 3 tiles of a buoy instead of a the actual buoy tile. This gets ships to got past buoys in a realistic (IMO) way instead of barging right through them. - Fix: [NPF] Trains get curves penalties sometimes even when the track is straight. - Add: [NPF] Ships get a penalty for going over buoys now, so they will try to go around. - Add: [NPF] Ships get a penalty for curves too, yay for straight lines. - Add: TrackdirToTrack(), TrackToTrackdir(), IsDiagonalTrack() and IsDiagonalTrackdir() helper functions. - Add: IsBuoy() and IsBuoyTile() helper functions. - Codechange: Rearranged part of the control flow of ShipController(), removing a goto. --- variables.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'variables.h') diff --git a/variables.h b/variables.h index 5a705214f..afd37d4f9 100644 --- a/variables.h +++ b/variables.h @@ -211,6 +211,8 @@ typedef struct Patches { uint32 npf_rail_station_penalty; /* The penalty for station tiles */ uint32 npf_rail_slope_penalty; /* The penalty for sloping upwards */ uint32 npf_rail_curve_penalty; /* The penalty for curves */ + uint32 npf_buoy_penalty; /* The penalty for going over (through) a buoy */ + uint32 npf_water_curve_penalty; /* The penalty for curves */ bool population_in_label; // Show the population of a town in his label? } Patches; -- cgit v1.2.3-54-g00ecf