1
0
forked from 0ad/0ad
Commit Graph

6780 Commits

Author SHA1 Message Date
81d1e7a111 Fix conversion in previous 468d963e78 / D1575.
This was SVN commit r21851.
2018-06-21 16:52:52 +00:00
468d963e78 Persist the lobby Terms Of Use and Terms Of Service checkbox if the logged in user and the accepted versions of the pages didn't change since last login, refs #5218.
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.
2018-06-21 16:38:08 +00:00
f51f78c999 Don't print lobby buddies to mainlog.html, refs D209 / dcf12abe8c.
Differential Revision: https://code.wildfiregames.com/D1563
Comments By: Vladislav
This was SVN commit r21844.
2018-06-06 22:37:20 +00:00
eda236522c Prevent players from disconnecting during the loading screen by increasing the timeout tolerance to 60 seconds for that period, fixes #5163.
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.
2018-06-06 22:09:38 +00:00
2588682c09 In preparation of D1513, allow the NetClientSession to find out if it's the "Local Client", refs #5163.
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.
2018-06-06 21:17:01 +00:00
8ae179aaae Support parsing config values as u32 in preparation of D1513, refs #5163.
Differential Revision: https://code.wildfiregames.com/D1566
Reviewed By: Vladislav
This was SVN commit r21840.
2018-06-06 17:55:08 +00:00
43730f15f3 Fix network FSM errors when a client closes the game during the loading screen or rejoin synchronization stage, fixes #4594, refs 3199.
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.
2018-06-05 14:52:41 +00:00
ee9cf54149 Fix an OOS on rejoin after doubleclicking on the StartGame button, fixes #5199, refs #5162.
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.
2018-06-05 12:24:30 +00:00
06e2e77349 Report network timeouts and lag warnings to clients that finished the loading screen but are waiting for other clients to finish it.
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.
2018-06-01 17:35:00 +00:00
4fbe399e07 Save oos_dump.dat too when saving oos_dump.txt.
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.
2018-05-29 02:50:33 +00:00
333766ef1b Test all full hashes in non-visual replaymode by default and keep skipping quick-hash by default.
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.
2018-05-29 02:14:38 +00:00
572b72fa7f Fix non-visual replay hash mismatch caused by CCmpSound condition in CCmpVisualActor
Differential Revision: ​https://code.wildfiregames.com/D1519
Reviewed by: temple, elexis, wraitii
refs: af2abb8cbf

This was SVN commit r21828.
2018-05-28 19:06:09 +00:00
44ec2e324e Alpha 23 "lobby lag" release fix.
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.
2018-05-24 18:08:56 +00:00
a5d1e0068b Fix OSX not starting matches following 8fbc095a88.
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.
2018-05-08 10:03:46 +00:00
27da92e55f Main.cpp cleanup.
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.
2018-05-08 09:45:54 +00:00
4c73614955 In preparation of renaming and grouping main.cpp shutdown variables:
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.
2018-05-08 09:24:16 +00:00
16fbe90342 Fix 204b04f2d4 compatibility with zipped mods, refs #5018.
Differential Revision: https://code.wildfiregames.com/D1480
Reviewed By: Itms
This was SVN commit r21814.
2018-05-01 21:15:55 +00:00
a89bcf837b Fix the window icon that cannot be loaded in release packages, refs 27d99765bb.
Discussed with Imarok and elexis.

This was SVN commit r21812.
2018-05-01 20:29:36 +00:00
c647dcd330 Exclude a few files from the win32 installer.
This was SVN commit r21811.
2018-04-30 20:09:20 +00:00
dae5a7f488 Update translator credits.
This was SVN commit r21806.
2018-04-29 14:58:18 +00:00
056affbfab Update the list of languages for the Windows installer.
This was SVN commit r21805.
2018-04-29 14:37:35 +00:00
15bbd3b62b Update list of included languages in A23.
This was SVN commit r21801.
2018-04-29 13:05:45 +00:00
661af35eb8 Fixes translations license year.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1471
This was SVN commit r21791.
2018-04-27 19:34:00 +00:00
13e1702777 Add missing ScriptInterface includes to
JSInterface_L10n.cpp from d6db5a466d,
JSInterface_Renderer.cpp and JSInterface_GUITypes.cpp from 4b1297b328,
JSInterface_VisualReplay.cpp from b830233498,
JSInterface_Game.cpp from 5f8be8e0c6,
JSInterface_Simulation.cpp from 921c5515a6,
JSInterface_Debug.cpp from d6cb9c845b,
JSInterface_Main.cpp from 486aec18d4, refs #4772,
JSInterface_Mod.cpp where it was incorrectly removed in af03c72f76.

