Add a button to toggle between normal and "diplomacy" colors.
Reviewed by: elexis
Comments by: leper, ffffffff, Stan
Fixes: #4747
This was SVN commit r21107.
This used to build so the include of CStr.h disappeared from the include
chain at some point. PCH builds kept working because this file is
included in precompiled.h for the engine project.
Differential Revision: https://code.wildfiregames.com/D1273
Reviewed By: Imarok
This was SVN commit r21075.
Since the component initialization order is the alphabetic filename
order and
since the RangeOverlayRenderer < Player < Selectable, the new file in
that commit introduced the issue.
Similar to 36b315ca32, refs #4632.
UpdateColor function taken from temple's D754
This was SVN commit r20963.
Patch By: fpre / ffffffff
Fixes#4987, refs #4254
This allows the replay menu and lobby to focus the selected element if,
but only if it is expected by the user.
Replaces 3f5648767d which scrolled the selected player into view every
single time a new playerlist was received by the lobby server.
This was SVN commit r20958.
Use the distance to the nearest point on the dropsite's obstruction
rather than the center of the dropsite.
Differential Revision: https://code.wildfiregames.com/D1160
Reviewed by: wraitii
Comments by: bb, elexis
Fixes: #4592
This was SVN commit r20950.
The abs caused a compiler error in that environment, because wchar_t is
unsigned on armhf, subtracting signed from unsigned results in unsigned
and std::abs does not define an unsigned variant.
Differential Revision: https://code.wildfiregames.com/D1122
Patch By: Peter Michael Green
Uploaded By: Ludovic
This was SVN commit r20869.
Removes the serialization of JSON files, shrinking savegame files and
rejoin states sent across the network, refs #3834, #4239, #3909,
f24523dc8f.
Removes the AI C++ code to read JSON files from e33d4a52e9 since the AI
can now use the globalscript.
Allows the AI to read Aura templates and removal of GUIInterface code to
improve performance.
Serialization of the JSON objects in other simulation components was
removed in 9c0e37f2c0 / D1109, a6f14f5631 / D1130.
Serialization removal planned by sanderd17
AI part proofread by mimo
Simulation part proofread by bb
Discussed with Itms on irc
Differential Revision: https://code.wildfiregames.com/D1108
This was SVN commit r20737.
It is unneeded because we won't add backwards compatibility for previous
formats and
because the engine version check from 94302a4149 is sufficient and more
accurate in testing compatibility of savegames of different releases.
The simpler code allows unifying the savegame version check with the
check used by the replay menu (to be used in multiplayer gamesetups).
Differential Revision: https://code.wildfiregames.com/D1131
Reviewed By: wraitii
Agreed with: Imarok
Discussed with: Philip
This was SVN commit r20729.
This addresses the Simulation2 warning about a gamesetup mechanism not
having decided explicitly about the RNG.
Differential Revision: https://code.wildfiregames.com/D1187
Reviewed By: mimo
Refs #4917, 7e05d7edc9 / D1178
This was SVN commit r20726.
This will enable us in the future to have technologies that change
projectiles.
This is also somewhat of a refactoring.
Patch By: Mate-86
Reviewed By: wraitii
Trac Tickets: #1909
Differential Revision: https://code.wildfiregames.com/D945
This was SVN commit r20676.
Original patch from Sandarac, reworked by elexis and finalized by mimo
Discussed with elexis
Differential Revision: https://code.wildfiregames.com/D1159
This was SVN commit r20671.
Remove ACCEPT_DIAGONAL_GAPS as it was unused and will not be used in the
future.
Use PASSABLE macro everywhere.
Simplify considerable OnTheWay as MakeGoalReachable returns a point
goal.
This doubles as a very slight optimisation, on the order of microseconds
per call.
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D80
This was SVN commit r20634.
By adding a custom function in Grid, the code gets vectorised on both
gcc and clang, resulting in much faster code and faster update times,
sometimes substantially (on giant maps or when few chunks must be
updated).
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D73
This was SVN commit r20630.
This also allows non-selectable entities like building previews to cast
range visualizations.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D555
Refs #3915, #4349, ee5bb1fd61 / D238.
Comments By: Vladislav
This was SVN commit r20622.
This abstraction allows calling that code again from other simulation
components, like the RangeOverlayRenderer in D555.
Differential Revision: https://code.wildfiregames.com/D1139
Refs #3915, D555
Comments By: Vladislav, echotangoecho
This was SVN commit r20621.
Removes the workaround copy of the resources JSON each turn in
GetSimulationState.
Refs #3934, #4868
Differential Revision: https://code.wildfiregames.com/D1119
Reviewed By: mimo
This was SVN commit r20600.
Removes the workaround and limitations of globalscripts Resources
(52f311da2b) and loadCivFiles (89055ef858), allowing them to actually
become actually global.
Rename to ListDirectoryFiles as proposed by wraitii.
Differential Revision: https://code.wildfiregames.com/D1103
Reviewed By: s0600204
Proofread by: echotangoecho
Comments by: wraitii
Relevant discussions with leper in #4868, D1062
This was SVN commit r20586.
This way globalscripts/ can use the same code in all contexts, all paths
are absolute and only one function name is needed.
Remove ReadCivJSONFile which is redundant with this function as well.
Restrict read access of rmgen/ to rmgen/ and simulation/, refs
4275a8a33c, 89055ef858.
Refs #4868
Differential Revision: https://code.wildfiregames.com/D1085
Reviewed By: wraitii
Partial agreement with leper
This was SVN commit r20576.
Optimizing the memory footprint requires likely different functions
following the new SM versions and a lot of testing,
so having these doesn't lower the effort to achieve optimization while
confusing the reader.
Differential Revision: https://code.wildfiregames.com/D1073
Reviewed By: Yves
This was SVN commit r20572.
This change ahead of D965, where fauna become silhouette casters, and
several fauna animals are transparent models.
Reviewed By: wraitii
Patch By: temple
This was SVN commit r20569.
This change drops MBCS encoding (which was the default for premake4)
except in the Collada project which is entirely written assuming MBCS.
Tested By: wraitii
Differential Revision: https://code.wildfiregames.com/D1069
This was SVN commit r20561.
A check for OSX version that seemed useless broke compilation on Xcode
9.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D986
This was SVN commit r20530.
Unify civ file loading from gui/common/functions_civinfo.js and
rmgen/library.js in globalscripts/Templates.js.
Delete the two forgotton headers in 4275a8a33c.
Refs #4868, #4804, D900.
Differential Revision: https://code.wildfiregames.com/D1062
Discussed with: leper
This was SVN commit r20528.
The bug came from inlining the copy constructor of Grid, which ended up
reading from un-initialized variables.
Discussed with leper who had a similar fix for a test failure locally.
Fixes#4859
Differential Revision: https://code.wildfiregames.com/D1048
This was SVN commit r20520.
It was only triggered if a civ wasn't set in Atlas.
Because civs are expected to be well-defined everywhere, alwas set the
property in Atlas too, fixing the non-GUI part of #4869.
Use the existing player defaults value then instead of hardcoding a
fallback civ string.
This was SVN commit r20512.
Revert the introduction of the exact copies of FileExists ReadJSONFile
functions in MapGenerator.cpp introduced by 871ed04521.
Include JSInterface_VFS.cpp from MapGenerator.cpp to remove that code
while gaining the other missing VFS file loading functions in rmgen/.
Split RegisterScriptFunctions of JSInterface_VFS.cpp from eb4e66aab3
into RegisterReadOnlyScriptFunctions and RegisterWriteScriptFunctions to
prevent unintentional write access.
This was SVN commit r20507.
Completes an existing TODO. This is a large speedup in some cases for
those test functions, particularly the "sunken ship lag" issue.
Patch By: temple
Reviewed By: elexis, mimo, bb, wraitii
Accepted By: bb, wraitii
Trac Tickets: #4713
Differential Revision: https://code.wildfiregames.com/D850
This was SVN commit r20438.
Thereby fix the distance check of the SimpleObject, refs #4338, D189 and
remove the CELL_SIZE engine constant magic number, refs #4034.
Differential Revision: https://code.wildfiregames.com/D996
Thanks a lot to rapidelectron and temple who independently discovered
this!
This was SVN commit r20396.
Make pyrogenesis and tests depend on Collada, fixes#404.
This commit includes custom modules for CxxTest and pkg-config support
that can be improved upon in the future. It also includes all necessary
changes to the build scripts, but the new premake5 features are not
fully exploited yet.
With this change, premake5 becomes the default, but CI scripts on Unix
will continue using premake4 for a while, in order to avoid regressions.
Includes code by zsol.
Reviewed by: wraitii, leper
Differential Revision: https://code.wildfiregames.com/D72
This was SVN commit r20381.
This removes FindAllPlaceableTemplates, replaces the few uses of it by
FindAllTemplates,
and makes that ignore all templates starting with special/ in addition
to those starting
with template_.
Now modders can use entirely different template organization schemes
(more folders, different
folders, etc) without having to edit a file that was never well
documented.
In conjunction with a few of the template moving patches preceding this
rubble/ and other/catafalque
are now placeable. The former now does not decay anymore and users that
want that should use the
decay| filter, the latter will be taken care of in #4762.
Return to making FindAllTemplates return all placeable templates again
(switch to unplaceable filter).
To reiterate the main point: Only templates starting with special/ or
template_ will not show up as
placeable in Atlas (or show up to code querying for all (placeable)
templates. If you want to add more
of those use one of these naming schemes (and possibly subfolders in
special/).
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D935
This was SVN commit r20246.
This should help with simplifying the (un)placeable filtering again.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D934
This was SVN commit r20242.
This allows for amphibious units (swimming animals, tanks, etc).
The specified depth is the distance from the water surface where the
unit will start to float. Should most likely be a little less than
the height of the actor.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D842
This was SVN commit r20196.
Thus throw errors if a simulation test tries to alternate the template
instead of silently passing tests with wrong values (as happened tests
fixed by ff90bb8490).
Remove the two clones from simulation components that were only relevant
for that test.
Add test to test the test.
Differential Revision: https://code.wildfiregames.com/D871Fixes#4759
setup.js and setup_test.js Reviewed By: leper
This was SVN commit r20134.
Delete clone globalscripts function introduced by 9f47ed536d.
Rename the better supported deepcopy function to clone.
Delete unused Vector2D and Vector3D clone prototype functions that can
just use clone if needed.
Differential Revision: https://code.wildfiregames.com/D870
Reviewed By: leper
This was SVN commit r20125.
This reveals unintentional modifications to these objects which would
most often imply hidden bugs.
Differential Revision: https://code.wildfiregames.com/D829Fixes#4257
Refs #3647
This was SVN commit r20100.
Note that this does not fix the warnings in AtlasObjectXML, someone
interested
in fixing those should check whether using ICU would be a nicer
solution.
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D740
This was SVN commit r20095.
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.