Commit Graph

50314 Commits (b284d34277f1ffa6e23ec21c557e13897ab508a8)
 

Author SHA1 Message Date
dP b284d34277 Add: Support Zstandard(zstd) savegame compression
(cherry picked from commit 6f0aeaf2c5436550c93205e704624957e9abc969)
3 years ago
Jonathan G Rennison 0a31a3b923 Fix for crash when exiting whilst NewGRF scan still in progress
See: https://github.com/OpenTTD/OpenTTD/issues/8760
3 years ago
Patric Stout f183ded9fe Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.

(cherry picked from commit c3dc27e37e)

# Conflicts:
#	src/gfx.cpp
#	src/gfx_func.h
#	src/settings_type.h
#	src/video/cocoa/cocoa_v.mm
#	src/video/video_driver.cpp
#	src/video/win32_v.cpp
3 years ago
Patric Stout 535fdb5c89 Codechange: remove _realtime_tick variable
(cherry picked from commit fe451b8dc7)

# Conflicts:
#	src/debug.cpp
#	src/debug.h
#	src/video/video_driver.cpp
3 years ago
Patric Stout 3744d71b13 Codechange: replace _realtime_tick with std::chrono for mouse events
(cherry picked from commit 853bfc3562)
3 years ago
Patric Stout d4f208d9c1 Codechange: [Network] replace _realtime_tick with std::chrono
(cherry picked from commit 53c28a8ec9)
3 years ago
Patric Stout 729df75d3e Fix: [Network] don't desync if client leaves before you finish downloading map
When you are downloading a map, all the commands are queued up
for you. Clients joining/leaving is done by the network protocol,
and as such are processed immediately. This means that by the
time you are processing the commands, a client that triggered
it, might already have left.

So, all commands that do something with ClientID, shouldn't
error on an invalid ClientID when DC_EXEC is set, but
gracefully handle the command anyway, to make sure the
game-state is kept in sync with all the clients that did
execute the DoCommand while the now-gone client was still
there.

Additionally, in the small chance a client disconnects between
the server validating a DoCommand and the command being
executed, also just process the command as if the client was
still there. Otherwise, lag or latency can cause clients that
did not receive the disconnect yet to desync.

(cherry picked from commit 2d9062bfc1)
3 years ago
Patric Stout c13c201f72 Fix: [Network] don't show "server doesn't respond" while in queue
Send all clients in the queue every game-day a packet that they
are still in the queue.

(cherry picked from commit 13889b6554)

# Conflicts:
#	src/network/network_server.cpp
3 years ago
Patric Stout 7da90af2f4 Fix: [Network] send map to next client if current client disconnects
Also terminate creating of the savegame, as the client is gone,
there really is no need for that anymore.

(cherry picked from commit 8d199b1bbc)
3 years ago
Patric Stout cfa1612766 Fix: [Network] also count the person downloading the map in the queue
Strictly seen, there are "N" people -waiting- in front of you
in the queue, but it is nicer to show "N + 1" for the person that
is currently downloading the map. Avoids it showing:
"0 clients in front of you". That just feels a bit off.

(cherry picked from commit 3677418225)
3 years ago
Charles Pigott 7e39d78fc3 Fix: Vehicle list windows did not update when this year's profit changed
Remove caching from vehicle group object. and recalculate it whenever
required instead.

(cherry picked from commit 6b8f9b50b9)

# Conflicts:
#	src/vehicle_gui.cpp
3 years ago
Jonathan G Rennison dbbe1bb3e4 Fix trains passing signals in original acceleration with braking models 3 years ago
Jonathan G Rennison c37beb78ee Check for broken custom bridge head states, and bump save version 3 years ago
Jonathan G Rennison b931df9934 Add debug console command to delete a vehicle ID 3 years ago
Jonathan G Rennison 2cbb42f9a9 Add fast path to catenary drawing in MaskWireBits 3 years ago
Jonathan G Rennison d58989f552 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/english_US.txt
3 years ago
Jonathan G Rennison 056606d2b6 Fix ApplyLookAheadItem assuming current_order == order in order list
Fixes trains with no orders failing to brake in advance of stations
3 years ago
Jonathan G Rennison 460d504269 Fix order index wrapping when depth exceeded in AdvanceOrderIndex 3 years ago
Jonathan G Rennison 18471da6e1 Fix collision checks for ship collision avoidance
This fixes cases where ships could be redirected in a circle
3 years ago
Jonathan G Rennison 93f2d5e056 Add GUI setting for shading trees on slopes in viewports
Deafult on, only for non-map mode
(Slope shading is always on in map mode)
3 years ago
Jonathan G Rennison 4ef363422a Add 32bpp blitter support for adjusting brightness of drawn sprites 3 years ago
Jonathan G Rennison 42e57995dd Improve visibility of slopes under trees in viewport map vegetation mode
Loosely based on tree slope brightness adjustment from
https://github.com/nielsmh/OpenTTD/tree/tree-slope-brightness
3 years ago
Jonathan G Rennison eabfae9d31 MacOS: Change bundle ID
See: #208
3 years ago
Michael Lutz af4d32357c Codechange: [Win32] Move common initialization and finalization to the video driver base class. 3 years ago
Michael Lutz 78b8fc3e4f Codechange: [Win32] Move GDI-specific variables and related functions into the GDI video driver class. 3 years ago
Michael Lutz 8b90d4abe0 Codechange: [Win32] Move GDI specific drawing code into the GDI video driver class. 3 years ago
Michael Lutz 59e0d9618b Codechange: [Win32] Split the video driver into a base class and a GDI backend class. 3 years ago
Patric Stout 78d96dad2a
Fix #6319: [Win32] don't use clipping; draw whole screen every frame (#8726)
When we clip the region that is only been redrawn, something
weird happens on Windows. When pushing 60 frames per second on a
60Hz monitor, it appears that the clipped region is often shown
of another frame, instead of the current.

