Age | Commit message (Collapse) | Author |
|
function so we can use it (rarely) in other places.
|
|
|
|
- Alter parameters of CMD_BUILD_RAILROAD_STATION to accept a custom station class and id.
- Add a dynamically allocated list of custom stations that the SpecIndex (m4) references.
|
|
serving a station has been deleted.
-Negative side effect: upon loading old games, stations whose last vehicle was a station have (temporarily) lower ratings.
-Positive side effect: station.h no longer includes vehicle.h (breaks the station.h->vehicle.h->rail.h chain)
|
|
Station struct.
|
|
comments, aligning arrays etc...
|
|
|
|
station_map.h
|
|
1) Improved the road vehicle allocation (aka slotting) for multistop. Stops can now accept unlimited, er... 256, vehicles.
2) Removed the "wait for stop" feature, because it did not work in practise.
3) Slotting now ignores unreachable stations. Uses NPF at the moment because the old pathfinder cannot do it (yet)
4) Now matter how many vehicles approach a station, they will always be distributed evenly over existing stops.
5) Hopefully the last fundamental change to multistop
|
|
moved them to station_map.h to keep consistency
|
|
TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
|
|
variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID.
|
|
|
|
|
|
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory
-Codechange: Increased maximum number of roadstops to 16.
-Fix: Several conditions where a slot becomes unliked from a vehicle
-Codechange: ClearSlot now only takes one parameter, the vehicle
-Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only
-Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around
-Codechange: Adjusted debug levels
TODO: Make the slot finder compatible with (a) pathfinder(s).
|
|
This fixes an assert introduced in r3663. Also fix the return type of GetRoadStopType().
|
|
use INVALID_VEHICLE instead of nonsense INVALID_SLOT.
|
|
|
|
project files.
|
|
|
|
trains: Use the length of the train before the replacement as reference length
|
|
|
|
Rewrite handling of station classes.
Allow for more than 8 station tile layouts.
Start of code to unload custom stations.
|
|
long trains
-Trains will now remember the length of stations it visits and sell cars
when being autoreplaced if they became too long
-If it needs to remove cars, then it starts from the front and sells
all it can find until the train is short enough
-This only works for trains, that knows the station length of the route
so a full uninterrupted run is needed
-a train needs 1-2 runs to detect if the shortest station is expanded
-This feature can be turned on and off in the train replace window
and each company can have it's own setting
-NOTE: minor savegame version bump
|
|
comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
|
|
|
|
int/uint/int16/byte/-1 with proper types and constants
|
|
pointers instead of copying the data around.
|
|
s/byte/PlayerID/
s/int/PlayerID/
and related changes
|
|
functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
|
|
|
|
|
|
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
|
|
|
|
|
|
extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks"
|
|
|
|
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.
|
|
the day
|
|
and CmdRestoreOrderIndex():
- Check if the vehicle exists
- Check if the vehicle belongs to the correct player
- Check if the new order is valid (type, destination, flags) (CmdInsertOrder)
|
|
This should prevent trains, which are longer than the station, to turn around without stopping under certain circumstances and fix speed limit for trains entering a station, when realistic accerlation is used
|
|
called for CmdSkipOrder(). This also fixes the involuntary crash introduced 2 revisions ago
|
|
|
|
|
|
|
|
|
|
|
|
enter other players' depots. TODO
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
|
|
roadstops.
|
|
|