Commit Graph
100 Commits
Author SHA1 Message Date
Jonathan G Rennisonandrubidium42 85918fc23e Fix: Water infrastructure total when changing owner of object on water 2024-05-29 20:11:43 +02:00
Jonathan G Rennisonandrubidium42 b2572c7ca8 Fix #12563: Race condition setting finish flag in WinHTTP 2024-05-23 19:31:45 +02:00
Jonathan G RennisonandGitHub 42fc32243d Fix #12681: Abstract filetype not set for network client join savegames (#12701) 2024-05-22 09:43:01 +01:00
Jonathan G Rennisonandrubidium42 8710e9b8c8 Fix #12608: SDL keycode to vkey mapping 2024-05-07 18:33:29 +02:00
Jonathan G Rennisonandrubidium42 9647fe1d05 Change: [Linkgraph] Improve distance scaling algorithm in demand scaler
Improve scaling at values other than 0% and 100%
Fix erratic scaling and increase effect size at large setting values
2024-05-01 22:40:17 +02:00
Jonathan G Rennisonandrubidium42 9b747a173d Fix #12509: Maintain timer sort invariants when changing period 2024-04-25 20:08:24 +02:00
Jonathan G Rennisonandrubidium42 11ec156b64 Codechange: Add a priority field to TimerGameTick::TPeriod
Use this as the primary sort key for TimerGameTick::TPeriod,
to avoid container sort order changes on timer period saveload.
See: #12509
2024-04-25 20:08:24 +02:00
Jonathan G RennisonandGitHub 83d99ec11d Fix #12506: Update station/industry nearby lists in BuildOilRig (#12511) 2024-04-17 22:38:11 +02:00
Jonathan G Rennisonandrubidium42 0b9029b69c Fix: Station/industry nearby list checks in CheckCaches 2024-04-17 20:33:49 +02:00
Jonathan G RennisonandGitHub 433484cda3 Fix #12388: Vehicle::CopyVehicleConfigAndStatistics not releasing unit number (#12389) 2024-03-27 21:20:27 +01:00
Jonathan G Rennisonandrubidium42 515303b8be Fix #12092: Incorrect x-axis in cargo payment graph window 2024-03-23 13:33:29 +01:00
Jonathan G Rennisonandrubidium42 2189607c34 Codechange: Reduce size of class WaterRegion
The tile patch array is 256 bytes and is not needed for the majority
of water regions, change it to be optional via std::unique_ptr
2024-03-21 21:14:30 +01:00
Jonathan G Rennisonandrubidium42 e42aec5a89 Fix #12305: Crash with large positive sprite x offset in engine preview window 2024-03-21 21:05:27 +01:00
Jonathan G RennisonandGitHub f180262aee Fix #12154: Incorrect calendar day lengths with minutes per year setting (#12158) 2024-03-02 21:45:30 +01:00
Jonathan G RennisonandGitHub 222832f1d4 Fix #12166: Crash when opening tram road stop build window (#12168) 2024-02-23 15:02:59 -05:00
Jonathan G Rennisonandrubidium42 ca146c8ddd Fix #12145: Incorrect date handling in date cheat in wallclock time-keeping mode 2024-02-21 18:43:05 +01:00
Jonathan G Rennisonandrubidium42 409c073eca Codefix: Off by one in TimerGameEconomy::ConvertDateToYMD wallclock mode 2024-02-21 18:40:02 +01:00
Jonathan G RennisonandGitHub c637d376d0 Fix cb588d8d: Ordering of command per tick limit and pause mode filtering (#12126)
The command per tick limit should be applied after the pause mode filter
2024-02-20 15:51:35 -05:00
Jonathan G RennisonandGitHub 5ab5f4ace7 Codefix df691eb3: Reloading GRFs destructed small UFO targeting road vehicle (#12072) 2024-02-12 00:51:18 +00:00
Jonathan G RennisonandGitHub bed3ef6f6b Cleanup: Incorrect savegame number for SLV_DEPOT_UNBUNCHING constant (#12045) 2024-02-09 17:50:29 +00:00
Jonathan G Rennisonandrubidium42 cb13ee90ef Fix: Second colour vehicle-type default liveries not being updated
When changing company default second colour
2024-02-04 07:14:39 +01:00
Jonathan G Rennisonandrubidium42 c0b8e58404 Codechange: Simplify SetBitIterator
Use FindFirstBit and KillFirstBit, allowing simpler iterator equality
Add simple test
2024-02-01 23:05:57 +01:00
Jonathan G RennisonandGitHub 1df7b21ee3 Fix #11889: ConstructWindow not called from SurveyResultTextfileWindow constructor (#11903) 2024-01-27 19:44:10 +00:00
Jonathan G RennisonandGitHub cbb24b5d71 Codechange: Split bit numbers from values in RailTypeFlags, RoadTypeFlags enums (#11877) 2024-01-24 22:24:34 +01:00
Jonathan G Rennisonandrubidium42 fd0528a9b4 Fix: Excessive switching of horizontal scale for FPS graph 60 Hz categories 2024-01-17 06:34:17 +01:00
Jonathan G Rennisonandrubidium42 17d47ba06f Fix 661bdae2: cargo_payment not cleared when aircraft loading cancelled 2024-01-17 06:33:54 +01:00
Jonathan G RennisonandGitHub 94e74a45c2 Fix: Viewport virt coords not updated when sprite font toggled (#11784) 2024-01-15 19:16:04 +01:00
Jonathan G RennisonandGitHub b3f31a6523 Fix #11696: Graphics set parameters missing from survey data (#11764) 2024-01-12 21:53:31 +00:00
Jonathan G RennisonandGitHub 479490d7e8 Codechange: Remove unnecessary vector for writing GRF parameter JSON (#11763) 2024-01-12 21:38:31 +00:00
Jonathan G Rennisonandrubidium42 1101b04371 Fix: Build button text when train purchase window using "Engines" filter 2024-01-12 16:34:39 +01:00
Jonathan G RennisonandGitHub 86b046cd26 Fix: Incorrect assertion in GetTileIndexFromLocalCoordinate (#11747) 2024-01-10 00:20:34 +00:00
Jonathan G Rennisonandrubidium42 09eefd6e95 Cleanup: Remove unused constant YAPF_SHIP_PATH_CACHE_LENGTH 2024-01-09 20:58:51 +01:00
Jonathan G Rennisonandrubidium42 c1b421c0c3 Fix: Clear one way state when removing road from road+tram tile 2024-01-09 20:57:53 +01:00
Jonathan G RennisonandGitHub 4b48d3b5fe Fix: String gender scan with SCC_INDUSTRY_NAME (#11697) 2024-01-07 15:48:47 -05:00
Jonathan G RennisonandPeter Nelson 5db9266f4b Change: Allow STRING/STRINGN to use all remaining parameters in game script mode 2024-01-04 17:45:33 +00:00
Jonathan G RennisonandPeter Nelson e2a79f0f32 Codechange: No longer advance parent offset in StringParameters parent mode
Add method to manually advance offset
2024-01-04 17:45:33 +00:00
Jonathan G RennisonandPatric Stout 0075364c89 Fix: curl_global_cleanup called before libcurl HTTP thread exited 2024-01-04 13:41:24 +01:00
Jonathan G RennisonandPatric Stout 51ef416b49 Fix: libcurl HTTP thread race at uninit preventing thread exit 2024-01-04 13:41:24 +01:00
Jonathan G RennisonandGitHub 48b6b1844a Change: Limit total script ops that can be consumed by a list valuate (#11670) 2024-01-02 19:02:12 +01:00
Jonathan G RennisonandGitHub 502a52edd5 Fix: Spurious cancellations of HTTP content downloads (#11668) 2024-01-01 19:13:29 +00:00
Jonathan G RennisonandGitHub 88324a253e Fix #11644: Off by one error/buffer over-read in StrMakeValid (#11645)
* Fix #11644: Off by one error in StrMakeValid UTF-8 decode overrun detection

* Fix #11644: Off by one error in StrMakeValid buffer last character

* Fix: Unnecessary string duplication at StrMakeValid call sites
2024-01-01 13:26:31 -05:00
Jonathan G RennisonandGitHub 3e2060f155 Fix #11337: Station blocked/pylon/wire bits with CBID_STATION_TILE_LAYOUT (#11656) 2023-12-31 18:31:01 -05:00
Jonathan G RennisonandGitHub 3b18877b87 Fix #11629: AirportGetNearestTown for rotated airports (#11631)
Add rotation parameter to AirportGetNearestTown
Add wrapper for existing stations
Remove unnecessary iterator cloning
2023-12-28 21:43:05 +00:00
Jonathan G Rennisonandrubidium42 2b914c7a2f Fix: Memory leak in WindowDescTestsFixture 2023-12-26 23:48:59 +01:00
Jonathan G RennisonandGitHub 97b86b7147 Codechange: Use MakeParameters with GetNextParameter in FormatString (#11583)
Instead of StringParameters subspan, to avoid GSs being able to
cause subspan boundary assertion failures
2023-12-14 10:41:31 -05:00
Jonathan G RennisonandGitHub 2cbe91c312 Fix #11551, aab580e0a: Link graph job results were incorrectly applied (#11558)
Edge flows were incorrectly restricted because the restricted
instead of unrestricted last update date was checked

See also: #10314
2023-12-07 18:38:43 +00:00
Jonathan G Rennisonandrubidium42 8437b20fed Fix: Deleting towns did not check for waypoints referencing the town 2023-11-29 00:27:16 +01:00
Jonathan G RennisonandGitHub c5a292c0df Fix #11493: Incorrect flow values in LinkGraphJob::EdgeAnnotation (#11494) 2023-11-25 20:57:20 +00:00
Jonathan G RennisonandGitHub 9822fa6584 Fix: Trivial autoreplace of mixed cargo articulated engines (#11253)
Do not fail autoreplace/autorenew of mixed cargo articulated engines
due to an inability to refit to mixed cargoes, when no refit is
required because the target engine already has a suitable set of cargoes.
Notably, this allows autorenew (autoreplace to same engine type)
to succeed.
2023-11-20 14:16:28 +01:00
Jonathan G RennisonandGitHub 1de1af08b9 Codechange: Replace AllocatedStringParameters with ArrayStringParameters (#11452)
All uses of AllocatedStringParameters are with a compile-time fixed
constant.
Use of a dynamically allocated buffer on the heap is unnecessary and
increases overhead, particularly due to frequent use as a temporary.
2023-11-09 19:43:47 +00:00
Jonathan G Rennisonandrubidium42 4df2640f87 Fix: Tile slope missing from road stops varact2 variable 0x42 2023-10-19 20:05:36 +02:00
Jonathan G RennisonandGitHub a1c6923c63 Fix: Assertion in sprite aligner window (#11371)
When clicking sprite number after re-opening window having previously used sprite picker tool
2023-10-17 16:25:48 -04:00
Jonathan G RennisonandPeterN 3afb732c37 Fix #11307: Incorrect GroupStatistics after selling leading wagon
When this results in a countable consist
2023-09-17 18:42:37 +01:00
Jonathan G Rennisonandrubidium42 42170e6c2b Codechange: Rename RoadType parameter of MakeRoadDepot
See: #9642
2023-09-15 18:21:12 +02:00
Jonathan G RennisonandGitHub 0316940fe8 Fix: Inaccurate waiting cargo total in station window when using cargodist (#11213)
For stations with many flows and/or small cargo packets,
due to accumulated inaccuracies in DivideApprox.

The displayed total should match GoodsEntry::TotalCount().
2023-09-06 21:36:26 +02:00
Jonathan G RennisonandGitHub 2cbd76593a Fix #11215: Assert in NewGRF parameters window (manual parameter mode) (#11217) 2023-08-21 12:42:33 +02:00
Jonathan G RennisonandGitHub 8df4aa7979 Fix: Road stops should not draw a ground sprite of 0 (#11214) 2023-08-20 15:46:19 -04:00
Jonathan G RennisonandGitHub 9061fef59c Fix #11203: [ICU] Glyph to char mapping with multiple runs (#11204) 2023-08-16 19:17:02 +00:00
Jonathan G Rennisonandrubidium42 6a048bc168 Fix #11164: Duplicate town names when using the many random towns function 2023-08-02 20:07:59 +02:00
Jonathan G RennisonandGitHub f31a25cd59 Change: Do not allow mixing road/tram types in powered road type list (#11148)
Road/tram property 0F
2023-07-19 19:51:21 +02:00
Jonathan G Rennisonandrubidium42 864d2352c2 Fix: Integer overflow in LinkGraphOverlay::ShowTooltip for long links
In particular when fully zoomed in
This could result in tooltips not being shown at all, or being shown
when not appropriate
2023-07-16 10:10:04 +02:00
Jonathan G RennisonandGitHub 3ac663e619 Fix: Build road/tram stop windows did not set WindowDesc::ini_key (#11126)
Saved default window sizes were not persisted in the configuration file
2023-07-12 22:07:31 +02:00
Jonathan G RennisonandGitHub 55c07eed59 Change: Add separate setting for server sent commands per frame limit (#11023)
Set a higher default value for this setting.
Use the higher of this and existing commands per frame limit
setting for server-originating commands, e.g. GS.

This is to support the GSAsyncMode class.
This also avoids undue throttling when more than one
script is in operation (e.g. AIs).
2023-06-27 12:32:45 +01:00
Jonathan G RennisonandPeterN 4f6d75f97d Fix #11016: Defer deletion of client and server game socket handlers
This fixes various use after free scenarios in error handling paths
2023-06-25 12:02:32 +01:00
Jonathan G RennisonandPeterN 19ae88fb63 Fix: Error logging in game and admin server HandlePacket
Don't invent a packet type in the log message if we can't/don't
read a packet type at all.
Fix packet type not being logged when appropriate.
2023-06-25 12:02:32 +01:00
Jonathan G RennisonandGitHub a6b625eea3 Fix #10993: Crash log when font caches not initialised (#11024)
See also: #10836
2023-06-17 17:56:27 +01:00
Jonathan G RennisonandGitHub ee8b03e8da Fix: Crash when failing to load a game into a dedicated server at startup (#11021)
Using the -g switch
2023-06-16 19:41:26 +01:00
Jonathan G RennisonandGitHub 864d3c9c16 Fix: CMD_CHANGE_SETTING did not reject SF_NO_NETWORK_SYNC settings (#11009) 2023-06-14 19:44:10 +02:00
Jonathan G RennisonandPeterN ec7f9f63f6 Feature: Add coverage button to waypoint window 2023-06-04 16:54:48 +01:00
Jonathan G RennisonandPeterN d7bf6b2c07 Feature: Highlight waypoint tiles when adjacent or distant joining 2023-06-04 16:54:48 +01:00
Jonathan G RennisonandPeterN 84b53213af Codechange: Refactor viewport catchment overlay change handling 2023-06-04 16:54:48 +01:00
Jonathan G RennisonandGitHub 3effb8931c Add: [Script] GSAsyncMode to set async mode of gamescript commands (#10913)
In asynchronous mode, don't wait for result of executed command,
just fire-and-forget, and return estimated cost/result
2023-06-04 11:15:35 +02:00
Jonathan G RennisonandGitHub a2c0e6aa18 Fix #10831: Level crossing parts left barred after crossing tile removal (#10874) 2023-06-03 23:04:24 +02:00
Jonathan G Rennisonandrubidium42 cdb3a6288b Codechange: Remove unused CapacitiesMap typedef from struct Vehicle 2023-06-01 22:48:47 +02:00
Jonathan G Rennisonandrubidium42 ba11467c02 Fix: Rail waypoint selection window not closed
When rail toolbar or rail waypoint build windows closed
2023-05-26 08:41:13 +02:00
Jonathan G RennisonandGitHub 8d501f2db1 Fix #10741: Rail platforms left partially reserved after train crash (#10751) 2023-05-04 21:45:13 +01:00
Jonathan G RennisonandGitHub 37392935dd Fix #10707: Incorrect type of days_in_transit in CargoPacket constructor (#10715) 2023-04-24 18:55:16 +00:00
Jonathan G RennisonandPeterN a967cc4de2 Fix: Violation of strict weak ordering in engine value/running cost sorter 2023-04-23 12:52:12 +01:00
Jonathan G RennisonandPeterN 684c7bbc93 Fix: Violation of strict weak ordering in TownRatingSorter
If two unrated town names compare equal in TownNameSorter
2023-04-23 12:52:12 +01:00
Jonathan G Rennisonandrubidium42 bb988f940e Fix #10638: Incorrect water infra total when building canal over object
In the case where the object is on an unowned canal tile and
the new canal tile is owned
2023-04-13 21:34:36 +02:00
Jonathan G Rennisonandrubidium42 e17420777a Fix #10637: Incorrect water infra total when building multi-tile object
Wrong tile used in ownership checks
2023-04-12 16:50:45 +02:00
Jonathan G RennisonandLoïc Guilloux 43cea852a6 Fix 41b414b: Validate RAW_STRING parameter values in game_script mode 2023-04-08 00:14:12 +02:00
Jonathan G RennisonandGitHub c74dfe393f Fix #10556: Duplication of road infrastructure count updates (#10557)
When building a road stop
2023-03-08 18:38:19 +00:00
Jonathan G RennisonandGitHub 87f4d37de3 Fix #10522: Link graph line tooltip test for vertical lines (#10524) 2023-03-03 17:37:17 -05:00
Jonathan G Rennisonandrubidium42 0e4b716815 Fix: O(N^2) cost of Station::RecomputeCatchmentForAll
Station::RemoveFromAllNearbyLists does not need to be called when
all station nearby lists have been cleared and are being regenerated.
2023-03-01 16:54:57 +01:00
Jonathan G RennisonandGitHub 5d0ad5625b Fix : [NewGRF] Object and road stop ignore property handlers (#10525)
* Fix: IgnoreObjectProperty did not handle object property 0x18

* Fix: IgnoreRoadStopProperty did not handle properties 0x0E - 0x12, 0x15
2023-03-01 01:19:39 +01:00
Jonathan G Rennisonandrubidium42 4c1406a4b5 Add: NewGRF road stops 2023-02-26 21:28:30 +01:00
Jonathan G RennisonandMichael Lutz 9c915f05ec Fix: Water infrastructure accounting when building docks 2023-01-29 23:15:53 +01:00
Jonathan G RennisonandMichael Lutz b82bcac3cd Fix #10419: Water infrastructure accounting when building ship depots 2023-01-29 23:15:53 +01:00
Jonathan G Rennisonandrubidium42 10e76b2788 Fix #10032: Capacities of articulated vehicles in build window
See also: #9954
2023-01-14 18:52:01 +01:00
Jonathan G Rennisonandrubidium42 14c1266bbc Fix: Wrong type cast for selected AI/GS script info in AIListWindow
This resulted in technically undefined behaviour when listing GSs
2022-12-22 21:26:27 +01:00
Jonathan G Rennisonandrubidium42 d4c530904c Fix #10274: Use after free when rescanning scripts with GS selected 2022-12-22 21:23:48 +01:00
Jonathan G RennisonandMichael Lutz c7d7658004 Fix #10214: CMD_CREATE_LEAGUE_TABLE did not set CMD_STR_CTRL 2022-12-16 21:07:36 +01:00
Jonathan G RennisonandMichael Lutz 1a05e95945 Fix #10214: League and graph buttons in toolbar not having a default action 2022-12-16 21:07:36 +01:00
Jonathan G RennisonandMichael Lutz e0cb31ff07 Fix #10214: Header and footer missing from league table saveload 2022-12-16 21:07:36 +01:00
Jonathan G RennisonandGitHub 7c3c92f8b8 Fix #10155: SyncCompanySettings sending old instead of new setting values (#10158) 2022-11-12 17:24:31 +00:00
Jonathan G RennisonandMichael Lutz 64b437fa89 Fix: Data race with mixer thread performance measurements 2022-11-11 23:48:24 +01:00
Jonathan G RennisonandMichael Lutz 0fae0599b7 Fix: Data race on effect volume setting with mixer thread 2022-11-11 23:48:24 +01:00
Jonathan G RennisonandMichael Lutz a962d7476b Fix: Data races on MixerChannel active states 2022-11-11 23:48:24 +01:00
Jonathan G RennisonandGitHub e931f3061f Fix: Dereference of past-the-end iterator in linkgraph overlay tooltip (#10145) 2022-11-07 00:16:38 +01:00