Examples of this are:
- pause the game, move your mouse to the left, and at the right
  speed it totally disappears.
- fast aircrafts seem to be in several places at once, weirdly
  lagging behind.
- in title screen, moving your mouse gives you the idea it is
  jumping places, instead of smooth movements.

In the end, if you do nothing, everything is correct, so it is
eventually consistent. Just when we are firing many BitBlt in
a clipped region, the in-between is not.

What goes wrong exactly, I honestly do not know. On every frame
that we push to the DC is a mouse painted, but visually it
sometimes appears like it is not. Recording with external software
shows it really is there.
It is also not our eyes playing tricks on us, as the first example
makes it really clear the mouse pointer really is not painted.

And to be clear, with the mouse this is easiest reproduceable,
as high-speed objects are influences by this most. But this happens
for all movement that redraws small regions.

Either way, not using clipped regions resolves the issue completely,
and there appears to be little to no penalty (I failed to measure
any impact of drawing the full screen). So better have a good game
than fast code, I guess?
3 years ago
translators c136dd2b32 Update: Translations from eints
english (us): 78 changes by 2TallTyler
polish: 1 change by yazalo
3 years ago
Jonathan G Rennison 19b7ecf95a Merge branch 'master' into jgrpp 3 years ago
Charles Pigott 6af49b7885 Fix #8724: Got wrong DepotID/StationID for airports, causing crash 3 years ago
Charles Pigott 80fb1c74f0 Change: Make pathfinder account for maximum order speed, if set 3 years ago
milek7 b749d6f1cb Fix: Allow building with Allegro and without SDL on Linux 3 years ago
Jonathan G Rennison 4f74a83496 Add fast paths for clear/tree snow line checks in tile loop 3 years ago
Jonathan G Rennison 2e20da40ed Cache current value of snow line height 3 years ago
Jonathan G Rennison f595696e97 Add map bit to suppress water flooding checks
Set if all neighbour tiles are also water
This reduces the overhead of flood checks on large maps
3 years ago
Jonathan G Rennison 0df3e785cb Debug: Add console command to dump tile info 3 years ago
Jonathan G Rennison 1c1d272b57 Merge branch 'master' into jgrpp 3 years ago
translators e74069e4c2 Update: Translations from eints
estonian: 19 changes by siimsoni
french: 3 changes by glx22
3 years ago
Charles Pigott 8157af6d68 Fix #8276: Crash when a NewGRF object's size was not set 3 years ago
Charles Pigott 3af407340e Fix #8349: Close depot vehicle list windows when closing the depot window 3 years ago
Patric Stout 88959f5595
Codechange: [OSX] remove final bits of old debugging code (#8714) 3 years ago
Jonathan G Rennison c9ab460a03 Re-apply c0616750
Lost in merge: e95216b5
3 years ago
Jonathan G Rennison 2221805ddd Remove IncreaseRealtimeTick
Not needed as modal progress windows no longer use _realtime_tick
3 years ago
Jonathan G Rennison dfecdf3afb Merge branch 'master' into jgrpp
# Conflicts:
#	src/dock_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/terraform_gui.cpp
#	src/vehicle.cpp
#	src/video/allegro_v.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/dedicated_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
3 years ago
Charles Pigott 1d6a0c7b52 Fix: [YAPF] Road pathfinder did not account for length of tunnel/bridge in path cost
Copy calculations from the rail pathfinder
3 years ago
Charles Pigott c461999b2b Fix #8594: [NRT] Road pathfinder did not account for roadtype speed limits 3 years ago
Patric Stout e1b1608dc6
Fix ec1dd0bf: missing override causing compiler warnings (#8708) 3 years ago
Michael Lutz d16dc22fdf Codechange: Use C++-ism for zeroing. 3 years ago
Michael Lutz 5ca979b1e2 Fix: [OSX] Don't wait on the event loop for drawing. 3 years ago