1
0
forked from 0ad/0ad
Commit Graph

19094 Commits

Author SHA1 Message Date
f7783fb4bb Fix biome-specific mappreviews in 7f602037ba for zipped mods, refs #4962.
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.
2018-08-05 21:50:00 +00:00
2af94c5898 Remove disabled remains of the performance data (= profiler data + text input) upload feature from the UserReporter from 0da7e822ff.
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.
2018-08-05 15:18:00 +00:00
bdc68f85c9 Add missing XmppClient destruction if maploading failed in bffe917914.
Differential Revision: https://code.wildfiregames.com/D1596
Patch By: smiley aka (-_-)
This was SVN commit r21856.
2018-07-21 12:17:13 +00:00
d6caaaa54c Add missing XmppClient destruction in 4b09d6f167 needed for the case of leaving the lobby to change the mods but then not changing the mods and entering the lobby again.
This was SVN commit r21855.
2018-07-21 12:05:06 +00:00
9fa1a230cb Prevent hosts that didn't modify C++ code from starting the game without all assigned online players being ready (launchGame(); cheat), refs #4463.
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.
2018-07-21 11:58:35 +00:00
aec7509004 Remove 256 character limit from escapeText.
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.
2018-07-21 09:25:04 +00:00
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
fe41404ba8 Fix XML syntax error in 80dbd1f2a3 reported by gameboy.
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.
2018-06-12 09:18:50 +00:00
88eb3527b7 Remove leftover debug line from previous.
This was SVN commit r21848.
2018-06-11 16:08:49 +00:00
80dbd1f2a3 Rewrite the prelobby pages and add the Terms of Service, Terms of Use and the agreement checkbox to the login page.
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.
2018-06-11 15:59:22 +00:00
de1a73ba65 Lobby register/login dialog cleanup.
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.
2018-06-08 13:39:52 +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
ce64c57b8c Prevent calling the JS gamestart function twice when doubleclicking on the "Start Game" button.
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.
2018-06-06 22:25:15 +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
8e168f85e6 Disable AIInterface earlier to remove unnecessary lag on gamestart
Differential Revision: https://code.wildfiregames.com/D1559
Reviewed by: wraitii
Comments by: elexis, Itms, Stan
Refs: #5200

This was SVN commit r21838.
2018-06-05 23:23:37 +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
48e794e97d Always call SetPassabilityCircular -- Fix OOS after rejoin on square maps
Differential Revision: https://code.wildfiregames.com/D1555
Reviewed by: elexis
Fixes: #5186

This was SVN commit r21835.
2018-06-03 16:40:44 +00:00
1608202d4f Fix an OOS on rejoin on Danubius following 3d65bfe555, refs #4855, fixes #5198.
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.
2018-06-03 11:49:55 +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
4cefb286f4 Prevent the lobby gamelist from breaking entirely if a gamestanza contains an empty or invalid mod version JSON string (refs eca956a513).
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.
2018-05-27 13:47:18 +00:00
788ca1f69d Revert 51afc72886, it violates current freezes
This was SVN commit r21826.
2018-05-26 18:26:31 +00:00
51afc72886 reaffect → reassign
Reported by GunChleoc on Transifex.

This was SVN commit r21825.
2018-05-26 18:22:12 +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
83d228fe7e Fix hosting games in the lobby.
Fixes #5164.

Reported by: HMS-Surprise
Reviewed By: Stan
Trac Tickets: #5164

Differential Revision: https://code.wildfiregames.com/D1498
This was SVN commit r21822.
2018-05-21 16:52:50 +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
b0ca04b555 Revert a bit of the nerf from 5cbe187438.
Commit permitted by Itms.

This was SVN commit r21813.
2018-05-01 21:12:43 +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
0de26377a8 Fish should not block foundation construction.
Regression introduced by 8ace8034a2.
Tested by mimo, commit permitted by Itms.

This was SVN commit r21810.
2018-04-30 16:29:55 +00:00
54d2b13658 Update AppData, fixes #5006, refs #3734.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D683
This was SVN commit r21809.
2018-04-29 20:49:52 +00:00
32686c2840 Build fixes for macOS and premake4.
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.
2018-04-29 15:44:48 +00:00
2b564e7311 Enlarge elements of the AI configuration message box in order to display correctly the majority of strings for the bundled languages. Fixes #3084 at the same time.
This was SVN commit r21807.
2018-04-29 15:34:31 +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
e84e712801 Enlarge some GUI elements in order to display correctly the majority of strings for the bundled languages.
This was SVN commit r21804.
2018-04-29 14:34:10 +00:00
54e0f9ec28 Add engine and mod version test before loading the persist-matchsettings file.
This should be unneeded if the settings were parsed rather than copied
directly.

Differential Revision: https://code.wildfiregames.com/D1475
Reviewed By: Itms
This was SVN commit r21802.
2018-04-29 13:18:05 +00:00
15bbd3b62b Update list of included languages in A23.
This was SVN commit r21801.
2018-04-29 13:05:45 +00:00
ac149374fc few templates fixes
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1477
This was SVN commit r21800.
2018-04-29 08:56:59 +00:00
fce54167fd Place palisade walls around Napata when chosing the "easy" difficulty.
This was SVN commit r21798.
2018-04-28 20:34:31 +00:00
5cbe187438 30% less attackers on Jebel Barkal and leave more time between attacker waves in later stages of the game.
This was SVN commit r21797.
2018-04-28 16:22:27 +00:00