Patch By: Vladislav
Refs #4225, D763
Also use SDL_Keycode instead of int, remove an outdated history lookup
comment and some other unneeded comments.
This was SVN commit r20074.
Allow XmppClient to use arbitrary property names in GUIMessages.
Remove duplication by calling CreateGUIMessage when receiving chat
messages.
Inline PushGUINotification.
Use std::string in the GUIMessage because every data source is of that
type.
Apply the wstring_from_utf8 conversion to ensure correct display of less
common UTF characters instead in the GuiPollMessage method.
Add room subject change chat message.
Differential Revision: https://code.wildfiregames.com/D835
Refs #4482
Comments by fpre, Vladislav and leper
This was SVN commit r20064.
Remove unused SGUIBaseSettings and GUI comment.
Fix indentation of a macro, refs D794.
Differential Revision: https://code.wildfiregames.com/D838
Review by: leper.
Itms came up with the same patch for the SpiderMonkey 45 update
independently.
This was SVN commit r20062.
When launching Atlas from a higher directory the help.json isn't found.
Fixed by finding the absolute path.
Patch By: vladislavbelov
This was SVN commit r20059.
The affected function was imprecise, because it called a playerlist
update whenever a "chat" level message was received instead
of only updating the playerlist if it's actually influencing the
displayed playerlist.
When there is a chat message, lobby subject change or user-role change,
there is no need to update the list.
Differential Revision: https://code.wildfiregames.com/D671
Refs #3386, 8b437a0b1c
Reviewed By: fpre / ffffffff
This was SVN commit r20040.
This fixes an assertion failure in ScriptEngine that can occur when
closing
the game while in the loading screen.
Reviewed By: vladislavbelov, leper
Differential Revision: https://code.wildfiregames.com/D684
This was SVN commit r20035.
Properly support capturing in the RallyPointRenderer component, even
though RallyPoints are typically deleted upon capturing.
Differential Revision: https://code.wildfiregames.com/D776
Refs D687
Reviewed By: Stan
This was SVN commit r19976.
Before inlining territories it was changed to be a const reference, thus
avoiding the copy.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D741
This was SVN commit r19936.
Remove all hacks while keeping most optimizations in memory management.
This fixes incomplete grid updates that could cause OOS on rejoin, fixes
#4596.
Tested by: elexis, ffffffff
Reviewers: leper, wraitii
Differential Revision: https://code.wildfiregames.com/D675
This was SVN commit r19916.
This is quite noisy with -Wexpansion-to-defined in both clang 3.9 and
gcc 7.
(Refs #3190 and #4148. Upstream might have fixed this, but somewhat
clean build logs seem worth it.)
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D680
This was SVN commit r19884.
This fixes#4561 and makes sound card detection work on non-Windows
platforms.
Reviewed By: echotangoecho
Tested By: Imarok, elexis
Differential Revision: https://code.wildfiregames.com/D636
This was SVN commit r19877.
Do not send a wasteful rating request if the same player is selected
again when someone joined the lobby, when changing the sorting order or
when clicking on the same user again
by moving the player-selection change test from updatePlayerList to
onPlayerListSelection.
That test should have been done here in 8f4daa9dd0 already and fixes
#3840 well enough.
This change also fixes an unintentional behavior of the code, where the
game the currently selected player is playing in would be selected if
someone else joined the lobby, even if a different game was selected
manually.
Furthermore it allows simplification of the code of 655ce95468 by
removing selectGameFromPlayername which did almost the same as
selectGameFromPlayername.
To still select the game the current player is playing in if the
selected player didn't change, subscribe to the (new) event that is
called when clicking on an item.
Differential Revision: https://code.wildfiregames.com/D688
Reviewed By: ffffffff (fpre)
This was SVN commit r19841.
Use OsPath instead of CStr and CStrW where possible,
wstring_from_utf8(OsPath.string8()) to pass printable strings to the
JSAPI,
OsString when opening a filestream and
off_t instead of int for filesizes.
Fixes#4320
Differential Revision: https://code.wildfiregames.com/D518
Reviewed By: Imarok
Tested By: Imarok on Windows, wraitii on OSX
Special thanks to Philip for advice and the lib/path.h fix in
47cc447322.
This was SVN commit r19824.
thus allow proper printing of such paths.
Fixes#4647
Refs #4320 D518
Patch By: Philip
Tested By: Imarok on Windows, wraitii on OSX
This was SVN commit r19823.
Only historic messages were timestamped in C++ prior.
Other messages showed the timestamp when they were displayed in JS,
which is wrong in case of returning to the lobby from a game.
Differential Revision: https://code.wildfiregames.com/D514Fixes#3832.
Reverts the revert of 1f34a004e5 in 572847ddd4.
Patch By: Josh
Tested By: Itms
This was SVN commit r19801.
Let the JS GUI take care of hiding the GUI and silhouettes and remove
the according hardcoding in the engine following 89aef0b6eb.
Thereby fix some bugs (like not having hid the GUI if there was a
message box or different page shown while playing a path) and
fix these two hotkeys broken by 5d49e6c456.
Differential Revision: https://code.wildfiregames.com/D631Fixes#4633
Reviewed By: Vladislav
This was SVN commit r19797.
6aeb5c64de forgot to add a LosIsOffWorld check in ExploreTerritories
(aka UpdateTerritoriesLos) and thus marked tiles outside of the world as
explored.
f5e60157bf transformed the bug into a non-simulation desynchronization,
causing rejoined players to see a different score,
as they excluded off-world tiles when filling the cache in
ResetDerivedData upon rejoin.
4a0673e44e transformed the bug into an actual simulation OOS by
serializing that map exploration percentage based on that cache.
Also tiles at the map border in square maps are not rendered as
expected, so this commit hides refs #4267.
Differential Revision: https://code.wildfiregames.com/D630Fixes#4598
Proofread by: Itms
Tested By: Imarok
This was SVN commit r19790.
Still throw that error if the function exists but could not be called
with JS_CallFunction.
Differential Revision: https://code.wildfiregames.com/D620
This was SVN commit r19769.
Hence display the originally intended useful warnings (instead of the
characterless JS "Script value conversion check failed" warning and
skipping the intended warnings).
This was SVN commit r19718.
Allows lobby players to host games without having to configure their
router.
Differential Revision: https://code.wildfiregames.com/D364Fixes#2305
Patch By: fcxSanya.
StunClient based on code by SuperTuxKart, relicensed with approval of
the according authors hilnius, hiker, Auria, deveee, Flakebi, leper,
konstin and KroArtem.
Added rfc5245 (ejabberd) support, a GUI option, refactoring and segfault
fixes by myself.
Tested By: user1, Sandarac, Sestroretsk1714, Vladislav, Grugnas,
javiergodas
Partially Reviewed By: leper, Philip, echotangoecho
This was SVN commit r19703.
Two of our printf calls are not compatible with python-format and will
be ignored until Dennis supports the corresponding formats. Also removed
meaningless enclosing characters that were wrongly considered HTML.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D214
This was SVN commit r19669.
This allows automated testing of AIs without any GUI or sound (similar
to non-visual replays).
Differential Revision: https://code.wildfiregames.com/D379
This was SVN commit r19645.
This improves our international keyboard until we completely rework the
hotkey system which seems to be quite legacy at this point.
Reviewed by Itms.
Differential Revision: https://code.wildfiregames.com/D303
This was SVN commit r19624.
We don't catch this specific exception, so no behavioural change, but we
do no longer violate the implicit noexcept for destructors in C++11.
(Fixes a GCC6 and VS2015 warning.)
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D416
This was SVN commit r19612.
Some invalid cursor positions were not checked, resulting in a crash in
Debug mode. This was revealed by e1e4ef0370, refs #4401.
Reviewed By: echotangoecho, Itms
Differential Revision: https://code.wildfiregames.com/D484
This was SVN commit r19579.
for example when someone would send a lobby chat message containing such
a character, it effectively ended the game of the recipients.
Differential Revision: https://code.wildfiregames.com/D456Fixes#4433
Reviewed By: leper
Reported and tested by: Hannibal_Barca
This was SVN commit r19540.
Also show the GUI after the cinematics stopped playing in Atlas.
Differential Revision: https://code.wildfiregames.com/D411
This was SVN commit r19533.
Actually implementing atlas support for triggers will most likely
require a different interface, so no use keeping it.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D418
This was SVN commit r19531.
Displays a chat message and a notification in the player details to
everyone if someone was muted and
hides the chat input to visitors.
Differential Revision: https://code.wildfiregames.com/D339
Reviewed By: user1
This was SVN commit r19514.
This has been disabled for nearly 10 years (44f5288a1d), so remove it.
Reviewed By: fatherbushido, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D423
This was SVN commit r19511.
Make it way more accurate by excluding the SDL_Wait time and microsecond
precision.
Differential Revision: https://code.wildfiregames.com/D109
Refs #2882
Reviewed By: Vladislav
This was SVN commit r19507.
Add a hint that multiplayer games with AI are currently not supported.
Differential Revision: https://code.wildfiregames.com/D105
Reviewed By: leper
Refs #3858
This was SVN commit r19491.
Mention how to handle const methods (be1a205f91, D75).
Note that parameters are passed as const references (1a66f510d0).
Also remove mention of jsval (which is deprecated).
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D374
This was SVN commit r19484.
Doesn't provide a way to add/delete nodes of paths yet.
Differential Revision: https://code.wildfiregames.com/D348
Patch By: Vladislav
This was SVN commit r19427.
The remaining graphics code should be moved or removed.
Differential Revision: https://code.wildfiregames.com/D324
Patch By: Vladislav
This was SVN commit r19414.
Expose the FindAllPlaceableTemplates function to the simulation to
remove the hardcoded directory checks as suggested by fatherbushido.
Add the new special template directory from D176 / cd6c31e76e.
Move the code from XML to JS.
Differential Revision: https://code.wildfiregames.com/D277
Reviewed By: Vladislav
This was SVN commit r19399.
Add height indicator so that we can actually estimate the location of
the paths in atlas.
Differential Revision: https://code.wildfiregames.com/D306
Patch By: Vladislav
This was SVN commit r19394.
The terrain grid can be renewed without proper deallocation, which
happens at least at the start of a game when MT_TerrainChanged is sent.
Reviewers: wraitii, Itms
Differential Revision: https://code.wildfiregames.com/D247
This was SVN commit r19388.
Move graphics code to smaller helper functions UpdateSessionVisibility,
UpdateSilhouettesVisibility and DrawPaths.
Remove the hotkey TODO code which should be implemented differently.
Mark voids as const.
Differential Revision: https://code.wildfiregames.com/D271
Patch By: Vladislav
This was SVN commit r19375.
64bit conversions (including the long ones) are not safe, because not
every number can be converted to the 2^53 JS numbers and pretending to
do so is asking for bugs.
Explicitly use the double type in the Replay menu, because std::time_t
is unspecified and some platforms like Ubuntu yakkety:i386 fail to
build, looking for long.
Double should work for the next 285 million years, becomes consistent
with SavedGame.cpp, is tested by test_ScriptConversions.cpp and doesn't
pretend to cover all 64bit numbers.
Patch By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D205
Refs #3848 D84 D112
This was SVN commit r19367.
Add a test for the GetNonGaiaEntities function of the RangeManager
broken by that commit that was fixed by f3e4e619bc.
Don't call one script function from another, but directly call into the
Selection helper like the others.
Don't make a loop around that RangeManager function for all players but
call the function once for all players.
The pointless virtual keywords were removed by 8827db201a.
Differential Revision: https://code.wildfiregames.com/D166
Reviewed By: leper
This was SVN commit r19344.
Use std::set's logarithmic find instead of a linear loop.
Early return and some whitespace for getParabolicRangeForm.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D260
This was SVN commit r19342.
Could possibly fix a compilation failure with some compilers in
36330732fa.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D250
This was SVN commit r19341.
Remove the support of saving the rotation of camera position nodes,
because that should be rewritten to use a custom spline.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D124
Refs #3814
This was SVN commit r19317.
Use the maximum height of all cells of the current row.
Lobby games with empty servernames are not rendered weirdly anymore.
Patch By: Vladislav
Fixes#4402
This was SVN commit r19306.
Displays a chat notification for all lobby clients if a client is kicked
or banned, pop up a message box for the affected one, including the kick
reason.
Clean the player- and gamelist upon disconnect and disable the control
elements.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D116
This was SVN commit r19250.
Summary: Following discussions in https://code.wildfiregames.com/D60 the
use of u8 to store each boolean has been cleanup up. Now only one u8 is
used, thus reducing the size of the struct.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D101
refs #3834
This was SVN commit r19242.
We do not need iteration order, and this makes this explicit.
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D82
This was SVN commit r19235.
Two clients chosing the same GUID is highly unlikely, yet possible.
A malicious client chosing an existing GUID would have resulted in
unassigning the player with that GUID.
This was SVN commit r19225.
(This is a workaround that will be removed when gloox has fixed the
issue.)
Reviewed by: elexis
Refs #3771
Differential Revision: https://code.wildfiregames.com/D87
This was SVN commit r19205.
Template-ize CallFunctionVoid.
Changes CallFunction parameter order to make template parameter
deduction with
variadic parameters work nicely.
Reviewed By: Itms, wraitii, Yves
Differential Revision: https://code.wildfiregames.com/D77
This was SVN commit r19183.
Summary:
To fix tickets like #3335, having a shared vision at the entity level is
needed. This patch implements that in CCmpRangeManager, interfaced with
a new JS component VisionSharing to manage the shared entities visions.
As an example of use case (in addition to garrisoning in allied
structure without the sharedLos tech), we can think of bribing enemy
units: there is a part about it in the patch, but this one is very wip
and not intended to be committed but rather for test purposes of the
feature.
So when garrisoning a unit in another player's building, the vision of
the garrisonHolder is shared (part intended for review). In addition,
for tests of the feature, when clicking on the new bribe icon in the
diplomacy window, a random unit of the chosen player is bribed and share
its vision during 15 s.
Test Plan: Garrison a unit in an allied structure without the sharedLos
tech, or test the wip bribe feature from the diplomacy window.
Reviewers: Itms
Reviewed By: Itms
Subscribers: Stan, leper, O11 Templates, wraitii, elexis, fatherbushido,
Itms, Vulcan, O1 C++ Simulation
Differential Revision: https://code.wildfiregames.com/D60
This was SVN commit r19175.
Thus remove the peculiarity to broadcast to clients that are in the
gamesetup, loading screen or ingame, but not rejoining ones.
Fix "unknown player" errors in the GUI by broadcasting player
assignments to rejoining players too. Fixes#4036.
Differential Revision: D17
Reviewed By: Imarok
This was SVN commit r19171.
Remove the "Net" prefix from the non-networked classes.
Use variadic macros and mark the client turnmanager as NONCOPYABLE.
Differential Revision: D16
Reviewed By: leper
This was SVN commit r19165.
We were polling SDL messages from two different threads (by mistake),
and Sierra now refuses to do that.
Tested by Stan, Itms, Fatherbushido, and discussed with Philip for the
code change itself.
Fixes#4408.
Differential Revision: https://code.wildfiregames.com/D42
This was SVN commit r19160.
since they are only useful for AI debugging and counterproductive in
multiplayer mode, refs #3551.
Instead, enable AI developers to exit the game from a new AI API
command,
allowing to batch simulate matches. Refs #2755.
Differential Revision: D65
Reviewed By: leper
Consulted: mimo
This was SVN commit r19155.
Templates should be the same for all players, techs can be used to
provide
different lists of templates if that is needed.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D25
This was SVN commit r19142.
Ensure a variable is not clobbered by libpng's use of longjmp. Make code
more consistent.
Differential Revision: https://code.wildfiregames.com/D35
This was SVN commit r19111.
Summary: Refs #4419.
Test Plan: When running tests, make sure nothing is created.
Reviewers: leper
Reviewed By: leper
Subscribers: leper, Vulcan
Differential Revision: https://code.wildfiregames.com/D1
This was SVN commit r19062.