rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
frosch
efcaefd178
(svn r17121) -Fix [FS#3060]: Update vehicle position cache when the vehicle sprite changes.
15 years ago
smatz
adcc5338f3
(svn r17085) -Codechange: unify the place where vehicle's cargo ages
15 years ago
rubidium
1fe3ad3288
(svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives
15 years ago
rubidium
4b2592dbc0
(svn r17062) -Change: unify the naming of some 125 strings
15 years ago
rubidium
097e79a86d
(svn r17001) -Codechange: replace some more assert(0)s to NOT_REACHED() and document why they (assert(0)) have to stay for the remaining cases.
15 years ago
rubidium
594070194f
(svn r16842) -Cleanup: add some spaces around a few operators
15 years ago
smatz
b6960e4e17
(svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft
15 years ago
yexo
8bc9adde19
(svn r16648) -Codechange: move some more includes around
16 years ago
yexo
44c15e4196
(svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway
16 years ago
smatz
8343340acb
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
16 years ago
smatz
192b9bda7b
(svn r16633) -Codechange: remove checks for consistency of newpool
16 years ago
rubidium
512b021e26
(svn r16581) -Codechange: unify the access to Engine::lifelength.
16 years ago
rubidium
4b05617c42
(svn r16580) -Codechange: rename Engine::image_index to original_image_index to not confuse it with image_index from *VehInfo.
16 years ago
frosch
0d782b0f96
(svn r16498) -Codechange: Remove hardly used HASBITS.
16 years ago
alberth
bab70a823d
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
16 years ago
frosch
9853c0dc22
(svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains.
16 years ago
frosch
56988b198d
(svn r16479) -Fix (r5146): Call callbacks after initialisation of vehicle variables.
16 years ago
smatz
5a463c8347
(svn r16442) -Codechange: use new Vehicle accessors at more places
16 years ago
smatz
7ee882d03f
(svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types
16 years ago
yexo
0d56cfabfa
(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.
16 years ago
rubidium
984bd3b98d
(svn r16427) -Codechange: replace a few magic numbers with an existing constant and unduplicate a few lines.
16 years ago
frosch
a4557c7da4
(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.
16 years ago
rubidium
6237fe1462
(svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier.
16 years ago
rubidium
c882248348
(svn r16388) -Codechange: move u.air to Aircraft
16 years ago
rubidium
ada3067960
(svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate
16 years ago
smatz
62a7948af0
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
16 years ago
smatz
b687ac51ee
(svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted
16 years ago
smatz
8808f3beea
(svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get()
16 years ago
smatz
871107f529
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
16 years ago
smatz
6221d74644
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
yexo
31eff1d4c3
(svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct
16 years ago
frosch
32ecc48ec8
(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
0274886ae1
(svn r16300) -Codechange: reduce usage of Vehicle::AllocateList
16 years ago
rubidium
d23f616e9f
(svn r16296) -Codechange: silence some ICC warnings
16 years ago
rubidium
59d45a04d6
(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
b25a4f8231
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
16 years ago
rubidium
655b0ccc2e
(svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove.
16 years ago
peter1138
733c0c5c5b
(svn r15665) -Fix (r8973): Handling of aircraft crash counter did not take account of the reduced number of calls (from 6 down to 2) to the aircraft event handler, resulting in crashed aircraft taking three times longer than they should to clear. Compensate by increasing the counter by 3 on every call instead of 1.
16 years ago
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.
16 years ago
rubidium
d846eef0b6
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
16 years ago
rubidium
c0a8d09ca7
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
16 years ago
rubidium
377ce6c5bf
(svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability.
16 years ago
frosch
7f198507f7
(svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason()
16 years ago
frosch
9c4c0ff3a1
(svn r15326) -Fix: Old-ai-ishm when refitting vehicles.
16 years ago
smatz
0d3f5e6e74
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
frosch
7dbd0582b6
(svn r15286) -Fix: Refitting did not invalidate vehicle-colour-maps of road-vehicles, ships and aircraft, as well vehicle-length of road-vehicles.
16 years ago
glx
c1cf3934fa
(svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication.
16 years ago
glx
c5f0fe7c40
(svn r15210) -Fix: Vehicle::GetRunningCost() was wrong for ships and aircraft
16 years ago
peter1138
3deb373c60
(svn r15131) -Fix: Indentifluxation combobulated
16 years ago
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
16 years ago
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
16 years ago
rubidium
3d6c09b38d
(svn r14952) -Codechange: unify the "can vehicle go to station" tests
16 years ago
rubidium
11da45ee55
(svn r14949) -Cleanup: pointer coding style
16 years ago
glx
c7959ce2a9
(svn r14840) -Cleanup: remove duplicate includes
16 years ago
smatz
67bf6a0998
(svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too
16 years ago
smatz
7368c740a6
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago
rubidium
87e5a8b52b
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
16 years ago
rubidium
c2466d9571
(svn r14749) -Codechange: replace a few wrapper functions that only called delete by a direct delete instead.
16 years ago
rubidium
3ebe66a5e4
(svn r14748) -Codechange: unduplicate window updating when deleting vehicles.
16 years ago
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.
16 years ago
smatz
419f6e099f
(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
fab1a52963
(svn r14672) -Fix [FS#2444]: Property 7 and callback 12 were broken for aircraft.
...
Now callback 12 is properly called also for 'mail'.
If the callback is not used, 'mail' uses 1/4 of property 7 (rounded up).
16 years ago
rubidium
b650a86e58
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
16 years ago
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.
16 years ago
smatz
abbc9cd9cb
(svn r14383) -Fix [FS#2316](r14343): handle invalid 'v->u.air.targetairport' in the NewGRF code, too
16 years ago
smatz
192d348f78
(svn r14343) -Fix [FS#2300]: invalid v->u.air.targetairport could cause crashes at several places when the station pool got smaller
16 years ago
rubidium
ab4d0e2dac
(svn r14309) -Fix [FS#2244]: aircraft frozen above oil rig when the next order is invalid.
16 years ago
smatz
66be028ad4
(svn r14307) -Fix: when deleting a station, remove news items regarding it
16 years ago
rubidium
c8e8911ef6
(svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites.
16 years ago
peter1138
9d0e1b635a
(svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
16 years ago
frosch
844a83ed58
(svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE.
16 years ago
rubidium
af21ac537e
(svn r13794) -Fix: helicopters leaving a heliport could get stuck after processing conditional orders.
16 years ago
smatz
447ec39f49
(svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not
16 years ago
rubidium
923e21129c
(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
4625695653
(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
rubidium
9defec7876
(svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData.
17 years ago
rubidium
76b8970a33
(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
peter1138
a00371c8db
(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
5dcd689f56
(svn r12824) -Codechange: Standardise routines for drawing vehicle images, using correct types and less duplication.
17 years ago
rubidium
22140d82c6
(svn r12818) -Codechange: make callbacks 31 and 37 behave like they do in TTDP according to frosch's survey.
17 years ago
peter1138
b418ee5a4c
(svn r12809) -Fix (r1704): Possible out of bounds array access.
17 years ago
rubidium
b139756e2b
(svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp
17 years ago
rubidium
0e624275ee
(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
b1d1a4ac66
(svn r12757) -Codechange: move all cheat related stuff from all over the place to a single location.
17 years ago
rubidium
02cdf01507
(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
rubidium
570519d79b
(svn r12658) -Codechange: unify a vast portion of the CmdSend<VehicleType>ToDepot commands.
17 years ago
rubidium
62bdc381e7
(svn r12657) -Codechange: add 'FindClosestDepot' to the vehicle class.
17 years ago
rubidium
3abf0eea7c
(svn r12631) -Fix [FS#1911]: sometimes aircraft couldn't find their way to their depot.
17 years ago
frosch
96700d5605
(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
f1cd7ef5ee
(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
rubidium
fb1c4eccd8
(svn r12593) -Codechange: hide Order's flags in most of the code.
17 years ago
rubidium
5d8e3adccc
(svn r12592) -Fix (r12580): aircraft's go-to-depot handling is a mess, which assumes destination to be a station even when it did not set a destination yet.
17 years ago
rubidium
d6623cf654
(svn r12588) -Codechange: do not access the destination of an order directly.
17 years ago
rubidium
5b47f81b0f
(svn r12584) -Codechange: do not access the order type directly.
17 years ago
rubidium
5eb5889954
(svn r12578) -Codechange: merge the aircrafts ProcessOrder too into the 'unified' ProcessOrder.
17 years ago
frosch
15a9fba867
(svn r12531) -Codechange: Rename some variables for consistency.
17 years ago
rubidium
ef2be7d0fc
(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
2edd403656
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
17 years ago
rubidium
4a1035ab95
(svn r12488) -Codechange: split order.h into order_base.h and order_func.h.
17 years ago
rubidium
d51347a04d
(svn r12477) -Fix [FS#1883]: timetable times for aircraft were always doubled.
17 years ago
rubidium
eeabab4555
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
17 years ago
peter1138
b4a51cd28d
(svn r12343) -Fix (r12293): Slow helicopters never got the 'chance' to finish the landing routine.
17 years ago
peter1138
926f5d548d
(svn r12293) -Feature: Ability to change aircraft speed factor, from so
...
called 'realistic' (matching other vehicles) (1/1) to original TTD
speed (1/4). Note this option defaults to original TTD speed.
17 years ago
bjarni
089969e1ca
(svn r12230) -Codechange: [autoreplace] made a function to detect if a vehicle needs autorenewing
...
This will remove duplicated code and ensure that the check is consistent
17 years ago
peter1138
ac5433a924
(svn r12144) -Codechange: Adjust aircraft slowing algorithm so that very fast
...
aircraft slow down more rapidly than slower aircraft. This prevents them
from reaching the end of the runway at high speed, and also stops slow
aircraft from slowing down too much at the start of the runway.
17 years ago
smatz
a0ddc43e92
(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
1011ac353b
(svn r12109) -Fix [FS#1745](r8973): use tile index 0 for planes in the air, so it cannot have an invalid tile index
17 years ago
glx
525409b0fc
(svn r12037) -Codechange: replace OnNewDay_(Aircraft|RoadVeh|Ship|Train) with an OnNewDay method in the Vehicle class
17 years ago
bjarni
000117aa19
(svn r11935) -Fix (r11875)[FS#1672]: autosend aircraft to hangar for replacement check inverted the check for autorenew
...
Now it triggers when renew setting is on and only if it's on
Note: aircraft already enroute to hangars due to this bug will still go there. They will only head there once though
17 years ago
smatz
1d59439166
(svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
...
-Fix: refit button widget was not correctly updated
17 years ago
glx
f37174f0e2
(svn r11895) -Fix (r11875): for once MSVC warns for a good reason
17 years ago
smatz
ac7bc24b0e
(svn r11882) -Codechange: introduce MarkSingleVehicleDirty() and simplify the code at some places
17 years ago
bjarni
beb1b07f5f
(svn r11875) -Fix: automatically sending aircraft to depot for autoreplace/renew is now triggered by the correct conditions
...
Now it triggers by the following conditions:
- aircraft is old enough for renew or needs to be autoreplaced
- player has 2*cost of new aircraft+autorenew money (we don't want to send many aircraft to hangars when there is only money for replacing one)
- aircraft has no hangars in it's order list
- new aircraft is buildable (imagine autorenewing a retired design)
This triggers right after a helicopter takes off or when a plane touches the ground while landing
Another effect of this change is that this functionality no longer generates network traffic
17 years ago
rubidium
576f8ad93e
(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
rubidium
dc87b05e8c
(svn r11834) -Codechange: only include settings_type.h if needed.
17 years ago
rubidium
d4e6a6bf57
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
17 years ago
peter1138
ab8382c0db
(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
rubidium
ac528411df
(svn r11818) -Codechange: split player.h into smaller pieces.
17 years ago
rubidium
46650c54b6
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
17 years ago
peter1138
a01fc4c142
(svn r11789) -Codechange: coding style for global variable names
17 years ago
rubidium
0e517fe023
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
17 years ago
rubidium
a8a3a7e3f2
(svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location.
17 years ago
rubidium
b0ac283aec
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
17 years ago
rubidium
e5e75bd8f8
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
17 years ago
smatz
38f0e422ac
(svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles
17 years ago
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
17 years ago
rubidium
b9046c97fb
(svn r11702) -Codechange: move all date related stuff to date*.
17 years ago
rubidium
2786d789a1
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
17 years ago
rubidium
429521a7d1
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
17 years ago
rubidium
9e9cfe6e59
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
17 years ago
rubidium
433a9f3c09
(svn r11675) -Codechange: split the string types from the string functions.
17 years ago
rubidium
5b49e75453
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
17 years ago
rubidium
fe76841255
(svn r11562) -Fix [FS#1503] (r11546): aircraft sometimes stopped mid-air when the airport got destroyed.
17 years ago
belugas
0feaee4124
(svn r11546) -Fix[FS#1496]: If ever the air/heli port is suddenly not available while the "chopper" is descending, just go back into flying.
...
The code should have been better written, but in respect of newgrf_port branch, i prefer minimalist intervention
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
skidd13
a91c2a4c39
(svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style
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
5c31a973a1
(svn r11482) -Codechange: Remove the doubled function ClrBitT 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
rubidium
2e8d37dcdf
(svn r11451) -Fix [FS#1287]: very fast aircraft would sometimes abruptly stop at the begin of the landing runway, turn a few times and then drive slowly to the end of the runway.
17 years ago
rubidium
f486486dd8
(svn r11365) -Fix [FS#1288]: when stopping a ship or aircraft, set their speed to 0 so they won't continue at the speed where they were stopped at.
17 years ago
rubidium
4bb210614b
(svn r11332) -Fix: vehicles getting a value of 0 on construction.
...
-Fix: assertion when selling vehicles.
17 years ago
rubidium
84d93ec0e2
(svn r11234) -Fix [FS#1312]: the explosion vehicles were placed too far to the south.
17 years ago
rubidium
b6c9bc80cf
(svn r11229) -Fix [FS#1307]: one could sell vehicles that were crashed in a depot, which would still yield money.
17 years ago
glx
8e5480aa16
(svn r11214) -Fix [FS#1296]: planes can't use heliports so refuse these orders
17 years ago
rubidium
127c7c9b0f
(svn r11173) -Codechange: rename some callback enums so they are more uniform.
17 years ago
rubidium
38ff181ebf
(svn r11072) -Fix [FS#1045]: when a vehicle had a service order, the goto-depot button did not make it possible to stop the vehicle at that 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
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
bjarni
a973c893fb
(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
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
efc7fdf2fd
(svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
17 years ago
rubidium
90f85c957a
(svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class.
18 years ago
rubidium
83a880c882
(svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image.
18 years ago
peter1138
de357c74c1
(svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf)
18 years ago
maedhros
fb284a9264
(svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable.
18 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.
18 years ago
rubidium
f806b46cc9
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
18 years ago
maedhros
cf0118ee63
(svn r10236) -Feature: Introduce a form of timetabling for vehicles.
18 years ago
rubidium
2ee73b50b8
(svn r10208) -Codechange: replace int32 with Money where appropriate.
18 years ago
rubidium
49220cc6f1
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
18 years ago
rubidium
966e2738b9
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
18 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.
18 years ago
rubidium
42f920964b
(svn r9833) -Fix: also 'leave' the station when leaving for automatic servicing.
18 years ago
rubidium
2efecd34c4
(svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions.
18 years ago
peter1138
4591fb5b0d
(svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types.
18 years ago
peter1138
76ee6d1c82
(svn r9804) -Fix (r9761): Update aircraft cached information when its 'pos' changes, as well as 'state'. (Thanks to bulb)
18 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.
18 years ago
rubidium
981bf52bdd
(svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
18 years ago
rubidium
a4e045a3fb
(svn r9760) -Codechange: remove the need for saving some vehicle variables.
18 years ago
rubidium
ec9ac99d01
(svn r9755) -Codechange: refactor some more of the begin loading stuff.
18 years ago
rubidium
202009522c
(svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches.
18 years ago
rubidium
6440440f12
(svn r9752) -Codechange: remove some duplication related to BeginLoading.
18 years ago
maedhros
02e770ff2c
(svn r9742) -Fix (r9689) [FS#739]: Fix cloning with refit costs again, hopefully for good this time.
18 years ago
maedhros
034f3591cf
(svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot.
18 years ago
maedhros
8b65349d86
(svn r9684) -Fix (r9683): Remove vehicles from the station loading list instead of adding
...
them again when they leave, and add a v->LeaveStation() call for aircraft.
18 years ago
peter1138
a40d53d8d1
(svn r9678) -Codechange: Support changing of aircraft running cost via callback 36.
18 years ago
peter1138
41cf2fa69b
(svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
18 years ago
maedhros
ccaaa7d33a
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
18 years ago
belugas
56943ab584
(svn r9551) -Documentation: Some more doxygen work
18 years ago
belugas
d58f9ef7b4
(svn r9545) -Documentation: Some corrections to previous doxygen work
18 years ago
maedhros
eae03e0f72
(svn r9543) -Fix [FS#691]: Split up STR_ENGINE_NOT_BUILDABLE into four strings so it can be
...
translated properly and remove "buildable", since it isn't actually a word.
18 years ago
celestar
a1ab0d29fe
(svn r9524) -Fix(FS#640,r8755): Implemented a "dummy" State Machine for stations who got their airport removed while there were still aircraft within the State Machine (and thus caused asserts)
18 years ago
peter1138
d7f56f1550
(svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
18 years ago
peter1138
1bea18b440
(svn r9352) -Codechange: Use cargo class to determine if an aircraft should carry mail
18 years ago
peter1138
457930c483
(svn r9322) -Codechange: Use cargo class to count crash/flood victims
18 years ago
richk
f44cbfe1fe
(svn r9299) -Fix (FS#675,FS#660): Small micro-movements on airports (of <4 pixels) caused odd aircraft movements. On oilrigs, this caused a full crash as movement would take helicopter out of airport/station tile.
...
Corrected by maneuvering aircraft directly over these tiny movements, rather than relying on movement by changing facing.
18 years ago
peter1138
92486ac980
(svn r9259) -Codechange: NUM_CARGO isn't a valid cargo type...
18 years ago
bjarni
c2b7d0192d
(svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use
18 years ago
rubidium
ce919e8c71
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
18 years ago
rubidium
36bb92ae24
(svn r9050) -Codechange: Foo(void) -> Foo()
18 years ago
bjarni
f61f1962c5
(svn r9040) -Codechange: the build window and CmdBuildAircraft() now shares the code to figure out if an aircraft is buildable in the hangar in question
...
This should help ensuring that the build command and the list are consistent in what aircraft are buildable
18 years ago
celestar
f621608f7d
(svn r8973) -Feature/Codechange: Changed the internal unit for aircraft velocities to from 8mph to 1km/h (peter1138), also give aircraft realsitic velocities (so that 1km/h is 1km/h independent of vehicle type) (peter1138). Introduce a flag to reduce aircraft speed in holding patterns to some realistic velocity. Use this flag for the city airport for the time being and make use of the different entry points for this airport type.
18 years ago
maedhros
469fbc912c
(svn r8946) -Feature: [NewGRF] Add support for vehicle variables 0xFE and 0xFF bit 10,
...
which is set when a vehicle was built during the exclusive testing phase.
18 years ago
maedhros
aadd8a4b44
(svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status.
18 years ago
rubidium
8877ef7478
(svn r8921) -Fix (FS#654): several issues related to removing all orders from an aircraft and removing the airport it was heading:
...
- the aircraft would go to (0, 0) and circle there. Clicking the 'eye' to jump to the aircraft in the main window could cause a segmentation fault.
- when rebuilding an airport with the StationID of the old airport could crash as the FTA state of the aircraft is higher than the number of states of the new airport, causing a crash of all clients and the server when assertions are enabled.
- when rebuilding an airport with the StationID of the old airport can bring the aircraft in a state where is keeps circling the airport.
To solve these issues all aircraft without a valid order will try to go to the nearest hangar it can safely get to (large jets do not land on small airports). If there is no hangar to go to, the airplane crashes (out of fuel).
18 years ago
tron
1ce43c1a37
(svn r8897) -Fix
...
Change the signature of GetNewVehiclePos():
-void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp);
+GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
18 years ago
belugas
6d199fcdb7
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
18 years ago
belugas
a723770836
(svn r8853) -Cleanup: doxygen changes. Correct forgotten c files to cpp files with the @file tag as well as a few general comments style
18 years ago
tron
0b536291e2
(svn r8835) -Fix
...
Remove dead code
18 years ago
tron
b3d93e3aa2
(svn r8834) -Fix
...
Do not pass something to a function it better could figure out by itself
18 years ago
tron
41d526415c
(svn r8822) -Fix
...
Variable scope, const
18 years ago
tron
cf5949f59d
(svn r8763) -Fix
...
Don't do bogus initialisations and prefer simpler code
18 years ago
celestar
a8e88ae7cc
(svn r8759) -Feature: Allow airports to have up to 4 entry points depending on approach direction. Note: they're not yet used, but will be soon
18 years ago
tron
87e03c7aa8
(svn r8755) -Fix
...
Abbreviate GetAirport(st->airport_type) to st->Airport()
18 years ago
KUDr
72cdfb6352
(svn r8750) -Fix (r8747): PLANES defined in wingdi.h caused compilation error under Win32. Changed to AIRPLANES
18 years ago
tron
0697701b33
(svn r8748) -Fix
...
-Codechange: Do not hardcode the airports with a short airstrip anymore, but make it a flag in AirportFTAClass
18 years ago
tron
5231f5669d
(svn r8747) -Fix
...
-Codechange: Make the encoding of accepted aircraft types of airports a bit more sensible and move the enum into struct AirportFTAClass
18 years ago
tron
f6b917f609
(svn r8743) -Fix
...
-Codechange: Add a Z adjustment attribute for helicopter pads to AirportFTAClass to get rid of some special cases for oilrigs and heliports
18 years ago
celestar
39b73119ca
(svn r8733) -Fix(r8705): Forgot to change some more places where airport blocks are stored
18 years ago
celestar
8eab3964b4
(svn r8707) -Codechange: Turn IsValidStation into a method of Station
18 years ago
bjarni
0c8078ae29
(svn r8661) -Fix: [depot windows] Enlarge the blocks in the depot window if a sprite is too big to fit (ships and aircraft only)
...
-Codechange: depot windows default now makes a 1x1 matrix and resize the window by block size*number of blocks
This will make less vehicle type specific code and easier to read resizing based on sprite sizes
18 years ago
tron
eab0379264
(svn r8618) -Fix
...
Remove redundant assignments. The function call just before already does it
18 years ago
tron
9ad50fff33
(svn r8617) -Fix
...
Fix harmless typo: s/,/;/
18 years ago
celestar
3dc645ce0a
(svn r8611) -Fix: Moved the aircraft speed limiting into UpdateAircraftSpeed and enummed some speed limits. This should give a more steady display in the status bar during taxiing
18 years ago
bjarni
80125fd934
(svn r8610) -Codechange/Feature: rewrote the list handling in the autoreplace window
...
-The user will notice the following changes:
All vehicle types behaves in the same way
Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list
-The code changes:
Instead of looping all engines all the time, each list generates a list like the build windows
This ensures consistent list generation since only one function can loop all engines
Unified code for all vehicle types
It now use the lists to call the drawing code in the build vehicle window
Works on selected EngineIDs instead of selected index in the list
18 years ago
tron
1a3b4b7394
(svn r8559) -Fix
...
-Codechange: Put the airport movement data into struct AirportFTAClass
18 years ago
tron
c326ff3795
(svn r8550) -Fix
...
Building a vehicle does not involve allocating orders, so do not check whether orders could be allocated
18 years ago
tron
981833751a
(svn r8549) -Fix
...
Do not check whether the end of the depot array has been reached when building an aircraft. This cannot happen, just assert it really does not happen
18 years ago
tron
c3d971c855
(svn r8548) -Fix
...
Remove redundant second retrieval of the AircraftVehicleInfo when building an aircraft
18 years ago
tron
feab2ace94
(svn r8547) -Fix
...
Remove redundant second retrieval of the station and airport when building an aircraft
18 years ago
celestar
6f01ba5ad9
(svn r8534) -Feature/Codechange: Provide aircraft with vertical separation depending on their altitude and velocity
18 years ago
tron
ce12ae7420
(svn r8498) -Fix
...
-Codechange: Move the update of the oil rig airport type to the recently (r8485) added loop
18 years ago
peter1138
60ddc05925
(svn r8434) -Fix (r8430): Missing braces caused compilation failure for some (most?) compilers...
18 years ago
tron
430e64c848
(svn r8430) -Fix
...
Replace the rather obscure control flow for handling aircraft/ship/train orders by something remotly comprehensible (see r3584)
18 years ago
Darkvater
50ca901b40
(svn r8428) -Codechange: Add proper names to aircraft subtypes instead of magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow.
18 years ago
truelight
bb8f3a1dff
(svn r8305) -Codechange: defining 'static const' in a header is a bit weird.
...
Above that, wince-gcc gave "unused variable" on every file which included airport.h... pretty annoying ;)
18 years ago
peter1138
92d418b031
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
...
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
18 years ago
KUDr
9bfb3f08d9
(svn r8110) -Codechange: direct Vehicle::current_order.type changes (to OT_LOADING and OT_LEAVESTATION) replaced by v->BeginLoading() and v->LeaveStation() calls. This should allow easy hooking of those state transitions in order to maintain vehicle loading queue.
18 years ago
celestar
2ac0410767
(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
18 years ago
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
18 years ago
rubidium
344f70e1af
(svn r8034) -Fix (r8033): aircraft_cmd.c was not renamed.
18 years ago