Commit Graph

36 Commits

Author SHA1 Message Date
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 2024-01-22 09:04:34 -05:00
Jonathan G Rennison 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 Rennison c5a292c0df
Fix #11493: Incorrect flow values in LinkGraphJob::EdgeAnnotation (#11494) 2023-11-25 20:57:20 +00:00
Tyler Trahan 77173a6a10 Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes 2023-09-10 08:40:25 -04:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Tyler Trahan 646a7e625b
Change: Use seconds for Linkgraph update settings (#10610) 2023-04-14 22:49:12 +02:00
Michael Lutz aab580e0ac Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph. 2023-02-26 21:41:24 +01:00
Michael Lutz 4d3da0cf14 Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraphJob. 2023-02-26 21:41:24 +01:00
Michael Lutz 7352f812e6 Codechange: [Linkgraph] Only store present link graph edges and not all possible edges. 2023-02-26 21:41:24 +01:00
Michael Lutz 8f851ead70 Codechange: [Linkgraph] Split annotation for demand between nodes from the edge annotations. 2023-02-26 21:41:24 +01:00
Michael Lutz fe27db3dfd Codechange: [Linkgraph] Store edges in each node and not in a global matrix. 2023-02-26 21:41:24 +01:00
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 2021-05-15 10:16:48 +02:00
Rubidium bb9121dbd4 Fix: comparison of narrow type to wide type in loop (potential for infinite loops) 2021-05-15 10:16:10 +02:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Jonathan G Rennison 94d629d79b
Change: [Linkgraph] Allow job threads to be aborted early when clearing schedule (#8416)
When link graph jobs are cleared due to abandoning the game or exiting,
flag the job as aborted.
The link graph job running in a separate thread checks the aborted flag
periodically and terminates processing early if set.
This reduces the delay at game abandon or exit if a long-running job
would otherwise still be running.
2020-12-25 00:36:36 +01:00
Jonathan G Rennison 0c5dc5d41e Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470)
Check if the job is still running two date fract ticks before it is due
to join, and if so pause the game until its done.
When loading a game, check if the game would block immediately due to
a job which is scheduled to be joined within two date fract ticks,
and if so pause the game until its done.
This avoids the main thread being blocked on a thread join, which appears
to the user as if the game is unresponsive, as the UI does not repaint
and cannot be interacted with.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
2020-12-22 15:17:57 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Michael Lutz 05bc2ed7cb Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
2019-04-06 11:27:39 +02:00
Henry Wilson bad2c2154b Codechange: Replaced SmallVector::Resize() with std::vector::resize() 2019-03-26 20:15:57 +00:00
frosch 31f046bd9b (svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR) 2016-10-30 17:29:33 +00:00
frosch 780e595933 (svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects. 2015-03-07 18:27:01 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
fonsinchen cc77d40336 (svn r26347) -Fix [FS#5898]: Make sure link graph jobs can delete themselves after SLA_NULL. 2014-02-16 18:42:59 +00:00
fonsinchen 2945e76269 (svn r26341) -Fix [FS#5902]: Reroute cargo when automatic distribution is switched off. 2014-02-16 11:17:17 +00:00
fonsinchen 91407b924e (svn r26286) -Fix: Thoroughly erase dead flows. 2014-01-29 19:55:29 +00:00
fonsinchen 962d6d7e48 (svn r25963) -Fix [FS#5758]: Mixtures of old and new flows could create cycles. 2013-11-10 15:18:49 +00:00
frosch 2a16d139a2 (svn r25934) -Fix [FS#5793]: Do not access items from other pools in pool item destructors during pool cleaning. 2013-10-31 20:31:10 +00:00
fonsinchen 6524849386 (svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore. 2013-10-22 16:13:54 +00:00
fonsinchen b3b460cae2 (svn r25885) -Codechange: Keep paths sorted so that the ones with flow == 0 are in the back and don't have to be iterated over so often. 2013-10-19 17:15:19 +00:00
fonsinchen ca1c792144 (svn r25637) -Fix: don't keep minimal routing information if automatic distribution has been disabled 2013-07-30 19:03:56 +00:00
fonsinchen f0119308f6 (svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary 2013-06-17 20:38:11 +00:00
fonsinchen d9985c3331 (svn r25422) -Fix: properly initialize base capacity for paths 2013-06-17 20:37:07 +00:00
fonsinchen 22f56ffdd7 (svn r25353) -Add: link graph job implementation 2013-06-09 12:57:41 +00:00