Commit Graph

681 Commits

Author SHA1 Message Date
Peter Nelson
8b64204418 Codechange: Replace trackbit lookup table with existing functions. 2019-01-14 19:57:07 +00:00
Peter Nelson
7af53d7588 Codechange: Use const instead of magic number for ship order distance. Allow slightly further distance when following orders. 2019-01-14 19:57:07 +00:00
Peter Nelson
b98887c4a0 Change: Allow only one ship to leave depot at a time. 2019-01-14 19:57:07 +00:00
Peter Nelson
ebddd596c7 Change: Don't pathfind with no destination or if destination is known to be too far. 2019-01-14 19:57:07 +00:00
Peter Nelson
6a38a3f5df Change: Don't leave ship depot with no orders. 2019-01-14 19:57:07 +00:00
Jonathan G Rennison
e735c1a51a Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/autoreplace_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/script_station.hpp
#	src/track_func.h
#	src/vehicle_base.h
2018-11-05 12:53:36 +00:00
Charles Pigott
f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
Jonathan G Rennison
9e1e074c2b Update existing assertions to log tile information where suitable 2018-07-26 19:13:35 +01:00
Jonathan G Rennison
035f5622b9 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_cmds.cpp
#	src/landscape.cpp
#	src/linkgraph/linkgraphschedule.cpp
#	src/openttd.cpp
#	src/roadveh_cmd.cpp
#	src/toolbar_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/viewport.cpp
#	src/window_type.h
2018-07-24 18:30:42 +01:00
Niels Martin Hansen
2a868b9f3b Feature: Framerate display window (#6822)
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
2018-07-19 21:17:07 +02:00
Jonathan G Rennison
4d1bd8e4b4 Merge branch 'master' into jgrpp
# Conflicts:
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/music.cpp
#	src/table/settings.ini
#	src/town_cmd.cpp
#	src/train_cmd.cpp
2018-06-25 18:57:48 +01:00
PeterN
c2a7728084 Fix: Prevent ships moving into docks after finishing (un)loading. (#6791) 2018-06-14 09:25:39 +01:00
Jonathan G Rennison
56be293107 Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_anim_sse2.cpp
#	src/blitter/32bpp_base.cpp
#	src/blitter/32bpp_base.hpp
#	src/ground_vehicle.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/town_cmd.cpp
#	src/vehicle_base.h
#	src/viewport_gui.cppp
2018-05-25 18:29:17 +01:00
PeterN
a07394a63a Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
2018-05-22 18:43:34 +01:00
Jonathan G Rennison
955126efac Improve pathfinder support for multiple docks
The pathfinder can now find docks other than the Manhattan closest one.

Based on Cirdan commits:
afc7969c13d7ca59afe4dae4bf88122ba8d27df2
4067190dedcd3e5f668ea4f49b1dd8dfed10b2a7
d9be6b712d2ae4fb1b5ae844dde4919dd24c4fb2
2018-02-05 18:21:05 +00:00
Jonathan G Rennison
ed04845514 Merge branch 'ship_collision_avoidance' into jgrpp 2018-02-04 13:32:37 +00:00
HackaLittleBit
691ce0f1ea An assert could be triggered while looking beyond the map border.
This patch fixes that.
2018-02-04 12:49:30 +00:00
HackaLittleBit
fca03da2bb Add wormhole ship detection, one tile only! 2018-02-04 12:48:55 +00:00
HackaLittleBit
9326706eb9 Code cleanup and preparation for ships in wormhole detection 2018-02-04 12:48:02 +00:00
HackaLittleBit
80500f8f08 Rework z position 2018-02-04 12:47:36 +00:00
Jonathan G Rennison
902fd73c47 Merge branch 'ship_collision_avoidance' into jgrpp 2018-01-28 20:58:18 +00:00
HackaLittleBit
e4a10e9313 Revert part of collision detection on aqueducts, on aqueducts collision detection will not be done. 2018-01-26 20:07:32 +00:00
HackaLittleBit
354ecfdf3a Handle ship collision detection on aquaducts. 2018-01-25 18:31:11 +00:00
HackaLittleBit
e2d3c95ae1 Enable ships to pass on both sides of other ships. 2018-01-25 18:27:07 +00:00
HackaLittleBit
828e9bece2 De-duplicate ship entry to exit direction map table 2018-01-25 18:22:53 +00:00
Jonathan G Rennison
aa1a914d96 Merge branch 'ship_collision_avoidance' into jgrpp 2018-01-23 00:40:48 +00:00
HackaLittleBit
c5888dad9f Changes to ship collision avoidance algorithm
* Change some names and create a seperate procedure for finding ships.
* Check if destiny tile is buoy. If so, distance checking continues.
* Remove water tile check. It was done before and coast can't have 3 way tracks.
* Add a check for map edges.
* Add speed adjustment related to distance between ships
* Do not detect ships on tiles with parallel tracks
2018-01-23 00:39:08 +00:00
Jonathan G Rennison
d730cfd51d Cache sprite sequence bounds for vehicles 2018-01-19 19:13:01 +00:00
keldorkatarn
e3b33b45c9 Simplify direction lookup to also work for oil rigs.
(cherry picked from commit acbff5528b6aa5a01d17b814a44b6d884ee03f69)
2017-09-20 19:12:19 +01:00
keldorkatarn
1d3cf59d8a Allow building multiple docks per station.
(cherry picked from commit 0110c4a35d383e0be2cbb53cbe9cbe6784abb3e9)

# Conflicts:
#	src/station_cmd.cpp
2017-09-20 19:11:48 +01:00
Jonathan G Rennison
40b89902a5 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/galician.txt
2017-05-10 19:40:39 +01:00
peter1138
c973f65acb (svn r27858) -Change [FS#6560]: Add missing game script event for ships arriving at a station. (juanjo) 2017-04-23 09:19:32 +00:00
peter1138
e9e44105eb (svn r27858) -Change [FS#6560]: Add missing game script event for ships arriving at a station. (juanjo) 2017-04-23 09:19:32 +00:00
Jonathan G Rennison
fc60857b66 Merge branches 'adjacent_crossings' and 'zoning' into jgrpp 2017-03-20 19:06:09 +00:00
peter1138
3c7dc746d5 (svn r27807) -Codechange: Remove _ship_leave_depot_offs
There is already TileOffsByDiagDir for that. (cirdan)
2017-03-19 22:02:20 +00:00
peter1138
80303515c1 (svn r27807) -Codechange: Remove _ship_leave_depot_offs
There is already TileOffsByDiagDir for that. (cirdan)
2017-03-19 22:02:20 +00:00
peter1138
2a555480bd (svn r27806) -Codechange: Remove function ShipGetNewDirection
ShipGetNewDirection has no side effects and its return value
is ignored by its only caller, so do away with it.

Also remove now unused _new_vehicle_direction_table. (cirdan)
2017-03-19 21:59:24 +00:00
peter1138
54ec06258a (svn r27806) -Codechange: Remove function ShipGetNewDirection
ShipGetNewDirection has no side effects and its return value
is ignored by its only caller, so do away with it.

Also remove now unused _new_vehicle_direction_table. (cirdan)
2017-03-19 21:59:24 +00:00
peter1138
4f9fd074b8 (svn r27805) -Codechange: Remove function ShipGetNewDirectionFromTiles
The only user of ShipGetNewDirectionFromTiles can be better
served by DiagdirBetweenTiles, so remove the former. (cirdan)
2017-03-19 21:57:54 +00:00
peter1138
f0062f94d6 (svn r27805) -Codechange: Remove function ShipGetNewDirectionFromTiles
The only user of ShipGetNewDirectionFromTiles can be better
served by DiagdirBetweenTiles, so remove the former. (cirdan)
2017-03-19 21:57:54 +00:00
Jonathan G Rennison
7f10d83a4a Merge branch 'template_train_replacement' into jgrpp
# Conflicts:
#	src/linkgraph/linkgraphjob.cpp
#	src/saveload/extended_ver_sl.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
2016-11-01 23:00:48 +00:00
frosch
c175067ed9 (svn r27667) -Codechange: Add VehicleSpriteSeq::GetBounds and Draw. 2016-10-16 14:58:38 +00:00
frosch
a37bb32fd6 (svn r27667) -Codechange: Add VehicleSpriteSeq::GetBounds and Draw. 2016-10-16 14:58:38 +00:00
frosch
d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 2016-10-16 14:57:56 +00:00
frosch
f36539837e (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 2016-10-16 14:57:56 +00:00
Jonathan G Rennison
3ac94e97c8 Cache the result of GetImage() in Vehicle::UpdateViewport() where possible.
Sprite number is not cached if callback is made, or a variable access
outside a whitelist occurs.
Invalidate cached sprite number when direction or cargo changes,
or vehicle is marked dirty.
2016-07-08 19:07:25 +01:00
Jonathan G Rennison
4c5173b6bf Merge branch 'auto_timetables-sx' into jgrpp
# Conflicts:
#	src/lang/english.txt
#	src/saveload/afterload.cpp
#	src/saveload/extended_ver_sl.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/table/company_settings.ini
#	src/vehicle.cpp
2016-05-08 01:13:35 +01:00
Jonathan G Rennison
d59252d15b Timetable auto separation is now per vehicle, with a company default.
Remove global on-off setting.
Add button to timetable GUI.
Add company setting to control default for new vehicles.

Fix automate, start date, change time and autofill buttons
being shown enabled for other companies' vehicles.
2016-05-08 01:12:07 +01:00
Jonathan G Rennison
efcdd6c36f Remove global automated timetable setting. 2016-05-06 23:33:12 +01:00
Jonathan G Rennison
31a5baf555 Merge branch 'improved_breakdowns-sx' into jgrpp
# Conflicts:
#	src/saveload/extended_ver_sl.cpp
#	src/settings.cpp
2016-02-02 23:09:29 +00:00