Commit Graph

344 Commits

Author SHA1 Message Date
rubidium fb2ea6c9ed (svn r15672) -Codechange: (left,right,top,bottom)_coord -> coord.(left,right,top,bottom), i.e. use Rect. 2009-03-11 17:26:58 +00:00
michi_cc 81595bf256 (svn r15652) -Fix [FS#2706]: new (this) is seldom a good idea as destructors of member variables aren't run causing memory leaks. 2009-03-09 18:41:54 +00:00
smatz a92cd2b72e (svn r15624) -Fix (r15621): warning about comparing signed and unsigned integer types 2009-03-05 22:55:47 +00:00
peter1138 7dd6f218ef (svn r15622) -Codechange: Duplication. 2009-03-05 17:52:35 +00:00
peter1138 1bde2d97b5 (svn r15621) -Feature: When cloning a vehicle with a custom name, add and/or increment a number at the end of name and assign it to the new vehicle (for emma) 2009-03-05 17:37:56 +00:00
smatz 425fe86a3d (svn r15569) -Codechange: replace MallocT + memset( 0 ) calls by CallocT 2009-02-24 21:32:23 +00:00
frosch d3850e101c (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.
2009-02-21 12:52:41 +00:00
frosch 336fda62be (svn r15517) -Fix [FS#2642](r6455): Wagonoverrides and articulated engine parts use the colour scheme of the engine, but not its recolour callback, nor its 2CC flag. Same applies to roadvehicles. 2009-02-18 20:40:24 +00:00
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
rubidium 7da743a0dc (svn r15336) -Fix: do not use _current_company in the GUI as there are no guarantees that _current_company is the same as _local_company. 2009-02-04 16:45:07 +00:00
smatz 9723630cea (svn r15318) -Fix [FS#2594](r10288): don't warn about non-primary engines getting old 2009-02-02 16:49:11 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
smatz e00cf92f47 (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
2009-01-13 22:58:03 +00:00
truebrain a3dd7506d3 (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
2009-01-12 17:11:45 +00:00
rubidium 6c880d1c20 (svn r14990) -Codechange: handle articulated RVs and trams more strictly in GetStationTileForVehicle and CanVehicleUseStation (based on idea by Swallow) 2009-01-11 14:09:09 +00:00
smatz 0cd41d1dc6 (svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
2009-01-10 15:54:07 +00:00
rubidium 3d6c09b38d (svn r14952) -Codechange: unify the "can vehicle go to station" tests 2009-01-10 09:51:14 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium cda853872a (svn r14944) -Cleanup: add spaces around some operators 2009-01-09 22:56:28 +00:00
rubidium f0b0691bfe (svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL. 2009-01-09 14:59:02 +00:00
frosch b522f73ba8 (svn r14925) -Fix [FS#2500]: Abort dragging of vehicles in the group window when they are deleted. 2009-01-08 21:16:19 +00:00
smatz 67bf6a0998 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 2009-01-04 18:34:23 +00:00
smatz 9a09e5c4a0 (svn r14831) -Codechange: use {VEHICLE} instead of Train/Ship/Road veh/Aircraft/{STRING} {COMMA} in lang files (part by Swallow) 2009-01-04 17:42:46 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
rubidium 0d54db5f9f (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) 2009-01-03 13:52:06 +00:00
rubidium b3f2f40db7 (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. 2009-01-02 20:59:04 +00:00
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
smatz 53679122af (svn r14753) -Fix (r1): after buying a company, one could have more vehicles with the same UnitID 2008-12-26 23:53:07 +00:00
smatz f4d10ec033 (svn r14751) -Codechange: put VehicleEnterTile declaration where it should be and use correct return type 2008-12-26 22:44:13 +00:00
rubidium 3ebe66a5e4 (svn r14748) -Codechange: unduplicate window updating when deleting vehicles. 2008-12-26 21:08:51 +00:00
rubidium f18043ee21 (svn r14747) -Codechange: remove DeleteVehicleChain in favour of the vehicle destructor as that was already doing the same for a few vehicle types. 2008-12-26 20:45:02 +00:00
rubidium 1721222080 (svn r14745) -Codechange: move "depot_list" and "leave_depot_immediately" out of the vehicle struct (saving up to 16 bytes per vehicle) as it is only used to tell a calling function entered a depot (for autoreplace). 2008-12-26 18:26:11 +00:00
michi_cc 808d9255a8 (svn r14559) -Fix [FS#2387]: A train could be blocked inside a depot if it was reversed just after leaving the depot. 2008-11-02 19:32:24 +00:00
rubidium 42df5cbc03 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus) 2008-10-24 14:49:45 +00:00
rubidium d832626bb9 (svn r14491) -Documentation: updates/additions of doxygen docs (Alberth) 2008-10-19 15:39:12 +00:00
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 2008-10-14 18:38:51 +00:00
smatz 1906aa2bbb (svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker) 2008-10-07 20:57:41 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
frosch 67db5087cd (svn r14406) -Fix [FS#Eddi]: Autoreplace did not work for vehicles in free wagon chains. 2008-09-27 14:58:46 +00:00
smatz 6987e6015a (svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
2008-09-24 16:40:06 +00:00
rubidium 7ef5406946 (svn r14371) -Fix [FS#2313]: loading indicator didn't stay with the front engine when turning a train in a station. 2008-09-21 18:28:35 +00:00
frosch 2bf182fb36 (svn r14369) -Fix: Enforce non-front engines to be stopped.
This could be caused by old savegames resp. their conversion, and causes
trouble for e.g. autoreplace.
2008-09-21 14:03:47 +00:00
smatz 192d348f78 (svn r14343) -Fix [FS#2300]: invalid v->u.air.targetairport could cause crashes at several places when the station pool got smaller 2008-09-16 15:15:41 +00:00
smatz 5f4ff33ce3 (svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too 2008-09-15 22:58:41 +00:00
smatz 1266b1a73f (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) 2008-09-15 19:02:50 +00:00
rubidium 7c8a50d7d8 (svn r14324) -Fix [FS#2241]: free any blocks that a helicopter may have on an oilrig when the helicopter gets forcefully removed (bankruptcy). For other airports this isn't needed as they can't be used by multiple companies. 2008-09-14 16:49:21 +00:00
michi_cc fa3f2ae035 (svn r14285) -Fix [FS#2263]: A train inside a wormhole could free the reservation of another train inside the wormhole. 2008-09-09 19:02:47 +00:00
rubidium 9474db5cb6 (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.
2008-09-07 11:23:10 +00:00