This way it stands out more as a separate feature that can be more
easily exchanged, extended, maintained or conditionally removed from the
build and leaves more transparent includes, refs #5257.
Add missing string includes following 7c2e9027c2 and d6cb9c845b.
Remove unused Profile include following 38d6f81d71 and d6cb9c845b.
Remove unused CLogger include, add missing debug include following
d6cb9c845b.
Remove unused CConsole include following 9f0484e5ce / D1073.
Remove unused ProfilerViewer include following 2af94c5898.
This was SVN commit r21866.
Resolves build issue on Arch Linux (and Arch-derivatives)
(Also forms part of a fix for Slackware-current builds)
Accepted By: echotangoecho (Arch)
Confirmed as functional by: Imarok (Ubuntu 16.04, gcc5.4), wes-fole-dog
(Parabola)
Refs: #5157Fixes: #5152
Differential Revision: https://code.wildfiregames.com/D1582
This was SVN commit r21865.
Removes the call to the sprintf_s function from test_MD5.h in 17718981cf
and JSInterface_Main.cpp in 468d963e78.
As reported by Vladislav that function might not null-terminate strings
on untested/newer platforms, but the caller requires it here.
The sprintf_s calls in other places have the same problem.
Differential Revision: https://code.wildfiregames.com/D1591
Accepted By: Vladislav
This was SVN commit r21863.
Add TextureExists to avoid needless redundant hardcoding of the
filenames.
Remove mapBiome.Preview from gamedescription.js, obsolete following
8cde469501.
Differential Revision: https://code.wildfiregames.com/D1583
Accepted By: Vladislav
This was SVN commit r21859.
User-submitted text upload was removed in 2779512c6e in preference of
the bugtracker.
Remove leftover mainmenu.js function that this commit should have
removed.
Profiler data upload was disabled in b9e46f386b because the data amount
was too large and because the two timing snapshots are inconclusive
without further data.
The hereby removed exposed JS functions could have been exploited by JS
mods to upload 0ad userdata to arbitrary places.
The performance data upload feature can be redesigned, implemented
without JS exposure, with a more transparent privacy policy (refs
#5257).
Differential Revision: https://code.wildfiregames.com/D1597
Performance upload feature removal accepted by: Vladislav
This was SVN commit r21858.
This works in autostartmode because that sets every client to an
observer and still relies on enabled cheats to have players assign
themselves.
This was SVN commit r21854.
escapeText was added for the gamesetup and session chat in 9ee44bd9b8,
but the character limit is counterproductive for chatting with more than
2 sentences per line, when displaying a file path or other arbitrary
escaped text,
not really an effective measure against lobby spam, nor was that option
considered in any of the later calls except d7d0a7f869 and
thus more likely to cause unintended than intended code behavior and
should instead be implemented with max_length for input fields and
linebreaks and smaller GUI object sizes for displaying, refs #5266.
Remove early returns that are redundant code and require more
performance in the average case (non-empty string).
From Differential-Revision: https://code.wildfiregames.com/D720
This was SVN commit r21853.
This way the user is only forced to read the Terms again that changed or
if the user logged in from a different machine.
Use md5sum since it is sufficiently resistant against collisions and
doesn't freeze the window for 2 seconds like EncryptPassword / SHA256
does, refs #4399.
Use 0 instead of empty string in default.cfg, refs #3990.
Differential Revision: https://code.wildfiregames.com/D1575
Partial review by: Vladislav
This was SVN commit r21850.
The error was hidden by Xeromyces loading the syntactically correct XMB
file that is still written for syntactically wrong XML files, refs
#5222, D1574.
This was SVN commit r21849.
Ensure lobby players cannot join without acceptance of the terms in case
they change, fixes#5218, as agreed in last staff meeting.
Separate lobby entrance, lobby login and lobby register GUI page.
Since bffe917914 they were squashed into a single GUI page;
Adding lots of hardcode to set the visibility of GUI objects;
Reinventing a GUI page manager in JS;
Unintentionally persisting data between pages;
Requiring lots of errorprone case distinctions which are unneeded once
relevant GUI objects and code is loaded exclusively.
Add the remember-password checkbox from b6b547d5f8 / D822 to the
registration page too.
Revert the revert of ccb534259d in 9f9db45a03 and continue to prefer
objects with separate functions per C++ GUI message type,
reducing the nesting of conditionals per function and reveal codeflow by
making input and output variables explicit.
Fix oversight in 0940db3fc0 by moving the registrationrate string from
0e2d2610c9 from the "disconnect" to the "error" case.
Differential Revision: https://code.wildfiregames.com/D1568
Few comments by: Vladislav, Imarok, gallaecio
This was SVN commit r21847.
Move JS code from XML files to JS files.
Move all terms data to one JS object.
Unify duplicate Terms dialog opening code.
Update the checkbox enabled property only upon dialog close, not onTick.
This was SVN commit r21846.
It triggered an OOS on rejoin prior to ee9cf54149, refs #5199 and
resulted in the playernames of the current match persisting into new
gamesetups, fixes#5206.
Differential Revision: https://code.wildfiregames.com/D1558
Comments By: wraitii
This was SVN commit r21843.
The NetClient runs in the main thread, so any part of the loading screen
consuming several seconds makes that client timeout.
This is a workaround because threading the NetClient would have prevent
these timeouts, refs #3700.
Coutnerintuitively, since enet timeout tolerance is proportional to the
latency, the better the connection of the player, the more likely it was
to drop on gamestart.
This problem became very frequent in Alpha 23, at least due to the Aura
bugfix 583b6ec625, AIInterface being particularly slow and that not
having been disabled yet in the loading screen resulting in additional
10 second freezes during the loading screen, even on empty maps, refs
#5200, 8e168f85e6.
Differential Revision: https://code.wildfiregames.com/D1513
Based on patch by: causative
This was SVN commit r21842.
For good practice, mention all members in the affected member
initializer list:
Add booelan m_IsLocalClient and u32 m_HostID to the member initializer
list (to not have them undefined, even though they are not read from
until they are set).
Add the strings m_GUID and m_UserName for completeness (even though the
default constructor is already called for strings).
Use nullptr instead of NULL for pointers.
Comments By: Vladislav
This was SVN commit r21841.
Fix comments claiming to ensure reliability when in reality there is
only a small likelihood of the message being received.
Broken by fa85527baf / refs #2420 which was a preparation for a3e1c68b9a
/ refs #2373, which hence didn't actually work and was circumvented by
9b136a45fc without clarification.
Might have caused #3643.
Differential Revision: https://code.wildfiregames.com/D1557
Reviewed By: Imarok
This was SVN commit r21837.
Prevents changes to the gamesettings after the game was started, so as
to use the correct map seed when generating the random map terrain for
rejoiners.
D1558 will prevent the UI bug #5206 and FSM error from doubleclicking on
StartGame.
Differential Revision: https://code.wildfiregames.com/D1562
Tested and accepted by: temple
This was SVN commit r21836.
Vectors are still deserialized as objects without their prototype
functions, so doing math on these obejcts fails upon rejoin, refs #4698.
This patch doesn't add any version incompatibilities and players with
the patched version can successfully rejoin unpatched games.
Differential Revision: https://code.wildfiregames.com/D1548
Reviewed By: temple
This was SVN commit r21834.
This allows the host to distinguish clients that are just slower than
everyone else with the loading screen from clients who have most likely
disconnected or crashed already and may be considered to be kicked.
This is especially important for D1513, because that increases the
timeout tolerance to a minute or longer.
Fixes#5193
Differential Revision: https://code.wildfiregames.com/D1546
Reviewed By: causative
This was SVN commit r21832.
Saves time to reproduce the binary simstate or provides data that may be
otherwise irreproducible, refs #5162.
Differential Revision: https://code.wildfiregames.com/D1544
Reviewed By: temple
This was SVN commit r21830.
The previous code only tested quick hashes every 100 turns and could not
be used to confirm replay hashes matching.
The option can become used for visual replays too.
Differential Revision: https://code.wildfiregames.com/D1538
Refs #5162
Reviewed By: temple
This was SVN commit r21829.
Catch all JSON SyntaxError exceptions in JS (refs d7d0a7f869).
The C++ ParseJSON function already catches exceptions and the resulting
errors can't trigger a denial of service.
Differential Revision: https://code.wildfiregames.com/D1479
Based on patch by: Imarok
Reviewed by: Imarok
Comments By: Itms
This was SVN commit r21827.
Caches the loaded mod versions, so that GetEngineInfo doesn't read the
zip and json files everytime and returns about 1000 times faster.
Adds two missing includes.
The lobby froze multiple times every few seconds on updateGameList().
The gamesetup page was slowed down with every stanza sent and the
load savegame selection page was slowed down per savegame selection,
proportional to the number of installed zipped mods.
Introduced by: d5807cd59f and eca956a513
Differential Revision: https://code.wildfiregames.com/D1518
Reviewed By: wraitii
Comments By: Imarok (in D1512, P121), leper (in the lobby)
This was SVN commit r21823.
That commit illegaly polled SDL events from a different thread which for
an unknown reason did not error on Windows and GNU/linux.
Refs #4822 / D1304, similarly 8fec942e8a.
Differential Revision: https://code.wildfiregames.com/D1484
Previous iteration tested on OSX and some comments with regards to
letter case by Vladislav (refs 27da92e55f, 4c73614955).
This was SVN commit r21818.
Use an enum to indicate the type of engine shutdown instead of three
bools.
State in the comments that the program is restarted within the same
process.
In preparation of introducing an IsQuitRequested function (which shall
not be named is_quit_requested as stressed by Vladislav):
Rename kill_mainloop to QuitEngine, restart_mainloop to RestartEngine,
restart_mainloop_in_atlas to StartAtlas to not break consistency.
Don't rename RestartInAtlas in JS just now.
Group declarations at the top of main.cpp.
This was SVN commit r21817.
Declare the g_GameRestarted hack from 12f0720f31 in main.cpp, because it
is main.cpp and Game.cpp who provide it's value.
Move the comment so that the connotation becomes clear when reading
main.cpp.
Remove the extern declaration introduced to the Renderer in fb035d08e3
that became obsolete with ed7c66eb82.
This was SVN commit r21816.
Fixes issues with wxWidgets and curl reported by foxhack. Fixes premake4
build scripts after an oversight in 833c9f108c.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1468
This was SVN commit r21808.