Refs D1470.
Sort includes alphabetically, add recent Coding Convention macro
comments.

This was SVN commit r21789.
2018-04-27 16:48:44 +00:00
7ecd1d2c34 Clean some forward declarations.
Remove unused (wrong copy&paste) includes from 86fcf0de8c in
JSInterface_ModIo.*, initially hinted at by leper.
Remove a forward declaration in JSInterface_Console.h that should have
become an include with 4b1297b328, because CxPrivate must be declared
before its reference too.
Remove a forward declaration in JSInterface_Mod.h from 64bfa089af that
should have been the include added in af03c72f76 which in turn omitted
to remove this forward declaration.
Remove a forward declaration in Renderer.h that became unused with
1ddd24bb8c.

Differential Revision: https://code.wildfiregames.com/D1470
Reviewed By: Itms
This was SVN commit r21788.
2018-04-27 16:06:42 +00:00
86fcf0de8c Move ModIo JS interface functions to a separate namespace, refs 833c9f108c.
Differential Revision: https://code.wildfiregames.com/D1466
Reviewed By: Itms
This was SVN commit r21778.
2018-04-24 13:12:08 +00:00
067bbb38d6 Fix whitespace in JSInterface_Sound.*
This was SVN commit r21776.
2018-04-24 11:44:26 +00:00
56d93afceb Adjust code comments to match a breaking change in the mod.io API.
See
317358c5d0.

This was SVN commit r21764.
2018-04-23 09:09:45 +00:00
833c9f108c mod.io support.
mod.io is a new platform for sharing mods, that 0 A.D. can make use of
in order to download mods and install them.

Based on patch by leper, numerous changes from s0600204, vladislavbelov,
Imarok, elexis, temple and myself.
Differential Revision: https://code.wildfiregames.com/D1029
This was SVN commit r21759.
2018-04-22 18:14:45 +00:00
f2cda85310 Fix compilation of ModInstaller without pch
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1456
This was SVN commit r21739.
2018-04-17 22:02:10 +00:00
404e1a9a4a Add a mod installer, fixes #4027.
pyrogenesis can now take a zip file (rename it to .pyromod for direct
file association following 943a61e4ea) and install it. It then starts
the mod selector.

Patch by vladislavbelov, with contributions from Imarok, elexis and
myself.
Differential Revision: https://code.wildfiregames.com/D1142
This was SVN commit r21726.
2018-04-15 01:46:28 +00:00
943a61e4ea Define and associate .pyromod filetype with pyrogenesis on Linux and Windows.
The new pyrogenesis.xml file should go under
`$XDG_DATA_DIRS/mime/packages/` before running update-mime-database (see
https://www.freedesktop.org/wiki/Specifications/AddingMIMETutor/ for
more information).

Patch by s0600204 and myself.

