Commit Graph

220 Commits (5d8e3adcccda4b89b03c925c5d061621df2e5e10)

Author SHA1 Message Date
smatz 4b7f8f04a3 (svn r11633) -Codechange: merge CheckTunnelEmpty and IsVehicleOnBridge into GetVehicleTunnelBridge 17 years ago
rubidium dedb15786c (svn r11632) -Fix [FS#1541]: vehicles were still followed when sold. 17 years ago
smatz 5acc147c1c (svn r11625) -Codechange: add CO_* enum at some places, add includes of order.h too 17 years ago
skidd13 bdc7fd2d76 (svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
17 years ago
rubidium 9a70ec1cb2 (svn r11506) -Fix [FS#1471]: selling vehicles could cause the window of others to scroll to that location. 17 years ago
skidd13 eeaa348f8b (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 17 years ago
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
skidd13 50bfe1a19d (svn r11476) -Codechange: rename the function myabs to abs to get rid of an unneeded define 17 years ago
skidd13 8be526e499 (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 17 years ago
belugas 2571f02594 (svn r11417) -Fix[FS#1421]: Let the main viewport stay where the vehicle was last seen while been center-followed 17 years ago
rubidium 3a8cdc37ce (svn r11400) -Fix [FS#1409]: assign orders during cloning after refitting as it needs the cargo types to be the same. 17 years ago
rubidium 6cc287c669 (svn r11362) -Fix [FS#1380]: cloning vehicles with non-standard sub-cargotypes (i.e. livery refits) failed. 17 years ago
glx 1256cbade3 (svn r11353) -Codechange: add support for newgrf callback 32 17 years ago
glx 4041d8108a (svn r11352) -Codechange: cache callback 2D result (vehicle color mapping) instead calling it every time the vehicle is drawn 17 years ago
rubidium 79cee7e08f (svn r11314) -Fix [FS#1356]: stop following a vehicle when you sell/destroyed it. 17 years ago
rubidium 95f2181a1d (svn r11303) -Fix: EnsureNoVehicle and EnsureNoVehicleOnGround were both used to check whether there was no vehicle on the ground, except that the former didn't take care of aircraft shadows. So now we only use EnsureNoVehicleOnGround. 17 years ago
rubidium 64a6d3daad (svn r11262) -Fix [FS#1330]: do not check for vehicles that are not on the ground when removing owned land, furthermore do not check for shadows (of aircraft). 17 years ago
rubidium a71b7226c5 (svn r11236) -Fix [FS#1322]: DeleteVehicleChain can just work as good for all vehicles, instead of not allowing trains to use it (enforced by an assert), but actually using it for trains. Patch by SmatZ. 17 years ago
rubidium 127c7c9b0f (svn r11173) -Codechange: rename some callback enums so they are more uniform. 17 years ago
rubidium 65f9a0f21a (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman. 17 years ago
rubidium ef4d248325 (svn r11064) -Fix [FS#553]: when autorenew is enabled and it cannot renew the vehicle anymore (because the player cannot build the engine), the aging warnings as if autorenew is not enabled are shown. 17 years ago
glx 4a658a562b (svn r11052) -Fix (r11017)[FS#1210]: vehicles always skip service order 17 years ago
bjarni 7cdf6d1cbe (svn r11045) -Codechange: added a function to tell if a vehicle is the rear part of a dualheaded train engine 17 years ago
rubidium 57db6a8c20 (svn r11027) -Fix: do not unconditionally assume that a tile has a depot. 17 years ago
rubidium 2c8e50f20c (svn r11017) -Codechange: unify determining whether a vehicle needs/can be service a little more. 17 years ago
rubidium 98a3b8abfa (svn r11014) -Fix (r11011) [FS#1170]: crash when selling the first train of a consist. 17 years ago
rubidium aba867d78d (svn r11011) -Fix [FS#1129]: GetFirstVehicleInChain did change the game state while being marked const.
-Codechange: do not brute force determine the first vehicle in the chain or previous vehicle, but do it by properly accounting the previous and first pointers when updating the next pointer. This gives a performance increase of about 15% when there are a lot of vehicles in the game.
17 years ago
rubidium 9b65bc430c (svn r11004) -Codechange: some reworks of the saveload mechanism to be able to save and load private and protected variables in the vehicle struct. 17 years ago
rubidium cb7eaff353 (svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that. 17 years ago
rubidium a407d53d1b (svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot. 17 years ago
rubidium 5d628e6135 (svn r10997) -Codechange: unify the vehicle view window. Patch by PhilSophus. 17 years ago
belugas 604924542c (svn r10971) -Codechange: One less magical number 17 years ago
maedhros 537064d010 (svn r10808) -Fix (r10353): Make sure spectators can't open infrastructure building menus. 17 years ago
rubidium 83e1fdcb01 (svn r10799) -Fix: only calling QuickFree and not the destructor on pool cleanups might cause memory leaks due to the way C++ works. 17 years ago
rubidium ab5fa3add2 (svn r10798) -Fix [FS#1105]: virtual functions do not work in destructors :(. 17 years ago
rubidium 9741094464 (svn r10772) -Codechange: also make use of the generic clean and destroy pool callback functions for vehicle. 17 years ago
rubidium 836105864c (svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
17 years ago
rubidium b15c0efaa9 (svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle). 17 years ago
rubidium 4e96ce3dfe (svn r10744) -Codechange: make the pool a little more OO, so it can be easier in other places. 17 years ago
peter1138 92061aba4e (svn r10734) -Fix [FS#1030]: Revert r10513) and add special cases for collision detection on bridges/tunnels. 17 years ago
peter1138 64ad100db4 (svn r10721) -Fix [FS#1084]: Skip articulated parts of road vehicles during unique name check. 17 years ago
glx 94fa0ec289 (svn r10714) -Fix r10696: MSVC performance warning 17 years ago
rubidium 5bd241eb5b (svn r10697) -Codechange: give a more sensible names to some of the unkX variables. 17 years ago
rubidium 02ab86631e (svn r10696) -Codechange: remove duplication of the "make sprite transparent" code. 17 years ago
rubidium b290268645 (svn r10684) -Codechange: some more coding style related changes. Primarily moving { to a new line. 17 years ago
peter1138 306c21d6c9 (svn r10603) -Codechange: avoid direct access to _engine_info 17 years ago
peter1138 1aaab031b2 (svn r10513) -Fix [FS#1022]: use vehicle subtile position to update cache, not tile, so that collision detection works on bridges and tunnels. 17 years ago
rubidium 26985a0128 (svn r10478) -Fix [FS#999]: remove the loading indicator when a vehicle is removed. 17 years ago
rubidium 90f85c957a (svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class. 17 years ago
rubidium 83a880c882 (svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image. 17 years ago
peter1138 b3c3171c1e (svn r10380) -Fix (r10364): when checking for unique names, only check vehicles that can have names, and skip inactive players. 17 years ago
peter1138 c692d897cd (svn r10364) -Fix [FS#706]: checking for duplicate custom names was inconsistent, and tested all 'namespaces'. now only check names of the same type. 17 years ago
peter1138 de357c74c1 (svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf) 17 years ago
rubidium 0c8ca15c18 (svn r10354) -Fix [FS#950]: loading indicator showed "^" when the train would load at the given station. 17 years ago
rubidium 52fbdd62a2 (svn r10353) -Fix/Feature [FS#669]: disallow (in the GUI) the building of infrastructure you do not have available vehicles for. This means that the airport building button is disabled till you can actually build aircraft. The game itself will not disallow you to build the infrastructure and this "new" behaviour can be overriden with a patch setting. 17 years ago
maedhros 821d10f44c (svn r10341) -Fix (r10236): Only update the timetable when leaving stations if this is a scheduled stop. 17 years ago
maedhros fb284a9264 (svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable. 17 years ago
KUDr a7d5363e65 (svn r10302) -Fix [YAPF, MP]: now (with r10301) it is no longer needed to invalidate the YAPF segment cache every tick in MP. Segment cost now doesn't contain the curves between segments. As a result the cache should be now accurate. 17 years ago
truelight f80fa33cc5 (svn r10270) -Add: prefixed the loading indicator with an arrow, up meaning vehicle is loading, down meaning vehicle is unloading 17 years ago
rubidium e5c352818d (svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it. 17 years ago
truelight 56eb1738ee (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh) 17 years ago
maedhros cf0118ee63 (svn r10236) -Feature: Introduce a form of timetabling for vehicles. 17 years ago
rubidium 7d6c255044 (svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder. 17 years ago
rubidium 49220cc6f1 (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified. 17 years ago
rubidium b09431478d (svn r10200) -Codechange: add "shortcut" for !CmdFailed (CmdSucceeded). 17 years ago
rubidium 966e2738b9 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate. 17 years ago
rubidium 3b5203dbc6 (svn r10154) -Fix [FS#870]: some vehicles were not drawn when having a high resolution and a high zoom-out level. Patch by B. N. SmatZ!. 17 years ago
rubidium 991996eb36 (svn r10153) -Fix [FS#869]: vehicles disappear when crossing certain tiles. Fix by B. N. SmatZ!. 17 years ago
peter1138 f477075a0b (svn r10129) -Fix (r10111): Test for x == INVALID_COORD instead of v->tile == INVALID_TILE to determine if a vehicle should be removed from the has. 17 years ago
glx da1743e980 (svn r10126) -Fix (r10111, FS#864): old_new_hash cache was not reset when the position hash were 17 years ago
peter1138 78d797a6b7 (svn r10111) -Codechange: Add new vehicle hash table for collision detection and finding vehicles on a tile. The hash area scanned is far smaller than the old hash table, which is now used for viewport updates only. This should give a significant performance improvement for games with many vehicles. (Based on work by 'B. N. SmatZ!' and 'madman2003') 17 years ago
maedhros 3e326085fa (svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
road vehicles for those who prefer the technical explanation.
17 years ago
bjarni 3afea2d673 (svn r10077) -Fix: FS#845 Cloning Trains Longer Than 8 Units Causes Crash
The problem was that if adding units to the clone (wagon by wagon) failed, then cloning wouldn't notice it and it made two half trains
  Now it detects this case and it will make cloning fail. The string with the explanation for the failed move will be used in the error message so the user will know why it failed.
17 years ago
peter1138 9c66082b07 (svn r10062) -Codechange: Don't redraw all station tiles when cargo is added or removed if the station has no custom graphics. 17 years ago
rubidium 622a4d10b9 (svn r10056) -Revert (r10049): removing SLE_WRITEBYTE didn't work as expected :(. Somehow SlIterateArray and SlObject depend on eachother and adding a some arbitrary data before the SlObject makes it go crazy. 17 years ago
rubidium eab8ac49ce (svn r10049) -Codechange: get rid of the SLE_WRITEBYTE obfuscation. 17 years ago
peter1138 07c34b2628 (svn r10048) -Fix (r6455): Don't use override engine type for articulated wagon parts. 17 years ago
maedhros 8f361393dd (svn r10020) -Fix [FS#824]: GetNextVehicle() is invalid for anything that isn't a train. 17 years ago
maedhros 4acf3e4c3f (svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type. 17 years ago
maedhros 710cc5a597 (svn r9959) -Fix: Only call GetNextVehicle for trains. 17 years ago
peter1138 974aebcce5 (svn r9956) -Codechange: Add tram livery schemes 17 years ago
maedhros 1b33f19877 (svn r9953) -Fix: Only check whether trains are multiheaded when cloning. 17 years ago
maedhros 3914f3c85c (svn r9939) -Fix (r3139): EngineHasArticPart(v) is only valid for trains. 17 years ago
rubidium 0819f3a9a0 (svn r9917) -Codechange: prepare some more areas for more road types. 17 years ago
rubidium 440d723d84 (svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile. 17 years ago
glx 0646d307bd (svn r9896) -Fix (r9874): when selling an entire train, decrease the number of vehicles in the group only once 17 years ago
peter1138 546dfc2758 (svn r9889) -Codechange: Use cargo's freight status for choosing livery scheme. 17 years ago
rubidium 4570a8954a (svn r9878) -Fix (9874): some vehicle count's were not properly updated on delete or autoreplace of vehicles. 17 years ago
rubidium 7d4be11516 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13. 17 years ago
rubidium 5178911345 (svn r9872) -Codechange: more type strictness for vehicle types 17 years ago
rubidium ba24c34f85 (svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness. 17 years ago
truelight 765c466b8d (svn r9846) -Codechange: introduced ZOOM_LVL_MIN and ZOOM_LVL_MAX for the obvious reasons
-Codechange: introduced ZOOM_LVL_DETAIL to show/remove details
-Codechange: changed << and >> operator with ZoomLevel to a simple wrapper (that in theory also allows zoom-in besides the current zoom-out)
-Fix r9845: missed some int -> ZoomLevel
17 years ago
rubidium 23492f1f34 (svn r9841) -Codechange: add a little more type strictness to the vehicle types. 17 years ago
rubidium c7d57379fb (svn r9836) -Codechange: make non-improved loading happen FIFO-ish; generally loading/unloading will happen fifo, but there are no guarantees on the FIFO-ness. For (better) FIFO guarantees you still need to use improved loading. 17 years ago
rubidium d78651f7b1 (svn r9831) -Codechange: more refactoring of the loading/unloading. 17 years ago
rubidium 2efecd34c4 (svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions. 17 years ago
rubidium fe1306ce65 (svn r9799) -Codechange: separate engine class and engine running cost class (mart3p). 17 years ago
rubidium 5c0a52149d (svn r9795) -Codechange: enumify the EngineClass. 17 years ago
rubidium abbaa1691e (svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle. 17 years ago
rubidium 438d55d576 (svn r9789) -Fix (r9770): vehicles didn't get unloaded when 'full load' was specified and the vehicle was already full when it entered. 17 years ago