smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
rubidium
3ab3cfcff3
(svn r16322) -Fix [FS#2873]: trains could get stuck in a depot when they wanted to go to the same depot again.
16 years ago
frosch
2431cc099e
(svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark)
16 years ago
smatz
c189a15e3e
(svn r16302) -Codechange: remove Vehicle::AllocateList
16 years ago
smatz
3b6900baa8
(svn r16301) -Cleanup: remove unused parameter
16 years ago
frosch
8bb92c110d
(svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code.
16 years ago
rubidium
241af768f0
(svn r16242) -Codechange: rework pausing
...
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
16 years ago
rubidium
5c5b357043
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
16 years ago
rubidium
a166a300aa
(svn r16087) -Fix (r16079): slow trains wouldn't crash into eachother anymore
16 years ago
rubidium
51288dee9d
(svn r16079) -Fix [FS#2824]: insanely fast trains would not stop in time for stations
...
-Fix: insanely fast trains would sometimes 'jump' over waypoints/via stations within a tick, which would cause the order not to be processed causing the train to go in loops until (with luck) it 'hit' the tile
16 years ago
frosch
6731a8f1b8
(svn r16075) -Fix (r15792)[FS#2844]: Mixed up TRACK_BIT_X/Y.
16 years ago
rubidium
3d5a7496c7
(svn r16057) -Fix [FS#2834] (r16037): division by zero when having an order with only one station that has either middle or near end stop location and where the platform is (significantly) longer than the train.
16 years ago
rubidium
4c707c7414
(svn r16037) -Feature: allow (per order) to let a train stop at the near end, middle or far end of a platform from the point of view of the driver of the train that enters the station.
16 years ago
frosch
6900854383
(svn r15793) -Feature: Allow train vehicles to be shorten to 1/8 length, even if not at the end of the train.
16 years ago
frosch
12dbe1dd0f
(svn r15792) -Codechange: Use a different algorithm for train vehicles to follow the vehicle in front of them.
16 years ago
frosch
25b70e8c0d
(svn r15789) -Codechange: Add DiagdirBetweenTiles() and use it.
16 years ago
rubidium
c3e87f345d
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
16 years ago
frosch
d86e821f53
(svn r15701) -Fix [FS#2595]: Blame NewGRFs returning inconsistent information in purchase-list/after building before users have a chance to blame OpenTTD for incorrectly autorenewing/-replacing.
16 years ago
rubidium
404cff525b
(svn r15677) -Fix [FS#2546]: vehicle images would be determined during the process of moving the vehicle which means that only the (orientation) data for the vehicles in front of it is valid. Now the data for the vehicles behind the vehicle are valid too.
16 years ago
rubidium
b003536ea8
(svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove.
16 years ago
rubidium
b9aa5e17f2
(svn r15617) -Change [FS#2694]: vehicle variables 40-43 weren't cached (though spec stated they are). Caching these variables can yield a 10+% speed increase when those vehicle variables are queried often.
16 years ago
frosch
abe4692da2
(svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
...
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
Note: It is intentional that you cannot control refittability by CB 36.
16 years ago
smatz
ff706b1e63
(svn r15497) -Fix (r15027): when trains crashed, AIEvent was created only for one train
16 years ago
smatz
26cdcb2dd5
(svn r15496) -Codechange: one division less in the train acceleration code
16 years ago
smatz
2c317b7321
(svn r15439) -Fix [FS#2626]: call Vehicle::LeaveStation() before reversing overlength loading train (station triggers were missed, PBS reservation could cause crash)
16 years ago
rubidium
5c8cf85613
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
16 years ago
rubidium
89e1afdaa0
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
16 years ago
frosch
f6fa77d5f9
(svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason()
16 years ago
peter1138
d9c143669b
(svn r15320) -Codechange: Increase 'realistic' acceleration 'resolution' by one bit by reducing a division and removing a multiplication: 3/4*2 = 0; 3/2 = 1. And a smidgeon less CPU usage, hah.
16 years ago
michi_cc
c875cb18d6
(svn r15313) -Cleanup: Use helper functions we already have and add some documentation.
16 years ago
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
glx
1310ddf5b5
(svn r15269) -Codechange: reduced indentation in CmdBuildRail*
16 years ago
frosch
69766242b8
(svn r15268) -Fix: AIEventVehicleLost triggered at every pbs signal independent of the vehicle being lost.
16 years ago
glx
470da22ac3
(svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication.
16 years ago
peter1138
598fdab47e
(svn r15236) -Codechange: Rename realistic_acceleration patch option to train_acceleration_model, and change from boolean to value. Don't forget to update your settings.
16 years ago
peter1138
d7d7a55060
(svn r15208) -Codechange: Remove some kind (undocumented, so who really knows) of original attempt to limit maximum tractive effort from 'realistic' acceleration.
16 years ago
peter1138
4d8c467067
(svn r15205) -Revert (r7421, partial): Support for MaxTE solves problem in a better way
16 years ago
frosch
3940ed7e6f
(svn r15125) -Fix [FS#2544]: Do not try to determine the next order destination, if there are no orders.
16 years ago
smatz
ca45774160
(svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
...
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
16 years ago
truebrain
c2406cd42d
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
frosch
69877b356f
(svn r15009) -Fix [FS#2528]: No need to extent the reserved path when the vehicle is still loading.
16 years ago
frosch
83467061b7
(svn r14994) -Fix [FS#Aali]: Better handling of OT_LOADING and OT_LEAVESTATION in ChooseTrainTrack.
16 years ago
frosch
5719596ce2
(svn r14993) -Fix (r14957, r14975): Do not reverse the train with OT_LEAVESTATION as that breaks PBS prediction.
16 years ago
frosch
1fdd53e428
(svn r14975) -Fix (r14957): Do not immediatelly move the train when leaving the station and the destination is not yet known.
16 years ago
frosch
818b162b35
(svn r14957) -Fix [FS#2516]: Do not abort train movement, when we are just about to reach the end of the platform.
16 years ago
rubidium
28ea38ae55
(svn r14949) -Cleanup: pointer coding style
16 years ago
rubidium
054787f082
(svn r14943) -Cleanup: remove some rogue spaces/replace some rogue tabs with spaces
16 years ago
michi_cc
b201fb1226
(svn r14852) -Feature: Automatic reversing in front of block signals can now be disabled by setting pf.wait_oneway_signal respectively pf.wait_twoway_signal to 255.
16 years ago
michi_cc
fc9b6b8872
(svn r14851) -Fix: A train reversing in a non-PBS block can't be stuck.
16 years ago
michi_cc
b4289b40f4
(svn r14850) -Fix [FS#2503]: Reversing a stuck train that is then not stuck anymore did not always reset the waiting timer.
16 years ago
smatz
ec7ebf2170
(svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too
16 years ago
smatz
b1f7ef7076
(svn r14831) -Codechange: use {VEHICLE} instead of Train/Ship/Road veh/Aircraft/{STRING} {COMMA} in lang files (part by Swallow)
16 years ago
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago
rubidium
183f8df552
(svn r14826) -Fix [FS#2494]: infinite loop in order lookahead when reserving a path (Swallow)
16 years ago
rubidium
f316796629
(svn r14803) -Codechange: move order list management into it's own class and remove the order count from the savegame as we can easily count that (PhilSophus)
16 years ago
rubidium
abd3b8e0d7
(svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus)
16 years ago
rubidium
d91baac764
(svn r14785) -Fix [FS#2132]: vehicle list for station gets closed when station view is closed even when the vehicle list is stickied. Other vehicle lists are not deleted when their 'opening' window gets closed so do the same with the station view.
16 years ago
rubidium
56d108edf8
(svn r14779) -Fix (r14747) [FS#2485]: selling an articulated vehicle removed only the first part and not the rest.
16 years ago
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
16 years ago
rubidium
0c6c3311c9
(svn r14748) -Codechange: unduplicate window updating when deleting vehicles.
16 years ago
rubidium
c34ce32f26
(svn r14747) -Codechange: remove DeleteVehicleChain in favour of the vehicle destructor as that was already doing the same for a few vehicle types.
16 years ago
smatz
c88a6199a7
(svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo)
16 years ago
frosch
6afd6a450f
(svn r14699) -Fix (r14483): Do not use v->dest_tile for trains heading to a station. Reaching that tile does not mean reaching the station.
16 years ago
frosch
d64b89838e
(svn r14695) -Cleanup: When NTP is not active there is no need to set up TrainTrackFollowerData.
16 years ago
rubidium
33008f5d8b
(svn r14594) -Fix [FS#2412]: trains could get their their last visited station reset when still (un)loading causing an invalid state.
16 years ago
frosch
24bd9866f8
(svn r14578) -Fix (r2389, r10811)[FS#Vikthor]: Allow capacity callbacks (15, 36) to return zero capacity.
16 years ago
michi_cc
023ce24b1a
(svn r14559) -Fix [FS#2387]: A train could be blocked inside a depot if it was reversed just after leaving the depot.
16 years ago
michi_cc
147304b83d
(svn r14550) -Fix [FS#2391]: Don't assert on path look-ahead when processing a not-part-of-orders depot-order.
16 years ago
rubidium
33203c67c1
(svn r14526) -Fix [FS#2379]: make sure trains stop at the end of a station; a 3/8th length train did stop 2/8th of it's length too early causing a 63/8th long train not to fit in a 4 tile station.
16 years ago
glx
f28957bcc4
(svn r14521) -Fix [FS#2378]: fast trains could continue to move after a crash
16 years ago
michi_cc
4424c2e6fb
(svn r14492) -Fix [FS#2366] (r14482): Conditional orders could lead to an infinite loop on path look-ahead.
...
Don't refactor things that don't want to be refactored, folks. And some comments can't hurt either.
16 years ago
michi_cc
5c781a921a
(svn r14483) -Fix [FS#2340]: On reaching a waypoint a train could falsely be reported as lost when doing the look ahead for a path.
16 years ago
michi_cc
9a7270d147
(svn r14482) -Codechange: Use a class for saving the current train order when extending the reserved path beyond the current destination during pathfinding.
...
The class' destructor will make sure that the order is restored on function exit in all cases.
16 years ago
rubidium
b5e467978b
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
16 years ago
rubidium
3113cc17b9
(svn r14436) -Fix [FS#1793]: (fast) trains would sometimes move one time too often/little when moving from diagonal<->non-diagonal tracks (iguannab)
16 years ago
rubidium
e589c7e580
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
16 years ago
rubidium
f56e630e5c
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
16 years ago
frosch
423160f946
(svn r14405) -Fix [FS#2289]: Correct handling of selling free wagons while the following vehicle is an engine (i.e. a new train is created).
16 years ago
frosch
5fd49a8cd2
(svn r14403) -Fix (r14384): The condition was too restrictive.
16 years ago
peter1138
21a5c6bb7d
(svn r14401) -Fix (r11724): Don't check articulated parts or rear multihead parts for callback 1D when moving a chain of wagons.
16 years ago
rubidium
48ece47bd9
(svn r14397) -Fix: possible buffer overrun, wrong parameter type passed to printf and && where || is meant. Found by MSVC's code analysis (Darkvater)
16 years ago
frosch
fb1fae001a
(svn r14384) -Fix: Moving the first vehicle of a train elsewhere might require a new unitnumber for the remaining chain.
16 years ago
rubidium
7935517470
(svn r14371) -Fix [FS#2313]: loading indicator didn't stay with the front engine when turning a train in a station.
16 years ago
frosch
a4fd962adf
(svn r14366) -Fix (r14362): Match multiheaded parts starting from the first vehicle in a chain.
16 years ago
frosch
6782d81142
(svn r14362) -Fix (r3403): Also connect multiheaded parts in free wagon chains.
16 years ago
smatz
7e4e999a97
(svn r14307) -Fix: when deleting a station, remove news items regarding it
16 years ago
michi_cc
5a28d3a54f
(svn r14285) -Fix [FS#2263]: A train inside a wormhole could free the reservation of another train inside the wormhole.
16 years ago
michi_cc
e008f58350
(svn r14284) -Fix (r13958): Trains would not look ahead and extend their reservation on a waypoint tile in all cases.
16 years ago
rubidium
6e67ea1f9d
(svn r14258) -Codechange: rework the way to query the vehicle hash to make sure it always results in the same irregardless of the order of the hash-linked-list.
...
-Fix: desync in PBS reservation following, vehicle flooding and road vehicle overtake/follow code.
16 years ago
frosch
f932e81127
(svn r14149) -Fix: When selling the front engine of a train consist with another engine at the second position, not all 'important' data was copied to the new head.
16 years ago
frosch
b66b3937ed
(svn r14148) -Fix (r14096) [FS#2239]: Orders were freed while they were still shared by other vehicles.
16 years ago
frosch
2dd9bc672a
(svn r14131) -Fix (r13952) [FS#2250]: The reservation of adjacent stations was sometimes not freed correctly. (michi_cc)
16 years ago
frosch
7020a48ea0
(svn r14130) -Fix (r13961) [FS#2248]: Clear the stuck state of a train that is reversing with the first vehicle inside a depot. (michi_cc)
16 years ago
rubidium
66b9ea9a5a
(svn r14096) -Codechange: merge the shared order's vehicle list management to a single location.
16 years ago
rubidium
38905d596f
(svn r14089) -Fix [FS#2219]: trains not being able to find a route to a depot when the front is already in the depot.
16 years ago
frosch
92f3c368b8
(svn r14083) -Fix [FS#1264, FS#2037, FS#2038, FS#2110]: Rewrite the autoreplace kernel.
16 years ago
peter1138
550fc3a3f5
(svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
16 years ago
frosch
c8e699cc35
(svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE.
16 years ago
rubidium
19de9ac7e1
(svn r14039) -Fix [FS#2217]: reversing an overlength train at a station would try to find a route out and sometimes reset the unload counter making it wait 2.5 years before departing instead of waiting until the train would actually leave the station (michi_cc)
16 years ago
rubidium
f0347e5383
(svn r14036) -Fix [FS#2197,FS#2198]: trains crashing into eachother when signals are changed (michi_cc)
16 years ago
smatz
c665a2f233
(svn r14021) -Fix (r13957) [YAPP]: Overbuilding station tiles with non-track tiles could produce stale reservations. (michi_cc)
16 years ago
smatz
7fce33fb51
(svn r14001) -Fix (r13989): reading wrong variable, train crash on bridge crashes game
16 years ago
rubidium
33148eae6e
(svn r13989) -Fix [FS#2186] (r13953): YAPP track reservation for crashed trains was broken for depots and wormholes (michi_cc).
16 years ago
frosch
8644a8915e
(svn r13983) -Fix (r13953) [YAPP]: Crashed trains can be on different trackbits. Make sure there is still a track reservation when one vehicle is cleaned up.
16 years ago
frosch
fe058e2ec2
(svn r13976) -Fix (r13953) [YAPP]: A crashing train could sometimes free the reservation of another train. (assisted by michi_cc)
16 years ago
frosch
ba1b3c7f11
(svn r13974) -Fix [YAPP]: A train crash could lead to stale reservations. (michi_cc)
16 years ago
rubidium
8b10e70f39
(svn r13971) -Fix [YAPP]: segfault due to mixed up variables (michi_cc)
16 years ago
rubidium
1e549a0fcc
(svn r13966) -Codechange [YAPP]: Bar level crossings upon path reservation. (michi_cc)
16 years ago
rubidium
14f6b1f49c
(svn r13964) -Codechange [YAPP]: Check if a train needs servicing when reserving the next path segment. (michi_cc)
16 years ago
rubidium
e0e8f0e711
(svn r13963) -Codechange [YAPP]: Reserve a track when entering a PBS block through a conventional signal. (michi_cc)
16 years ago
rubidium
ed629f599b
(svn r13962) -Codechange [YAPP]: Do not reverse in front of red signals when inside a PBS block and reversing of stuck trains is disabled. (michi_cc)
16 years ago
rubidium
a32fb70e1d
(svn r13961) -Add [YAPP]: Handle train reversing. (michi_cc)
16 years ago
rubidium
e78a235293
(svn r13960) -Codechange [YAPP]: Reserve a path when exiting a depot into a PBS block. (michi_cc)
16 years ago
rubidium
0b38276d5a
(svn r13959) -Codechange [YAPP]: Try to extend a train reservation as far as possible and only call into the pathfinder on track choices. (michi_cc)
16 years ago
rubidium
1415b19fad
(svn r13958) -Add [YAPP]: Implement look-ahead for trains so they extend their reservation before reaching the end. (michi_cc)
16 years ago
rubidium
c213ff35e5
(svn r13955) -Codechange [YAPP]: Try to extend the path of a stuck train so it is able to continue. (michi_cc)
16 years ago
rubidium
49967b9077
(svn r13954) -Codechange [YAPP]: On reserving a path that ends at the destination, the path could end at a non-safe tile. In this case, extend the reservation based on the next vehicle orders. (michi_cc)
16 years ago
rubidium
f6bdf23527
(svn r13953) -Add [YAPP]: Free track reservations of crashed trains. (michi_cc)
16 years ago
rubidium
2e2a6d4909
(svn r13952) -Add [YAPP]: Trains now reserve paths trough PBS signals. Bump savegame version. (michi_cc)
16 years ago
rubidium
21e4904eb3
(svn r13951) -Codechange [YAPP]: A train leaving a tile should unreserve the track it came from if it was reserved. (michi_cc)
16 years ago
rubidium
a31e86c778
(svn r13950) -Add [YAPP]: Trains can now also be in a 'stuck' state when waiting on a path reservation. (michi_cc)
16 years ago
rubidium
2b6978e48e
(svn r13912) -Codechange: remove some casts by returning the proper type instead of void*.
16 years ago
smatz
0a67e72df5
(svn r13911) -Fix (r13806): do not consider crashed train as waiting at signal, v->direction doesn't have to match track anyway
16 years ago
peter1138
93c279d6b4
(svn r13870) -Fix [FS#2167]: Callback 10 (visual effect and powered wagons setting) and powered wagons operation were not performed for articulated wagons.
16 years ago
smatz
c4c20c324f
(svn r13817) -Cleanup (r13816): no need to check for ENABLE_NETWORK, _networking is defined anyway
16 years ago
smatz
f1c0555d2e
(svn r13816) -Fix [FS#2150]: check for vehicle length changes outside a depot (callback 0x11) and give a warning about that
16 years ago
smatz
cf4aff4a86
(svn r13806) -Fix [FS#2162]: checking for train waiting at other side of two-way signal was broken
16 years ago
smatz
a47b118a80
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
16 years ago
peter1138
7d877c0c05
(svn r13507) -Fix (r12856): first engine change should've been moved too
17 years ago
smatz
506cde94b6
(svn r13456) -Codechange: use AllocaM() macro instead of alloca() at most places
17 years ago
glx
b60a1326bf
(svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror().
17 years ago
rubidium
e7a501100a
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
17 years ago
rubidium
d289464d69
(svn r13255) -Codechange: move _opt to _settings.
17 years ago
rubidium
dc77647ea4
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
17 years ago
peter1138
42f78d2fc3
(svn r13205) -Codechange: Remove unnecessary code-style-buggering-up macro.
17 years ago
rubidium
3ee2556585
(svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData.
17 years ago
rubidium
ad6e52080c
(svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp.
17 years ago
rubidium
373343cef6
(svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls.
17 years ago
smatz
2be223fc03
(svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits
17 years ago
smatz
9b8d16b7ff
(svn r13088) -Codechange: use SigSegState enum instead of bool variable (michi_cc)
17 years ago
peter1138
839070028e
(svn r13074) -Fix: For multiheaded engines, halve power and running cost when used instead of when loading, to allow callback values to work properly.
17 years ago
rubidium
8796331d83
(svn r12975) -Codechange: replace DeleteWindow(w) with delete w.
17 years ago
rubidium
1ce0b03bf0
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
17 years ago
peter1138
45034bc522
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
17 years ago
peter1138
6ac8ced9af
(svn r12860) -Fix [FS#1947]: Train depart animation trigger was not called in some cases.
17 years ago
peter1138
7c8fe9791b
(svn r12856) -Fix: Taking r12377 further, ensure that prop 25 is set for all vehicles in the consist before other properties.
17 years ago
peter1138
a05e9b4c6b
(svn r12824) -Codechange: Standardise routines for drawing vehicle images, using correct types and less duplication.
17 years ago
rubidium
e947fde701
(svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits.
17 years ago
rubidium
bbe13a0623
(svn r12818) -Codechange: make callbacks 31 and 37 behave like they do in TTDP according to frosch's survey.
17 years ago
rubidium
8186344628
(svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp
17 years ago
rubidium
40b19f3997
(svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing.
17 years ago
peter1138
3b7558b89c
(svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes)
17 years ago
rubidium
a63974547b
(svn r12795) -Fix [FS#1938]: vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading.
17 years ago
rubidium
ca1f8fbe2e
(svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators.
17 years ago
rubidium
6d063c3ad6
(svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h.
17 years ago
smatz
ec588da9e8
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
17 years ago
smatz
966e476df8
(svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile()
17 years ago
glx
90bd1e45eb
(svn r12711) -Codechange: remove unneeded loops
17 years ago
rubidium
760a57867f
(svn r12698) -Codechange: skip orders to stations that do not have a train part anymore, just like is done for road vehicles and ships.
17 years ago
rubidium
daf5a2f1bc
(svn r12658) -Codechange: unify a vast portion of the CmdSend<VehicleType>ToDepot commands.
17 years ago
rubidium
aa8a5b2c39
(svn r12657) -Codechange: add 'FindClosestDepot' to the vehicle class.
17 years ago
frosch
b91781b715
(svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
...
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
17 years ago
rubidium
cf250390c5
(svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
17 years ago
smatz
7dc63836ea
(svn r12605) -Cleanup: variable scope and coding style in train*
17 years ago
rubidium
53d101cc99
(svn r12593) -Codechange: hide Order's flags in most of the code.
17 years ago
rubidium
935b562074
(svn r12588) -Codechange: do not access the destination of an order directly.
17 years ago
rubidium
3b0e3d8d30
(svn r12584) -Codechange: do not access the order type directly.
17 years ago
rubidium
ed2acd6f3d
(svn r12580) -Codechange: merge some logical related to non-stop orders.
17 years ago
rubidium
ba0a9538cf
(svn r12578) -Codechange: merge the aircrafts ProcessOrder too into the 'unified' ProcessOrder.
17 years ago
rubidium
3fdddeac40
(svn r12575) -Codechange: unduplicate Process*Orders for trains, ships and road vehicles.
17 years ago
frosch
2de802567a
(svn r12532) -Cleanup: Replace two tables of magic values with already existing functions.
17 years ago
frosch
51155403a4
(svn r12531) -Codechange: Rename some variables for consistency.
17 years ago
rubidium
df1d9bd880
(svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
17 years ago
rubidium
c51b81c247
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
17 years ago
rubidium
b84b16cfcd
(svn r12488) -Codechange: split order.h into order_base.h and order_func.h.
17 years ago
bjarni
8837c7dcd5
(svn r12482) -Fix: [build train] we don't need to have a depot in order to just check the price of a rail vehicle so don't check for compatible rails on the tile either
...
also wagons will only need tracks they can drive on in order to be build so there is no reason to check for power in the depot
17 years ago
rubidium
2426f5342f
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
17 years ago
smatz
3ab59da68a
(svn r12386) -Fix [FS#1841](r2428): train could break apart when reversed while partially in a depot
17 years ago
smatz
f45221f274
(svn r12384) -Fix (r2428): do not disconnect train when reversing, it may 'think' it is whole in a depot
17 years ago
glx
285a43037b
(svn r12380) -Fix: update train acceleration and max speed after setting cached value to ensure the correct max speed is used with disabled real acceleration
17 years ago
glx
cbcad325f9
(svn r12379) -Codechange: removed now redondant InvalidateWindow() calls
17 years ago
glx
187c7e19fe
(svn r12378) -Fix: refresh vehicle details window when cached values are updated
17 years ago
glx
08becf93e6
(svn r12377) -Fix [FS#1854]: set cached value for vehicle property 25 before other cached values
17 years ago
smatz
3d10ae7ec3
(svn r12369) -Fix (r1681): reset train speed limits when _patches.realistic_acceleration changes
17 years ago
smatz
1f13638d03
(svn r12368) -Codechange: use explicit body for loops and conditions and remove -Wno-empty-body from the configure script
17 years ago
peter1138
11c8050e3f
(svn r12332) -Fix (r12331): Invalidate cached data and update image after setting flag.
17 years ago
glx
d9d601b1ca
(svn r12331) -Feature: [NewGRF] vehicle variable FE bit 8
17 years ago
peter1138
f6e4dc4d8c
(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
17 years ago
peter1138
0e997be11e
(svn r12205) -Codechange: rename RailVehicleInfo::running_cost_base to running_cost, inline with other vehicle types (It is the factor, not the base)
17 years ago
frosch
91297d4732
(svn r12203) -Fix (r12199): Make trains pay attention to signals again.
17 years ago
frosch
7f3d56041b
(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
17 years ago
smatz
9bdb194b2a
(svn r12197) -Fix [FS#1788](r12134): show correct last year profit when the train had negative income
...
-Codechange: use GetDisplayProfitThisYear() to convert vehicle profit to readable form
17 years ago
smatz
7dbb21c69b
(svn r12194) -Codechange: apply coding style on enum TrainSubtype
17 years ago
smatz
0357c4306c
(svn r12189) -Codechange: mark some functions in train_cmd.cpp inline (called once or very short)
17 years ago
smatz
32d8ac2073
(svn r12188) -Codechange [FS#1782]: do not check twice for correct rail owner (patch by Vikthor)
17 years ago
smatz
4a329de942
(svn r12179) -Codechange: use GetCrossingRailTrack() and GetCrossingRailAxis() to improve code readability
17 years ago
smatz
97013cd8c4
(svn r12178) -Codechange: use the 'side' parameter in TrainController and TrainCheckIfLineEnds to simplify the code
17 years ago
smatz
fe48d0be21
(svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
...
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
17 years ago
smatz
391898b47a
(svn r12132) -Cleanup: convert pathfinder selection from if/else to switch/case at many places
17 years ago
smatz
4c5dde140b
(svn r12131) -Fix (r3374): with mammoth trains disabled, maximum train length was limited to 9
17 years ago
smatz
a3e3cd7d46
(svn r12129) -Change [FS#1759]: simplified patch settings for pathfinders (Yorick)
17 years ago
peter1138
3abf3e3fa4
(svn r12128) -Codechange: Replace last use of TrainPlayLeaveStationSound(v) with v->PlayLeaveStationSound(), and remove wrapper function.
17 years ago
frosch
f476d861d2
(svn r12085) -Fix(r12058): Road vehicles could get stuck, when NPF told them to reverse on junction tiles. (spotted by SmatZ)
17 years ago
belugas
7f5f48281c
(svn r12066) -Codechange: Rename GetBridge for the more common GetBridgeSpec
...
-Codechange: Remove direct access to the _bridge table in favor of the above mentioned GetBridgeSpec
-Codechange: Rationalize the use of Bridge type pointer
17 years ago
smatz
ebba0d7c71
(svn r12057) -Fix: slowdown train when approaching 90deg turn when 90deg turns are forbidden
17 years ago
glx
7ce12e50da
(svn r12037) -Codechange: replace OnNewDay_(Aircraft|RoadVeh|Ship|Train) with an OnNewDay method in the Vehicle class
17 years ago
smatz
f22b0127af
(svn r11996) -Fix [FS#1706]: update train statusbar when stopping from zero speed
17 years ago
smatz
8be486c27e
(svn r11960) -Cleanup: simplify some IsTunnel(Tile) / IsBridge(Tile) conditions
17 years ago
smatz
f05caedf7c
(svn r11922) -Codechange: use MaybeBarCrossingWithSound() to bar crossing with sound
17 years ago
smatz
dfb91c26ec
(svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
...
-Fix: refit button widget was not correctly updated
17 years ago
smatz
8dbf03e322
(svn r11910) -Fix: play 'ding-ding' crossing sound in more cases (except gameload and crossing construction)
...
-Fix: crossing sound is bound to tile, not to vehicle
17 years ago
smatz
b20d1eee6c
(svn r11908) -Fix: update crossing when merging a company, when building a crossing and after loading older savegame
17 years ago
smatz
2c38d3066f
(svn r11900) -Fix: set correctly crossing state after train reversal, train leaving crossing, train crash
...
Fixes several ways to leave crossing red forever or to leave it unbarred when there is a train on crossing
17 years ago
smatz
fc2895e8c2
(svn r11882) -Codechange: introduce MarkSingleVehicleDirty() and simplify the code at some places
17 years ago
smatz
3ad8b79550
(svn r11877) -Fix: another way to crash competitors' train in a station
...
-Codechange: increase the speed train is approaching line end/semaphore in non-diagonal direction a bit
17 years ago
smatz
70a9c544b8
(svn r11870) -Fix: slow down train when approaching tile we can't enter in more cases
...
(tunnel/bridge/depot from wrong direction, competitor's track, wrong railtype)
-Fix: do not make crossing red when we can't enter it in any case
17 years ago
rubidium
736640fd87
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
17 years ago
smatz
81cad58c68
(svn r11864) -Codechange: pass owner whose signals we will update instead of complex detection later
17 years ago
smatz
c6de18c3db
(svn r11847) -Fix: do not affect the speed a train is entering a depot by trackbits behind it
17 years ago
smatz
a9f69f387d
(svn r11845) -Codechange: simplify train collision detection a bit
17 years ago
smatz
b3e28dc5ad
(svn r11835) -Fix: mark depot, viewports, vehicle lists and vehicle details dirty when a train crashes
17 years ago
rubidium
9c0c798dd8
(svn r11834) -Codechange: only include settings_type.h if needed.
17 years ago
smatz
86a6268f3e
(svn r11831) -Fix: call TrainConsistChanged() when removing crashed train part to be consistent with saveload process
17 years ago
rubidium
90acd52f22
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
17 years ago
peter1138
0f7392bd61
(svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
...
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
17 years ago
smatz
74f9be8f2c
(svn r11821) -Fix (r11802): 'optimization assert' when removing crashed wagon in some cases
17 years ago
smatz
9c9b743242
(svn r11820) -Fix: invalidate depot window when removing crashed train
17 years ago
smatz
b18b7f6f22
(svn r11819) -Fix: do not access the Vehicle struct that has been already deleted when removing crashed train
17 years ago
rubidium
2fc62eab05
(svn r11818) -Codechange: split player.h into smaller pieces.
17 years ago
smatz
fa1f94e599
(svn r11812) -Codechange: introduce TrainExitDir() to simplify some functions
17 years ago
smatz
bc4ed3eafd
(svn r11802) -Fix [FS#716]: do not crash trains when leaving depot to a very long track
...
-Codechange: use dedicated pathfinder for signal updating, resulting in better performance and possible future improvements
17 years ago
rubidium
2d2e1e3863
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
17 years ago
rubidium
0365c1f33b
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
17 years ago
peter1138
0ae26a0312
(svn r11789) -Codechange: coding style for global variable names
17 years ago
rubidium
64d691bacc
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
17 years ago
rubidium
e2f7ec1d3e
(svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location.
17 years ago
rubidium
444e77d8bc
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
17 years ago
smatz
f02cf9281b
(svn r11760) -Codechange: unify the way how other end of a tunnel/bridge is determined at some places
...
-Fix: adding road/tram to tram/road bridge was cheaper by one tile
17 years ago
peter1138
5c23778065
(svn r11741) -Feature: Add support for NewGRF's train 'tilt' flag. Trains with tilt capability (specific details are per NewGRF set) will be given a 20% speed limit bonus on curves.
17 years ago
peter1138
c96fcfc21b
(svn r11738) -Codechange: Refactor realistic acceleration's curve counting to use DirDiffs instead of local tables, and remove an unnecessary loop.
17 years ago
peter1138
e5f50b6fde
(svn r11733) -Fix: Max speed for entering stations overrode the max speed of curves
17 years ago
peter1138
a1b482973d
(svn r11732) -Fix (r4150): elrail merge gave elrail, monorail & maglev unintended speed bonuses for curves, as the bonus was based on the railtype index. The bonus is now specified by a property of the railtype.
17 years ago
peter1138
2194b15fdd
(svn r11731) -Fix [FS#1582]: Clear sprite override data before performing NewGRF wagon attach callback. This stopped
...
the callback working for autoreplace and when moving wagons from train to train in a depot.
-Fix (r11724): Don't check wagon attach callback for the chain when moving a single wagon.
17 years ago
rubidium
fe71089b0e
(svn r11724) -Fix: make it impossible (for users) to circumvent the length checking of the NewGRF 'allow wagon attach' callback by moving several wagons at a time.
17 years ago
rubidium
445a733eb6
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
17 years ago
smatz
c10d3da133
(svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles
17 years ago
rubidium
722613f7f3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
17 years ago
smatz
ae3206cd97
(svn r11705) -Fix [FS#1557]: trains could have sprites with wrong direction when reversing, also was inconsistent with save/load process (possible desyncs)
17 years ago
rubidium
db73addb43
(svn r11702) -Codechange: move all date related stuff to date*.
17 years ago
rubidium
f82aeb82c5
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
17 years ago