This was SVN commit r21723.
2018-04-15 00:25:52 +00:00
ee4beef8e8 Update mod_ipstamp for current ejabberd versions and update lobby setup instructions.
Patch By: Dunedan
Differential Revision: https://code.wildfiregames.com/D1208
This was SVN commit r21720.
2018-04-14 12:54:50 +00:00
e6106afc05 Send rating related requests directly to EcheLOn.
Patch By: Dunedan
Differential Revision: https://code.wildfiregames.com/D1177
This was SVN commit r21719.
2018-04-14 12:50:54 +00:00
1d158a25ea Lobby Bot Optimizations and Upgrade to recent SleekXMPP/ejabberd versions.
Based on patch by scythetwirler, fix and improvements by user1, Dunedan
and myself.
Differential Revision: https://code.wildfiregames.com/D206
This was SVN commit r21718.
2018-04-14 12:44:47 +00:00
4fbd5e40d5 Ease comparison of two replay profile graphs by typing the filename in the browser instead of renaming the data.json files, refs #5116.
This was SVN commit r21694.
2018-04-11 16:07:38 +00:00
5e39b717aa Fix compilation with ICU 61
Initial patch by: elexis
Reviewed By: mapkoc, elexis
Fixes: #5114
Differential Revision: https://code.wildfiregames.com/D1436
This was SVN commit r21688.
2018-04-10 18:13:32 +00:00
593a6a228e Properly handle map resizes in Atlas, fixes #4800.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D946
This was SVN commit r21675.
2018-04-08 21:49:47 +00:00
dfa2048dc5 Use libsodium for cryptography.
Tested By: Stan, Imarok
Differential Revision: https://code.wildfiregames.com/D1428
This was SVN commit r21674.
2018-04-08 21:41:31 +00:00
d0a771c712 Use the loading screen for autostart singleplayer/bot matches and replays too (not only for autostarted multiplayer matches), refs #4822.
Add an autostart-player option, so that one can start as an observer too
and watch some knockout bots.

Precise the "Needed for autostart loading option" comment from
d5bd374586 which
become increasingly incomprehensible with each a68d5dae0d, 506350d6fa,
9f796068f8 and 6c5a8269f3.

This was SVN commit r21659.
2018-04-04 18:46:36 +00:00
f4749a8e2c Simplify GUI g_IsController variable init, equivalent to 100be98215.
Just test if a NetServer is present rather than passing a state boolean
from GUI page to GUI page.

This was SVN commit r21651.
2018-04-04 12:43:25 +00:00
100be98215 Simplify GUI g_IsNetworked variable init.
Just test if a NetClient is present rather than passing a state boolean
from GUI page to GUI page (since 1c0536bf08 or sooner).

This was SVN commit r21650.
2018-04-04 12:20:34 +00:00
b0d14419ac Fix rotation of promoted turrets and allow fixing the turret angle in the GarrisonHolder schema.
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D1420
This was SVN commit r21645.
2018-04-03 17:13:24 +00:00
8ace8034a2 Fix mirages (and any other entity that blocks something but not BlockConstruction) blocking foundation construction following 29492badb7 / D21.
Clean the code by removing the animal hardcoding in the Foundation
component and adding a flag DeleteUponConstruction to the Obstruction
component.

Have locked gates and upgraded entities equally delete entities when
transforming.
Add a workaround for trees inside walls on random maps.

Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D1415
Refs #4268

This was SVN commit r21624.
2018-03-26 15:18:53 +00:00
d31d38015b Remove an ancient unused placeholder template.
This was SVN commit r21623.
2018-03-26 14:50:14 +00:00
cb048b4738 A little cleanup of the PatchRData.cpp.
This was SVN commit r21612.
2018-03-24 11:20:57 +00:00
7d249181de Update simulation replay profiling comments and remove unused, nonexisting reference.
This was SVN commit r21608.
2018-03-23 14:31:00 +00:00
d6ae354158 Fix mod check of non-visual replays and allow conversion of a vector of vectors of strings via ScriptConversions
Reviewed by: elexis
Fixes #5044
Differential Revision: https://code.wildfiregames.com/D1316
This was SVN commit r21603.
2018-03-22 15:26:27 +00:00
ee9e677084 Simulation replay profiling graph overhaul.
Support multiple graphs with different scales, units, rounding and
descriptions and use it for memory allocation and number of garbage
collections.
Have the X axis in number of turns (instead of that divided by 20).
Don't have the legend hide part of the graph.
Add references to that hardcoded 20.
Move graph JS to a separate JS file.
Use JSON instead of JS.
Add legal html structure.

Comments By: Vladislav in irc yesterday
This was SVN commit r21602.
2018-03-22 13:53:04 +00:00
29492badb7 Delete sheep corpses when starting to build a foundation,
so that units don't try to gather forever while not being able to reach
it and
so that the sheep corpse can't be selected and seen anymore.

Differential Revision: https://code.wildfiregames.com/D21
Fixes #4268
Based On Patch By: wraitii
Reviewed By: temple
Previously Reviewed By: Itms
This was SVN commit r21597.
2018-03-21 01:44:15 +00:00