summaryrefslogtreecommitdiff
path: root/vehicle.c
AgeCommit message (Collapse)Author
2006-07-26(svn r5614) Move a type declaration to its only usertron
2006-07-26(svn r5613) Rename VS_DISASTER to VS_SHADOW, because this is what this flag ↵tron
actually means
2006-07-26(svn r5612) Restructure some code which uses the vehicle position hash to ↵tron
make it a bit clearer what's going on
2006-07-23(svn r5599) GetPrevVehicleInChain() may never fail to find a valid vehicle. ↵tron
Reflect this in the code
2006-07-11(svn r5483) -Fix: [YAPF] desync - for MP games invalidate YAPF cache on ↵KUDr
every tick to keep it exactly the same on server and clients (it doesn't fix the real source of the problem, but should solve it). Thanks TrueLight for hunting this bug.
2006-07-07(svn r5468) -Fix: fixed declaration after statement added in 5465 (I wonder ↵bjarni
why the makefile failed to warn about this) also removed a few lines of debug code
2006-07-07(svn r5465) -Feature: [autoreplace] replacing from a train engine without ↵bjarni
cargo capacity to one with cargo capacity will now make autoreplace refit the engine to carry the cargo type from the last wagon in the train if the train is carrying the type of cargo, that is default for the engine, it will not be refitted if the last wagon do not carry cargo, the refit will be to the type of the last wagon, that do carry cargo
2006-06-29(svn r5428) -Fix: [vehicles] sovled crash when trying to build a vehicle ↵bjarni
type, that is set to max 0 (spotted by roboman) somebody might add a better string than "too many vehicles in game" since none are allowed, but at least it will not crash anymore
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
2006-06-09(svn r5191) - NewGRF: add cargo refit support for road vehiclespeter1138
2006-06-07(svn r5146) - NewGRF: Support selection of aircraft default cargo type by ↵peter1138
checking its refit mask. If aircraft can be refitted to passengers, no change happens, else the first refittable type is chosen. Also use refit capacity to determine the default capacity.
2006-06-05(svn r5120) Add IsShipInDepot{Stopped,}() and remove some redundant checkstron
2006-06-05(svn r5118) Add IsRoadVehInDepot{Stopped,}()tron
2006-06-05(svn r5116) Move the overly generic GetDepotDirection() from a header to its ↵tron
only consumer
2006-06-04(svn r5101) Add a function to convert an axis and a flag for north/south ↵tron
into a DiagDirection. Use it for bridge ramps and ship depots
2006-06-04(svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. ↵tron
_new_vehicle_id is enough.
2006-05-23(svn r4967) -Fix: [clone vehicles] a cloned train engine heads the same way ↵bjarni
as the original (pointed out by bobingabout) [autoreplace] the same applies to autoreplaced trains if the engine is a single unit (not dualheaded or articulated)
2006-05-21(svn r4937) Reduce the use of _error_message a bittron
2006-05-11(svn r4829) -Codechage: [clone vehilces] only check for a free unitnumber ↵bjarni
for the first engine in the test run as well as execute run (to improve speed. The result should be unchanged)
2006-05-11(svn r4826) -Fix: [autoreplace] fixed possible problem when autoreplacing ↵bjarni
and was number of vehicles (of a type, not total) was reached now the new vehicle gets the same number as the old one, completely removing the problem where we could run out of numbers since we don't have to find free numbers for the new vehicles, autoreplace should be somewhat faster, specially in late games NOTE: in CmdBuildRailVehicle(), bit 0 and 1 in p2 have been switched to make the meaning of bit 0 consistent with the other build commands. CmdCloneVehicle() is modified to follow this as well
2006-05-11(svn r4825) - Fix [clone FS#159]: Game crashes when cloning reaches train-limit.bjarni
2006-05-09(svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to ↵tron
EnsureNoVehicleOnGround() to make more clear what it does
2006-04-27(svn r4599) -Fix: [Cloning, autoreplace] FS#141 clone service-intervalbjarni
now cloned vehicles get the same service interval as the original vehicle I applied this to autoreplace as well even though it's not mentioned in the bug report (autorenew should not alter service interval)
2006-04-25(svn r4572) Remove vehicle_leave_tile_proctron
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing) It's a bit overkill, so just handle this one case where it can happen
2006-04-23(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}tron
2006-04-23(svn r4541) Add a type for slopes and replace many magic numbers by the ↵tron
appropriate enums
2006-04-18(svn r4471) - Pools: Add a facility for calling a custom function during ↵peter1138
pool block clean up.
2006-04-10(svn r4342) Change the first two parameters of commands - virtual pixel ↵tron
coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-09(svn r4341) -Fix (FS#101) When a player got bankrupt, slots were not ↵celestar
cleared, because vehicles got deleted directly by DeleteVehicle
2006-04-03(svn r4259) -[multistop] Fix/Feature/Codechange:celestar
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
2006-04-03(svn r4256) - Codechange: Replace lone map access in vehicle.c with its map ↵peter1138
accessor.
2006-04-03(svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 ↵celestar
by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty
2006-04-03(svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZEcelestar
2006-04-01(svn r4228) -Fix: [autoreplace] allow replacement of wagons even when the ↵bjarni
engine fails to be replaced
2006-04-01(svn r4227) - Fix: Wagon replace nows checks if the cargo types are the same ↵peter1138
before seeing if it can refit.
2006-03-31(svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and ↵celestar
moved them to station_map.h to keep consistency
2006-03-31(svn r4201) - Codechange: Do for _engine_info[] what we do for ↵peter1138
_*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.
2006-03-29(svn r4159) added missing comments about refitting in CmdCloneVehiclebjarni
2006-03-29(svn r4158) -Fix: [autoreplace] cost for refitting the new vehicle is now ↵bjarni
added to the cost animation. The player always paid for it, but it was not displayed until now
2006-03-29(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of ↵celestar
code and proofreading, thanks to peter1138 for another lot of code and ideas.
2006-03-24(svn r4092) CodeChange : Named sprites instead of magic numbers plus ↵belugas
create/use helper macro/enum for recoloring scheme
2006-03-16(svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space ↵Darkvater
reservation in savegames and update where used - Also add this capability to settings
2006-03-12(svn r3831) Add and use GetRailDepotDirection()tron
2006-03-11(svn r3816) Use existing accessorstron
2006-03-10(svn r3811) -Fix: [autoreplace]: (FS#67) autoreplacing trains now keep their ↵bjarni
tile length instead of their pixel length
2006-03-09(svn r3805) - [FS#62] Fix doxygen comments to refer to the correct ↵peter1138
parameter. (sulai)
2006-03-08(svn r3787) Use DirToDiagDir() instead of >> 1tron
2006-03-08(svn r3784) Add a type and functions to handle direction changestron
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-03-04(svn r3757) -Feature: Delete news items about vehicles, when they get staletron
This is used to delete - all news about a vehicle, when it gets deleted - "vehicle has stopped in depot" news, when it gets started - "vehicle has invalid orders" news, when the orders get changed