truelight
b23f719ab9
(svn r6053) -Codechange: renamed all IsXXXIndex to IsValidXXXID
...
-Codechange: IsValidXXXID now also checks if XXX is really valid, not if the number is within range
Both changes again in preperation of the new mem-pool system, which requires this.
IsValidXXXID is not a bit less pretty, but that will be cleaned up after the new mem-pool system
18 years ago
truelight
1331b4aa9a
(svn r6052) -Codechange: change OrderType (order->type) in a typedef
...
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better
-Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
18 years ago
rubidium
480af9c917
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
18 years ago
rubidium
893d4ba9d4
(svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant.
18 years ago
rubidium
3cab5f30c0
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
...
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
18 years ago
rubidium
243872b4fd
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
...
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
bjarni
de4a96fd7a
(svn r5854) -Fix: [elrails] now electric engines are stopped if they enter a non-electrified depot even if they would have left right away if the depot had catenary
...
this solves the issue where electric engines in a certain situation could leave non-electrified depots, turn around and enter all the time
18 years ago
bjarni
466452c351
(svn r5853) -Fix: [elrails] FS#178 Electric Trains can leave Conventional Depot
...
now the user will get an error if he tries to start the train and the status bar will say "no power" instead of "stopped"
Electric trains already driving in and out of non-electrified depots will still do so, but you can't start new ones
18 years ago
peter1138
08ae2cf6e5
(svn r5822) - NewGRF: add support for callback 31, vehicle start/stop check. This allows a set to disallow a vehicle from being started, i.e. to not be able to leave the depot. This is almost a partner to callback 1D.
18 years ago
peter1138
42bcee22bd
(svn r5819) - NewGRF: add support for refit costs specified in NewGRF. This may affect the default refit costs for the default rail vehicles.
18 years ago
Darkvater
f0951cf82f
(svn r5665) - Codechange: check pointers against NULL, coding style, tabulation; nothing serious.
18 years ago
bjarni
6224c7485c
(svn r5664) -Fix: [SF 1518090 ] moving train engines in depot - crash (svn r5463)
...
this was present long before 5463
Darkvater deserves some of the credit for this fix since he discovered where the first pointer got set incorrectly
18 years ago
tron
2bb9fd3901
(svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
18 years ago
peter1138
2e0498dce0
(svn r5427) - Codechange: testing for "== true" is redundant.
18 years ago
peter1138
02bde34b2b
(svn r5240) - NewGRF: when there is more than one engine in a consist, base livery overrides and powered wagon weight/power on the last engine before the wagon.
18 years ago
peter1138
d6ebfb8338
(svn r5187) - NewGRF: temporarily change a vehicle's cargo subtype when calling the refit capacity callback.
18 years ago
bjarni
ffeb87763f
(svn r5176) fixing the typo, that should have been fixed in last commit
18 years ago
bjarni
bbe4285a03
(svn r5175) -Fix: [autoreplace] FS#186 autoreplaced trains can leave all wagons in depot
...
also fixed a serious typo in peter1138's comments
18 years ago
tron
be88e269b9
(svn r5155) - Remove the bridge branch merge (revision r5070)
18 years ago
peter1138
5e3dd8dd78
(svn r5105) - NewGRF: Move callbackmask from *VehicleInfo to EngineInfo. This simplifies code that works with more than one vehicle type.
18 years ago
peter1138
0a623bc333
(svn r5104) - When refitting a vehicle to its existing cargo type, don't lose the cargo onboard (useful when adding wagons to a train)
18 years ago
peter1138
f00c3e7e25
(svn r5103) - Add cargo subtype parameter to refit commands (mart3p)
18 years ago
tron
a0caafeb50
(svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough.
18 years ago
KUDr
9cf3badfcf
(svn r5093) -CodeChange: [YAPF] min. debug level changed from 1 to 3 and 4 for frequent debug messages (performance stats)
18 years ago
peter1138
fbe7303c3a
(svn r5071) - Fix (FS#184): "Erroneous train reversal on waypoints". When processing the next train order, do not even consider reversing the train if the last order was to a waypoint.
18 years ago
celestar
25a63ec7af
(svn r5070) Merged the bridge branch
...
-Feature: Bridges can now be placed above:
Any railway track combination (excluding depots and waypoints)
Any road combination (excluding depots)
Clear tiles (duh), including fields
Tunnel entrances
Bridge heads
Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing
There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
18 years ago
celestar
bf2fb59bf9
(svn r5064) -Fix: Remove stay debug stuff from lat commit. (thanks peter1138)
18 years ago
celestar
65a6286345
(svn r5063) -Codechange: Add a function to determine the length of a platform (request by KUDr)
18 years ago
peter1138
76b29862c0
(svn r5061) - NewGRF: always use visual effect callback if it is defined, not just for powered wagons.
19 years ago
KUDr
5e73dce0e7
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
19 years ago
peter1138
cd6ab6178c
(svn r4910) - NewGRF: add and initialize cargo subtype for vehicle visual variations
19 years ago
peter1138
7d92ea8d1e
(svn r4860) - NewGRF: remove a missed extern for _traininfo_vehicle_pitch
19 years ago
bjarni
2e05a16959
(svn r4826) -Fix: [autoreplace] fixed possible problem when autoreplacing 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
19 years ago
bjarni
06156142d4
(svn r4825) - Fix [clone FS#159]: Game crashes when cloning reaches train-limit.
19 years ago
rubidium
9b1bbf72ee
(svn r4788) - Codechange: RAILTYPE_{NORMAL,ELECTRIC,...} and RAIL_TYPE_{NORMAL,SIGNAL,...} have nearly the same name, rename RAIL_TYPE_* to RAIL_TILE_* of extra clarity
19 years ago
tron
5622ad4b5e
(svn r4765) Add GetTileMaxZ(), which returns the height of the highest corner of a tile, and use it to simplify the code in a few places
19 years ago
tron
79935130eb
(svn r4750) -Fix: Trains could enter certain sloped rail tiles under bridges with incompatible rail type
19 years ago
peter1138
36d1e4a1a1
(svn r4706) - NewGRF: add the correct default error message for the wagon attach callback.
19 years ago
peter1138
6c3cc7fd16
(svn r4703) - NewGRF: add support for callback 0x1D, "can wagon be attached". This can be used to disallow freight wagons to be placed in passenger trains, along with other uses.
19 years ago
tron
18ad0ae50e
(svn r4572) Remove vehicle_leave_tile_proc
...
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
19 years ago
tron
c1dc517dab
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
19 years ago
tron
0347fb2ab6
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
19 years ago
celestar
a7b2ec60b3
(svn r4501) -Fix: (FS#129) When, in a train that head multiple engines in front, the _first_ of those engines is sold, all the orders are copied to the second engine (to ensure "seamless" operation). However, during this operation, it was forgotten to update the prev_shared and next_shared pointers of the new head engine AND the next_shared and prev_shared of the share partners.
19 years ago
celestar
ccdf322799
(svn r4479) -Fix (FS#90) electric engines (or rather their pantographs) no longer emit sparks when engine is pulled on convrail (MeusH)
...
P.S. Credit for previous commit goes to the bug reporter, nycom, who submitted the fix as well.
19 years ago
Darkvater
d63fad7a7b
(svn r4435) - Fix: an assertion triggered when trying to remove a bridge with the remove-tool (r4348 surfaced this). In CmdRemoveRoad tiletype was not checked for ownership. Intorudce IsLevelCrossingTile() which checks if a tile is a crossing without knowing the type. Suggested by peter1138 and Tron.
19 years ago
tron
060d5143ef
(svn r4412) When a vehicle is in a depot or tunnel it's always flagged as VS_HIDDEN. So after checking for VS_HIDDEN and the result is false there's no need to check if it's flagged as being in a depot or tunnel
19 years ago
tron
81e6d68f95
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
...
Remove DoCommandByTile(), because now it does the same as DoCommand()
19 years ago
celestar
d8215a1f59
(svn r4338) -Fix (FS#105): Bug introduced in r4290. IsLevelCrossing does NOT check the tile type, it assumes the tile type IS MP_STREET
19 years ago
celestar
07e4134ebd
(svn r4290) -Fix: fixed power computation for mixed consists on level crossings (michi_cc)
19 years ago
bjarni
8b1f971c1a
(svn r4226) -Fix: [elrails] it's no longer possible to build electric engines in non-electric depots
...
this prevents autoreplace to replace to electric engines before the line in question got catenary
19 years ago