Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ldpl committed Nov 8, 2021
2 parents 3ec7adc + 20a6ffe commit 760b4a1
Show file tree
Hide file tree
Showing 54 changed files with 358 additions and 271 deletions.
169 changes: 16 additions & 153 deletions .changelog
Original file line number Diff line number Diff line change
@@ -1,156 +1,19 @@
12.0 (2021-10-17)
12.1 (2021-11-08)
------------------------------------------------------------------------
Add: [Network] Keep the refresh button in lowered state while refreshing (#9600)
Add: Console command to list search directories for various things (#9583)
Fix: Try all possible reverse directions when a ship reaches a dead end (#9610)
Fix: Incorrect Romanian own name (#9598)
Fix #9591: Update station docking tiles upon placing a water object on a docking tile (#9594)
Fix #9548: [Squirrel] Crash during engine cleanup after reaching memory limit on realloc (#9592)
Fix #9588: [Squirrel] Reaching memory limit during script registration could prevent further script detections (#9589)
Fix: Make ships more likely to find their destination at the cost of slightly worse paths (#9576)
Change: Reverse ship when leaving docks if a better path exists (#9610)
Change: Allow all tiles around docks to be docking tiles (#9578)


12.0-RC1 (2021-09-25)
------------------------------------------------------------------------
Feature: Display icon/text whether vehicle is lost in vehicle (list) window (#9543)
Feature: [MacOS] Add selected toolbar buttons to MacBook Pro Touch Bar (#9511)
Feature: Button to open order window from vehicle shared orders window (#9325)
Feature: Ctrl-Clicking shared order vehicle list opens order window (#9325)
Feature: Multiple rotating views on title screen (#8980)
Feature: Hide block signals in GUI by default (#8688)
Add: [Script] Allow GameScripts to build neutral objects (#9568)
Add: [Network] Allow sending chat messages via admin port (#9563)
Add: [AI/GS] Missing water related functions and objects (#8390)
Fix: Industry funding window did not update when changing funding method (#9572)
Fix #9562: [NewGRF] Handle case of invalid Action2 with zero results (#9564)
Fix: Incorrect error messages when placing water in scenario editor (#9560)
Fix #9484: Update locale currencies settings config map (#9559)
Fix: Prevent train reversing when entirely inside a train depot (#9557)
Fix: [Network] Add back 'Spectate' option to company toolbar menu (#9556)
Fix #9463: [Win32] Work around XAudio2 crashes (#9549)
Fix #8603: Don't give focus to text filter when opening Object GUI (#9547)
Fix #9241: Grove and forest tree brushes did not also create rainforest terrain (#9542)
Fix: [Network] Several crashes in our network code (#9534, #9456)
Fix #9527: Crash when trying to place multi-tile objects at map edge (#9529)
Fix: [Network] SendCmdNames only sent one name per packet (#9528)
Fix #9407: Desync when founding a town nearby a station (#9526)
Fix #9521: Don't load at just removed docks that were part of a multi-dock station (#9524)
Fix: Ships always tried to avoid docking tiles when pathfinding (even if nothing was on them) (#9522)
Fix: [Network] Convert server_advertise to server_game_type in config file (#9515)
Fix #9490: [Network] A full server couldn't be queried (#9508)
Fix: [Network] Don't show GameScript " (v0)" for old servers (#9507)
Fix: [Network] Show query errors in the server listing instead of error popup (#9506)
Fix: [Network] Crash when last-joined server was no longer available (#9503)
Fix #9501: [Network] Crash when more than one game-info query was pending (#9502)
Fix: Wrong error message when building canals over ship depots / locks (#9410)
Fix: Reduce cost of building canals over objects on sea (#9410)
Change: [Linkgraph] Delete links only served by vehicles stopped in depot (#9499)


12.0-beta2 (2021-08-19)
------------------------------------------------------------------------
Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo (#9457)
Fix: Wrong town window refreshed when building an airport with noise levels enabled (#9497)
Fix: Improve wording of network-related messages (#9494, #9495, #9500)
Fix: [Network] Report reuse of invite-code (#9487)
Fix: [Network] Connecting with the same client name thrice hangs the server (#9485)


12.0-beta1 (2021-08-15)
------------------------------------------------------------------------
Feature: [Network] Remove lobby window; pressing "Join Game" now immediately joins a server (#9467)
Feature: [Network] Synchronize server name to clients and display in Online Players window (#9472)
Feature: [Network] Mention you are a spectator in the status bar (#9471)
Feature: [Network] No longer require port-forwarding to host a server (#9443, #9447)
Feature: [Network] Allow setting your server visibility to "invite-only" (#9434)
Feature: [Network] Join servers based on their invite code (#9432)
Feature: Raise the maximum NewGRF limit to 255 (#9428)
Feature: Persistent rotation of numbered auto/netsave after restart (#9395, #9397)
Feature: [NewGRF] Maximum curve speed modifier for rail vehicles (#9346)
Feature: Move sensitive information to secrets.cfg and private information to private.cfg (#9298)
Feature: Signed Windows builds (#9294)
Feature: [NewGRF] Define refittability of default vehicles using cargo classes (#9148)
Feature: Configurable subsidy duration, up to 5000 years (#9081)
Feature: [Network] Rework in-game Online Players window (#9067)
Feature: [Network] Show previous chat history when the chat message box is open (#9025)
Feature: Button to reset game settings to their default values (#8958)
Feature: Press Ctrl to build diagonal rivers in Scenario Editor (#8880)
Feature: Set wagon replacement per group when using autoreplace (#7441)
Add: [Network] Open Online Players window on starting/joining a server (#9479)
Add: [Script] Basic information about loaded NewGRFs for scripts (#9464)
Add: [AI] Get the number of vehicles in a given group (#9462)
Add: [Network] Inform network clients what game-script a server is running (#9441)
Add: Hindi translation (#9086)
Add: [Network] Ensure players fill in a name instead of defaulting to "Player" (#9080)
Change: Allow pause/unpause console command in single player (#9342)
Change: Make savegame format self-descriptive and consistent across all objects (#9322, #9335, #9338, #9339)
Change: By default, make "unload all" leave stations empty (#9301)
Change: Reworked the debug levels and messages for network logs (#9230, #9251)
Change: [Emscripten] Set default scrolling mode to non-pointer-locking (#9191)
Change: Use neutral pronouns for various strings (#9189, #9203, #9228)
Change: Make the town directory horizontally resizable (#9157)
Change: Allow non-ASCII currency separators (#9121)
Change: [NewGRF] Display a pop-up window for Errors with severity ERROR (#9119)
Change: Treat languages as finished, if translations are 75% completed (#9019, #9086)
Change: Disable NewGRF window apply button if no change was made (#8934)
Fix: [Script] Crash when iterating lists of which the key is larger than 32bit (#9465)
Fix: [Network] Desync due to use of unstable sort when distributing cargo production (#9460)
Fix #9440: Negative cargo payments not being handled correctly (#9455)
Fix: [Network] Crash when joining a server again after a TCP disconnect (#9453)
Fix: Don't enable rename button for network clients in build vehicle window (#9452)
Fix: Money could underflow and wrap around (#9451)
Fix: Parse the console settings the same way as config settings (#9438)
Fix: Ensure no more than the allowed number of NewGRFs are loaded from the configuration (#9430)
Fix: [NewGRF] Overflow when determining cargo mask for string code 9A 1E (#9423)
Fix: Integers for scripts are 64bit, but saved as 32bit (#9415)
Fix #9392: [Script] Return a valid value with GetBuildWithRefitCapacity even when AIs are maxed out in vehicles (#9393)
Fix #8169: Crash when autoreplacing vehicle with no orders (#9387)
Fix: Wrong cargo line position in IndustryCargo window (#9383)
Fix: Race-condition during startup of NewGRF scan (#9382)
Fix: Don't propagate Shift/Ctrl state till next game-tick (#9381)
Fix: Prevent palette updates during copying to the video driver (#9379)
Fix: [Network] Determining GetNetworkRevisionString could overflow and underflow its buffer (#9372)
Fix #9358: Don't skip empty files in tar archives (#9367)
Fix: For old savegames, station bus/truck station cache was not updated (#9366)
Fix #9353: [Script] Garbage collecting on priority queues could crash the game (#9356)
Fix: Respect the autosave_on_exit setting for Null video driver (#9343)
Fix: Compatible NewGRFs in crash-log reported wrong MD5 hash (#9340)
Fix: [Script] Ensure the saved script strings are properly validated and terminated (#9336)
Fix #9316: Town bridge length limit check incorrect above 250k inhabitants (#9318)
Fix: Limit heightmap sizes to 8192x8192 (#9307)
Fix #9281: Money generating exploit when buying out a company (#9300)
Fix: Part of a tile might not be redrawn when terraforming (#9296)
Fix: [OpenGL] Increase timeout when waiting for the GPU to be done with the drawing buffer (#9282)
Fix: Vehicles sent in the wrong direction if there is no path to the destination (#9280)
Fix #9264: Do not attach temporary wagons to free wagon chains when autoreplacing (#9278)
Fix #9267: [Script] Crash during garbage collection (#9275)
Fix: Encountering two-way red signals could prune unrelated Pathfinder branches (#9271)
Fix #9255: [Network] Crash when hostname is not found (#9259)
Fix #9256: Invalid read after free when replacing train chains (#9258)
Fix: [Emscripten] Force secure WebSockets over HTTPS (#9248)
Fix #9242: Tree tick handler did not scale by map size (#9246)
Fix: [Network] Mark server as offline when no longer reachable (#9244)
Fix: [Network] Don't rebuild the host-list during iterating the list (#9240)
Fix: [Network] Don't mark the last-joined server as a manually added server (#9239)
Fix: [Network] Clients leaving because of broken connections was not broadcasted (#9238)
Fix: [Network] Check on CIDR for netmask check considered everything valid (#9235)
Fix: Creating screenshots on dedicated servers failed (#9232)
Fix: Leaking file descriptors for downloaded content (#9229)
Fix: Spelling of several town names (#9222)
Fix #9209: Game hangs when resizing highscore/news window if the screen is too small (#9210)
Fix: [Network] Optimize creating network connections for clients using IPv4 and IPv6 (#9199)
Fix #9186: Fix incorrect bounding box height causing station sprite glitch (#9187)
Fix: Truncating strings in settings could leave invalid UTF-8 characters (#9121)
Fix: Many issues related to window scaling (#9087, #9219)
Fix: Invalidate cached vehicle colourmaps when changing liveries setting (#9006)
Fix #8981: Don't attempt to re-reserve path if already entering/entered depot (#9000)
Fix: Missing 'Town names:' colon in map gen GUI (#8986)
Fix: Sorting and filtering industries that produce/accept many cargoes (#8468)
Remove: [Network] COMPANY_INFO packets (#9475)
Remove: [Network] A server can no longer set a limit to the amount of spectators allowed (#9466)
Remove: Arbitrary limit on number of statically loaded NewGRFs (#9431)
Remove: [Network] Language and map-name from server information (#9070)
Feature: Button to toggle showing advanced signal types (#9617)
Change: Don't show screenshot GUI in screenshots (#9674)
Change: Suppress panning in intro game, while user is interacting with the GUI (#9645)
Change: Draw rotor in cursor when dragging helicopters in depots (#9612)
Fix: Invalid memory access when loading a currency NewGRF (#9675)
Fix #9579: Object and HQ construction is Construction cost, not Property Maintenance (#9673)
Fix #9669: Ships exiting a blocked depot/lock could exit in the wrong direction (#9672)
Fix: Every 16th client never reconnects after server restart (#9666)
Fix #9643: Screenshots were always written as BMP files (#9644)
Fix #9630: Intro game could zoom in/out more than allowed by settings (#9633)
Fix #9626: Incorrect loading of script saved data (#9629)
Fix: Emergency crash save had the wrong NewGRF list saved in it (#9627)
Fix #9595: Always use plural forms of cargo for subsidy strings (#9619)
Fix #9614: Refresh rate dropdown was still active when vsync was enabled (#9618)
Fix: Don't use 'server address' string in server list when displaying an invite code (#9615)


2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
libsdl: libsdl1.2-dev
- compiler: gcc
cxxcompiler: g++
extra-cmake-parameters: -DOPTION_DEDICATED=ON
extra-cmake-parameters: -DOPTION_DEDICATED=ON -DCMAKE_CXX_FLAGS_INIT="-DRANDOM_DEBUG"

runs-on: ubuntu-20.04
env:
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/preview_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
container:
# If you change this version, change the number in the cache step too.
image: emscripten/emsdk:2.0.31
# uid=1001(runner) gid=121(docker)
options: -u 1001:121

steps:
- name: Update deployment status to in progress
Expand Down Expand Up @@ -89,18 +87,15 @@ jobs:
- name: Publish preview
run: |
# setuptools is missing in this Docker image, which breaks installing
# awscli. So we need to do this in two steps to recover sanity.
pip3 install setuptools
pip3 install awscli
~/.local/bin/aws s3 cp --only-show-errors build/openttd.data s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
~/.local/bin/aws s3 cp --only-show-errors build/openttd.html s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
~/.local/bin/aws s3 cp --only-show-errors build/openttd.js s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
~/.local/bin/aws s3 cp --only-show-errors build/openttd.wasm s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
aws s3 cp --only-show-errors build/openttd.data s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
aws s3 cp --only-show-errors build/openttd.html s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
aws s3 cp --only-show-errors build/openttd.js s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
aws s3 cp --only-show-errors build/openttd.wasm s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
# Invalidate the cache of the CloudFront distribution
~/.local/bin/aws cloudfront create-invalidation --distribution-id ${{ secrets.PREVIEW_CF_DISTRIBUTION_ID }} --paths "/${{ github.event.client_payload.folder }}/*"
aws cloudfront create-invalidation --distribution-id ${{ secrets.PREVIEW_CF_DISTRIBUTION_ID }} --paths "/${{ github.event.client_payload.folder }}/*"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .ottdrev
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.0 20211017 0 33201896bfeae43ea5b0e381b7f834aa6b6287d2 1 1 2021
12.1 20211108 0 17dfc6e28aac5ad2290e849b03893a416be97b03 1 1 2021
2 changes: 1 addition & 1 deletion .release_date
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021-10-17 09:31 UTC
2021-11-08 20:00 UTC
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.0
12.1
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(NOT BINARY_NAME)
endif()

project(${BINARY_NAME}
VERSION 12.0
VERSION 12.1
)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
Expand Down
19 changes: 19 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
12.1 (2021-11-08)
------------------------------------------------------------------------
Feature: Button to toggle showing advanced signal types (#9617)
Change: Don't show screenshot GUI in screenshots (#9674)
Change: Suppress panning in intro game, while user is interacting with the GUI (#9645)
Change: Draw rotor in cursor when dragging helicopters in depots (#9612)
Fix: Invalid memory access when loading a currency NewGRF (#9675)
Fix #9579: Object and HQ construction is Construction cost, not Property Maintenance (#9673)
Fix #9669: Ships exiting a blocked depot/lock could exit in the wrong direction (#9672)
Fix: Every 16th client never reconnects after server restart (#9666)
Fix #9643: Screenshots were always written as BMP files (#9644)
Fix #9630: Intro game could zoom in/out more than allowed by settings (#9633)
Fix #9626: Incorrect loading of script saved data (#9629)
Fix: Emergency crash save had the wrong NewGRF list saved in it (#9627)
Fix #9595: Always use plural forms of cargo for subsidy strings (#9619)
Fix #9614: Refresh rate dropdown was still active when vsync was enabled (#9618)
Fix: Don't use 'server address' string in server list when displaying an invite code (#9615)


12.0 (2021-10-17)
------------------------------------------------------------------------
Add: [Network] Keep the refresh button in lowered state while refreshing (#9600)
Expand Down
2 changes: 1 addition & 1 deletion regression/regression/result.txt
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetQuarterlyCompanyValue(): -1
Quarter: 0
GetQuarterlyIncome(): 0
GetQuarterlyExpenses(): -210
GetQuarterlyExpenses(): 0
GetQuarterlyCargoDelivered(): 0
GetQuarterlyPerformanceRating(): -1
GetQuarterlyCompanyValue(): 1
Expand Down
18 changes: 18 additions & 0 deletions src/intro_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ struct SelectGameWindow : public Window {
size_t cur_viewport_command_index;
/** Time spent (milliseconds) on current viewport command. */
uint cur_viewport_command_time;
uint mouse_idle_time;
Point mouse_idle_pos;

/**
* Find and parse all viewport command signs.
Expand Down Expand Up @@ -183,6 +185,8 @@ struct SelectGameWindow : public Window {

this->cur_viewport_command_index = (size_t)-1;
this->cur_viewport_command_time = 0;
this->mouse_idle_time = 0;
this->mouse_idle_pos = _cursor.pos;
}

void OnRealtimeTick(uint delta_ms) override
Expand All @@ -191,6 +195,17 @@ struct SelectGameWindow : public Window {

if (intro_viewport_commands.empty()) return;

bool suppress_panning = true;
if (this->mouse_idle_pos.x != _cursor.pos.x || this->mouse_idle_pos.y != _cursor.pos.y) {
this->mouse_idle_pos = _cursor.pos;
this->mouse_idle_time = 2000;
} else if (this->mouse_idle_time > delta_ms) {
this->mouse_idle_time -= delta_ms;
} else {
this->mouse_idle_time = 0;
suppress_panning = false;
}

/* Determine whether to move to the next command or stay at current. */
bool changed_command = false;
if (this->cur_viewport_command_index >= intro_viewport_commands.size()) {
Expand All @@ -214,6 +229,9 @@ struct SelectGameWindow : public Window {
/* Early exit if the current command hasn't elapsed and isn't animated. */
if (!changed_command && !vc.pan_to_next && vc.vehicle == INVALID_VEHICLE) return;

/* Suppress panning commands, while user interacts with GUIs. */
if (!changed_command && suppress_panning) return;

/* Reset the zoom level. */
if (changed_command) FixTitleGameZoom(vc.zoom_adjust);

Expand Down
Loading

0 comments on commit 760b4a1

Please sign in to comment.