summaryrefslogtreecommitdiff
path: root/src/misc_cmd.cpp
AgeCommit message (Collapse)Author
2020-12-28Fix #8453: [Script] Don't truncate loan variation to 32bitglx22
2020-12-22Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470)Jonathan G Rennison
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.
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-04-29Codechange: Remove PauseModeByteCharles Pigott
2019-04-29Codechange: Remove Company/OwnerByte typesCharles Pigott
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries. Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF. A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used. With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box. All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-09-21(svn r25788) -Feature: [Script] Game Scripts can now charge fees and give ↵zuu
money to companies
2013-09-21(svn r25787) -Doc: Doxygen comment was wrongzuu
2013-01-08(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by ↵planetmaker
Eagle_rainbow)
2012-09-23(svn r24552) -Fix (r24537): Unpause do no longer continue scriptszuu
2011-12-19(svn r23618) -Add: ScriptGame::Pause, ScriptGame::Unpause, and ↵truebrain
ScriptGame::GetLandscape (GameScript only)
2011-07-02(svn r22621) -Fix: When asking the user to confirm an unsafe unpausing, ↵frosch
there is no need to execute a command if 'no' is choosed. This also prevents crashing when clicking unpause while the confirm window is shown.
2011-02-08(svn r22028) -Cleanup: remove traces of a debugging "feature" that got ↵rubidium
disabled a long time ago
2011-02-07(svn r22021) -Fix (r22019): ofcourse make doesn't notice files are gone, so ↵rubidium
it doesn't recompile everything that needs to be recompiled...
2010-08-01(svn r20283) -Codechange: Unify start of doygen comments.frosch
2010-06-05(svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into ↵frosch
DEBUG() output. It was triggered on exceptions, especially when aborting world generation.
2010-06-05(svn r19930) -Codechange: Deduplicate magic command parameter casts. (rubidium)frosch
2010-05-31(svn r19914) -Codechange: Wrap a helper class around temporary assignments ↵frosch
of _current_company to ensure proper restoration.
2010-04-20(svn r19684) -Fix [FS#3779]: don't show an error message when trying to give ↵yexo
another client an amount of 0 money
2010-04-17(svn r19658) -Fix: One could turn transport companies into credit banks.frosch
2010-04-02(svn r19544) -Feature [FS#3496]: add an input box to the AI Debug window ↵yexo
where you can input a break string (patch by Zuu)
2010-03-20(svn r19483) -Codechange: Code layout fixes, and parentheses reduction.alberth
2010-01-05(svn r18732) -Codechange: move the company related commands of misc_cmd.cpp ↵rubidium
to company_cmd.cpp
2009-11-28(svn r18330) -Cleanup: remove some unneeded includesrubidium
2009-11-12(svn r18052) -Codechange/Fix: make the 'pause' chat message when actually ↵rubidium
executing the pause command. This to prevent showing paused and especially unpaused to be shown when the state doesn't change. Output now mentions whether pause changes keep the game paused and what reasons for pausing there 'currently' are.
2009-11-12(svn r18051) -Codechange: make the active clients pause use a separate bit ↵rubidium
in the pause mode
2009-11-12(svn r18050) -Codechange: disallow 'pause on join' paused when not in a ↵rubidium
network game
2009-10-04(svn r17693) -Cleanup: remove some unneeded includesrubidium
2009-09-18(svn r17567) -Fix: some doxygen warningsrubidium
2009-09-13(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty ↵frosch
for more consistency and distinguishability.
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-08-05(svn r17075) -Codechange: rename ~750 strings to be more uniform with their ↵rubidium
relatives
2009-05-31(svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more ↵frosch
vehicles in more places. Esp. they were only invalidated for trains.
2009-05-23(svn r16394) -Codechange: move (NewGRF) cache variables into a separate ↵rubidium
struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier.
2009-05-17(svn r16327) -Codechange: replace IsValidPoolItemID(index) by ↵smatz
PoolItem::IsValidID(index)
2009-05-16(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)smatz
2009-05-06(svn r16242) -Codechange: rework pausingrubidium
-Fix [FS#2864]: autopause and manual pausing conflict with eachother -Fix: new game + pause on new game + autopause make the game not unpause on the first join
2009-04-21(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had ↵rubidium
this ID' from 'some' strings and replace the string name with something more sensible.
2009-03-13(svn r15704) -Cleanup: remove further includes from recently split filessmatz
2009-03-04(svn r15617) -Change [FS#2694]: vehicle variables 40-43 weren't cached ↵rubidium
(though spec stated they are). Caching these variables can yield a 10+% speed increase when those vehicle variables are queried often.
2009-02-09(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.rubidium
2009-02-09(svn r15428) -Codechange: consistently use colour instead of having both ↵rubidium
color and colour.
2009-02-09(svn r15423) -Codechange: split widget related types to their own header and ↵rubidium
add a bit of type strictness.
2009-01-31(svn r15299) -Cleanup: remove many redundant includessmatz
2009-01-12(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to ↵truebrain
see. NoAI is an API (a framework) to build your own AIs in. See: http://wiki.openttd.org/wiki/index.php/AI:Main_Page With many thanks to: - glx and Rubidium for their syncing, feedback and hard work - Yexo for his feedback, patches, and AIs which tested the system very deep - Morloth for his feedback and patches - TJIP for hosting a challenge which kept NoAI on track - All AI authors for testing our AI API, and all other people who helped in one way or another -Remove: all old AIs and their cheats/hacks
2009-01-10(svn r14958) -Codechange [FS#1923]: when checking for unique names, compare ↵smatz
only with manually set names There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
2008-12-28(svn r14754) -Codechange: get rid of _cmd_text and just pass it as ↵rubidium
(optional) parameter.