1
0
forked from 0ad/0ad
Commit Graph

6735 Commits

Author SHA1 Message Date
30c3b7c3b8 Fix two clang warnings in 61261d14fc reported by leper.
Differential Revision: https://code.wildfiregames.com/D1064
Reviewed By: fcxSanya
Refs #2305

This was SVN commit r20582.
2017-12-04 14:30:38 +00:00
0cfe9ab153 Expose the same ReadJSONFile function to simulation, GUI and rmgen.
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.
2017-12-03 23:02:27 +00:00
9f0484e5ce Delete unused SpiderMonkey GarbageCollection ScriptFunctions ForceGC in the AI and GUI context (e9e05f4efc) and MaybeGC in the random mapgen context (942a45372c).
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.
2017-12-03 12:48:21 +00:00
99d486c1d7 Allow models using alpha-blending (transparent models) to be silhouette casters.
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.
2017-12-03 10:14:16 +00:00
f22dfba717 Support Visual Studio 2015 (MSVC 14.0), fixes #3439.
VS 2013 stays the default Windows compiler, but support for it will be
dropped as soon as possible.
Tested By: Stan
This was SVN commit r20562.
2017-11-29 21:16:10 +00:00
2da6c0ce2a Use default Unicode encoding in source code on Windows.
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.
2017-11-29 20:14:22 +00:00
8de5c26540 Allow civ specific techs with {civ}
Discussed with leper

Reviewed By: bb
Trac Tickets: #4589

Differential Revision: https://code.wildfiregames.com/D1024
This was SVN commit r20551.
2017-11-28 20:43:00 +00:00
2877ae1c38 Fix oversight in 16afbf32c8 noticed by Geramoto
Reviewed by: bb
Refs: #4722
Differential Revision: https://code.wildfiregames.com/D1072
This was SVN commit r20544.
2017-11-27 19:51:21 +00:00
d0ca03d7ba Fix OSX compilation
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.
2017-11-26 16:50:21 +00:00
89055ef858 Delete GetCivData from MapGeneratorWorker.cpp which is redundant with the ReadJSONFile from 871ed04521.
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.
2017-11-26 13:30:57 +00:00
69b7f39bf1 Rename RMS to Engine.
This was SVN commit r20525.
2017-11-25 22:17:01 +00:00
60ae523f92 Fix territory borders not showing up on OSX when compiled with the lastest xCode.
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.
2017-11-25 12:48:37 +00:00
f7206dc77d More ScriptInterface const.
Reviewed By: elexis; some comments by bb
Differential Revision: https://code.wildfiregames.com/D863
This was SVN commit r20519.
2017-11-25 06:49:58 +00:00
0146c705ce Adds basic tests for the CinemaManager component
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1013
This was SVN commit r20514.
2017-11-24 22:38:03 +00:00
446fef2b35 Delete FALLBACK_CIV "athen" and related code in rmgen/, refs #4034.
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.
2017-11-24 21:01:12 +00:00
9687a7af1a AIManager: loads only the used templates when starting (or deserializing) a game
Discussed with leper

Differential Revision: https://code.wildfiregames.com/D1049
This was SVN commit r20509.
2017-11-24 19:13:28 +00:00
4275a8a33c Unify two rmgen and GUI JSON file loading script functions, refs #4868.
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.
2017-11-24 17:19:16 +00:00
7a17a3152c Pass the size in meters of a terrain grid tile from Terrain.h to the rmgen JS code to avoid hardcoding thereof.
Refs #4034, D900
Differential Revision: https://code.wildfiregames.com/D1059
Reviewed By: s0600204
This was SVN commit r20504.
2017-11-23 20:54:48 +00:00
bb
e6dff349bd Fix scrollbare edgy-case and off by 1's in dropdown
Reviewed By: Imarok
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1030
This was SVN commit r20500.
2017-11-21 20:07:23 +00:00
2bde5874a7 fix an inconsistency in 3b6c612975, noticed by leper
This was SVN commit r20486.
2017-11-20 18:30:21 +00:00
3b6c612975 allow the ai to run without loading all templates at startup (not yet enabled).
This was SVN commit r20480.
2017-11-19 19:05:54 +00:00
f60f58d3d6 Use the rangeManager's subdivisions in the obstruction manager shape tests
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.
2017-11-11 11:14:39 +00:00
63e77de94e Use only one coordinate system for locations in the rmgen system.
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.
2017-11-01 22:59:27 +00:00
71a5ebe1c9 Adds a missed initialisation in 7e239f38a3.
This was SVN commit r20382.
2017-10-30 19:32:16 +00:00
7d1f56e617 Migrate to premake5, fixes #3729.
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.
2017-10-30 13:52:05 +00:00
7e239f38a3 Adds a wireframe mode to the water rendering.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D769
This was SVN commit r20378.
2017-10-30 00:02:29 +00:00
38d09ce35c Adds a perspective matrix, refracts a matrix projection setup to prepare for an isometric view.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D971
This was SVN commit r20377.
2017-10-29 23:41:59 +00:00
7b93690c76 Fix few typos found with the Debian lintian tool.
Differential Revision: https://code.wildfiregames.com/D973
Differential Revision: https://code.wildfiregames.com/D974
Differential Revision: https://code.wildfiregames.com/D975
Patch By: LudovicRousseau
Reviewed By: Dunedan, bb
This was SVN commit r20369.
2017-10-28 22:34:57 +00:00
c136848b74 Fix lineendings of new files and the ones in source/ that didn't receive the eol property yet.
To confirm, use svn diff -r 20355:20356 -x "-w --ignore-eol-style"
--ignore-properties  | less

This was SVN commit r20356.
2017-10-26 17:03:29 +00:00
66a357f286 The server should choose the guid
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D943
This was SVN commit r20341.
2017-10-24 22:05:24 +00:00
67e27ed7ea Atlas: Cleanup horizontal alignment flags being ignored, fix warnings on a start.
Fix #3824
Patch by: Clockwork-Muse.
Reviewed by: vladislavbelov.
Differential Revision: https://code.wildfiregames.com/D824
This was SVN commit r20327.
2017-10-22 20:09:28 +00:00
ad7d7ec1e9 Fix a disabled template manager test.
Fix #4522
Patch by: Sandarac.
Reviewed by: elexis.
Differential Revision: https://code.wildfiregames.com/D968
This was SVN commit r20326.
2017-10-22 15:39:50 +00:00
5f0a0fbbef Add id for IQ stanzas
Patch by: Dunedan
Differential Revision: https://code.wildfiregames.com/D899
This was SVN commit r20321.
2017-10-21 14:11:25 +00:00
bb
5b72870745 Enlarge default sidebar size, so everything is visible by default
Accepted By: elexis
Differential Revision: https://code.wildfiregames.com/D855
This was SVN commit r20305.
2017-10-16 13:07:07 +00:00
8dc6ed427d Fix string format of the JS test assertion failure following 7c2e9027c2 (cxxtest expects a char* instead of a std::wstring, so newlines were printed as \n characters).
Differential Revision: https://code.wildfiregames.com/D952
Fixes #4807

This was SVN commit r20292.
2017-10-13 21:56:45 +00:00
49b7d6fb95 Test integer validation.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D947
This was SVN commit r20274.
2017-10-09 07:00:31 +00:00
b5e3b83c9e Add a TerritoryDecayManager component to update territoryMap with the blinking state when territories are recomputed. That's needed by the AI which was up to now not aware of blinking cells.
Differential Revision: https://code.wildfiregames.com/D910
This was SVN commit r20268.
2017-10-07 08:42:39 +00:00
1fcdc3d7f4 Deepfreeze the map settings object (created from g_GameAttributes.settings by the gamesetup extending the map JSON data) to prevent random map scripts from unintentionally modifying that, refs #4257.
This was SVN commit r20265.
2017-10-06 18:53:24 +00:00
35af7390c0 Fix Hierarchical Pathfinder out of bounds bug
Patch by temple

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D926
This was SVN commit r20256.
2017-10-02 17:44:23 +00:00
7a5c5100c0 Allow command line options to start with - or --
Reviewed by: mimo
Differential Revision: https://code.wildfiregames.com/D883
This was SVN commit r20249.
2017-09-30 16:12:18 +00:00
8629b83ed9 Remove unneeded include.
That was a leftover from a previous iteration of the code.

This was SVN commit r20247.
2017-09-30 15:29:13 +00:00
84674911cc Switch back to an unplaceable filter for templates.
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.
2017-09-30 15:22:51 +00:00
ff7511d9fc Move special_filter/ templates to special/filter/.
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.
2017-09-30 07:14:35 +00:00
b1d71bfb43 Add a new function to emit a sound from a position not attached to an entity. Use it to improve the attack impact sound code and allow to emit that sound even if the attacker died meanwhile. Use the sound provided by Pureon for catapult. Fix #4779.
Patch By: Mate-86
Differential Revision: https://code.wildfiregames.com/D921
This was SVN commit r20236.
2017-09-28 19:26:07 +00:00
1c47c5ad44 Rename cmpPosition's IsFloating to CanFloat.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D916
This was SVN commit r20201.
2017-09-18 09:54:54 +00:00
6ecba5025b Add test for height and water logic in Position component. Refs 38cca12ec6.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D915
This was SVN commit r20199.
2017-09-18 08:46:11 +00:00
38cca12ec6 Add float depth support to cmpPosition.
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.
2017-09-18 03:55:33 +00:00
b3db71aa63 Fix an issue with tests. Allow to mock several components for the system entity. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D848
This was SVN commit r20194.
2017-09-17 07:06:09 +00:00
455ab4b9e2 Fix some format specifiers in debug strings. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D909
This was SVN commit r20190.
2017-09-16 15:28:01 +00:00
189da09a7e Make FromJSProperty actually part of ScriptInterface.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D876
This was SVN commit r20179.
2017-09-12 22:52:15 +00:00
2534010d0f Fix build without precompiled headers.
Refs 21f69ef574.

This was SVN commit r20177.
2017-09-12 22:18:39 +00:00
486aec18d4 Move Main ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20172.
2017-09-12 03:11:33 +00:00
d6cb9c845b Move Debugging ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20171.
2017-09-12 02:25:28 +00:00
921c5515a6 Move Simulation GUI ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20170.
2017-09-12 01:53:46 +00:00
5f8be8e0c6 Move Game ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20169.
2017-09-12 01:38:46 +00:00
fa54a8cd65 Move GUI Manager ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20168.
2017-09-12 00:54:49 +00:00
21f69ef574 Move networking ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20167.
2017-09-12 00:29:10 +00:00
0e3a6d811c Move SavedGame ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20166.
2017-09-11 23:22:28 +00:00
f1cc54cc18 Move GameView ScriptFunctions to its JS Interface, refs #4772.
Use early returns as initialization checks.

This was SVN commit r20165.
2017-09-11 23:03:27 +00:00
4d931b57e9 Move ReadJSONFile and WriteJSONFile GUI ScriptFunctions that only handle VFS paths to the VFS JS Interface.
This was SVN commit r20164.
2017-09-11 22:21:34 +00:00
e69a0fb9db Remove unused clumsy JS GUI ScriptFunctions debug timer from ed7b4b5fca.
GetMicroseconds from 7a91d330d3 provides microsecond precise timing.

Refs #4772.

This was SVN commit r20163.
2017-09-11 22:08:54 +00:00
ab7089ad61 Command line option for pid+timestamp in OOS dump, mainlog and interestinglog
Reviewed by: elexis Fixes #3339
Differential Revision: https://code.wildfiregames.com/D51
This was SVN commit r20141.
2017-09-09 13:16:05 +00:00
1cdc8f1356 Mark simulation component template and entity properties as read-only in simulation tests (as they are in actual games).
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/D871
Fixes #4759
setup.js and setup_test.js Reviewed By: leper

This was SVN commit r20134.
2017-09-08 04:22:53 +00:00
eb4e66aab3 Move VFS GUI script function registration to its interface file.
This was SVN commit r20133.
2017-09-08 04:01:26 +00:00
871ed04521 Move biome definitions to JSON and JS files, so that mods can easily remove or add new biomes, refs cc0d4f25da.
Move environment biome constants from JS to JSON.

This was SVN commit r20129.
2017-09-08 02:15:54 +00:00
e95f4e9744 Unify deepcopy and clone.
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.
2017-09-06 20:58:27 +00:00
38865845d3 Stop using postfix increment in a few places.
Pointed out by cppcheck.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D414
This was SVN commit r20113.
2017-09-04 22:00:04 +00:00
9cb0a60d73 Deepfreeze Aura, Technology and Resource Templates, Simulation states, GameAttributes and few other JS objects.
This reveals unintentional modifications to these objects which would
most often imply hidden bugs.

Differential Revision: https://code.wildfiregames.com/D829
Fixes #4257
Refs #3647

This was SVN commit r20100.
2017-09-03 16:37:09 +00:00
1b47451d32 Add deepfreeze function to recursively mark JS Objects as read-only.
Refs #4257, D829
Proofread By: leper
This was SVN commit r20099.
2017-09-03 12:50:45 +00:00
5c01b50ca4 Add FALLTHROUGH, which in the best case is just [[fallthrough]].
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.
2017-09-01 20:04:53 +00:00
7a157faf3c Allow the GUI to subscribe to text edit events to redeem three workarounds in the options page.
Differential Revision: https://code.wildfiregames.com/D860
Refs #2451, #3511, 5c61f68600 (registerChanges), 7fa2962c45
(onMouseLeave), e909567004 (onPress)
Reviewed By: Vladislav
This was SVN commit r20091.
2017-09-01 12:06:18 +00:00
2cb6139761 Fix typo in f8d53d8f7b / D786 and some whitespace in CInput.cpp
This was SVN commit r20088.
2017-09-01 01:51:48 +00:00
6ed9017253 fix typo in LongPathfinder
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D847
This was SVN commit r20082.
2017-08-30 16:41:10 +00:00
a5c60619e2 Input GUI object cleanup.
Remove redundant if-statement following 5593f573f4 as reported by
Vladislav.
Use switch-statement in ManuallyHandleEvent.

This was SVN commit r20078.
2017-08-30 12:01:17 +00:00
ee38f0db37 Implement readonly Input GUI objects and use it in the file location indicator in the replay menu,
so that the user can copy the file path.

Fixes #4225
Refs D763
Patch By: Vladislav
This was SVN commit r20075.
2017-08-29 23:53:23 +00:00
23118ba847 Split the Input GUI object key processing into two methods (methods changing the text and methods not changing it).
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.
2017-08-29 23:29:29 +00:00
e8dfde9ba6 Display previously received lobby chat messages when returning from the gamesetup.
Differential Revision: https://code.wildfiregames.com/D819
Fixes #3306
Patch By: fpre / ffffffff
This was SVN commit r20070.
2017-08-29 16:04:45 +00:00
0ceeaf921b Fix typo in 0940db3fc0 / D835 reported by gameboy.
Reviewed By: Vladislav
This was SVN commit r20069.
2017-08-29 12:22:31 +00:00
27d99765bb Add an icon to pyrogenesis' application window
Tested By: Imarok (Windows, Ubuntu w. Gnome), s0600204 (Arch w. Xfce),
ffffffff (Kubuntu w. KDE)
Reviewed By: ffffffff, s0600204
Differential Revision: https://code.wildfiregames.com/D768
Trac Tickets: #4363

This was SVN commit r20067.
2017-08-28 21:56:54 +00:00
0940db3fc0 XmppClient cleanup.
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.
2017-08-28 17:47:43 +00:00
1b44946078 Replace deprecated jsval with JS::Value.
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.
2017-08-28 10:27:36 +00:00
bb
565abd5f1b Fix directory for Atlas help from a93d260643
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.
2017-08-27 19:32:54 +00:00
bb
62c9c6d7fc Add scrollbars to all tabs in Atlas.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D793
This was SVN commit r20058.
2017-08-27 18:47:39 +00:00
eb70d83b67 Fix rallypoint color after deserialization following 505a10cef6.
Differential Revision: https://code.wildfiregames.com/D826
Refs #4618, D623

This was SVN commit r20049.
2017-08-27 16:05:20 +00:00
16b976fc35 Remove unneeded GetMucMessageCount from the XmppClient.
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.
2017-08-25 18:51:26 +00:00
ce580f0de0 Always delete CMapReader. Patch by Sandarac. Fixes #4154.
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.
2017-08-25 00:37:48 +00:00
f27efac053 Enhance lobby / XMPP timestamp parsing documentation.
Refs #3832, 9a5e1ddedb / D760, 6141c5c4fa / D514
Reviewed By: leper
This was SVN commit r20032.
2017-08-24 20:57:21 +00:00
9defd11440 Pass ScriptInterface as a const ref where possible.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
7970c3dc54 Pass a const reference, if someone wants to modify it they should use the global directly.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D738
This was SVN commit r20027.
2017-08-23 23:52:32 +00:00
a93d260643 Add help button to Atlas with a link to the Manual and bugtracker.
Differential Revision: https://code.wildfiregames.com/D794
Patch By: Vladislav
This was SVN commit r20021.
2017-08-21 23:32:29 +00:00
1ddd24bb8c Remove unused Renderer function from 12e2428495.
Refs #2137
Reviewed By: Vladislav
This was SVN commit r20019.
2017-08-21 17:05:45 +00:00
6f9bf55ac5 Change the shadow map quality without restarting the match.
Differential Revision: https://code.wildfiregames.com/D804
Refs #4351
Patch By: Vladislav
This was SVN commit r20011.
2017-08-21 01:10:56 +00:00
04f2209b50 Rename WaterUgly setting to WaterEffects in order to remove the invertedboolean workaround of the options page.
Differential Revision: https://code.wildfiregames.com/D815
Refs #3737
Tested By: Stan
This was SVN commit r20010.
2017-08-21 00:09:25 +00:00
8df36bace4 Shadow map quality option.
Differential Revision: https://code.wildfiregames.com/D745
Fixes #4351
Refs #743
Patch By: Vladislav
This was SVN commit r20001.
2017-08-19 12:46:05 +00:00
cb18830a81 Remove CinemaManager input handler to allow user interaction on other GUI pages like message boxes and possibly few selected hotkeys.
Disable gameview/camera hotkeys while cinematic paths are playing.

Differential Revision: https://code.wildfiregames.com/D697
Refs #3301, #3814, 89aef0b6eb
Reviewed By: Vladislav
This was SVN commit r19980.
2017-08-12 10:32:07 +00:00
316a8848a0 Ignore few Ownership changes in the Selectable and RallyPointRenderer component.
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.
2017-08-11 20:05:03 +00:00
00e7d49368 Profile Footprint calls that can easily consume 90% of the simtime on a turn ("sunken ship lag").
Differential Revision: https://code.wildfiregames.com/D778
Refs #4713
Reviewed By: Vladislav
This was SVN commit r19973.
2017-08-11 18:08:30 +00:00
343ec21e75 Update the color of the selection ring, rallypoints and territory outline when the playercolor is changed in atlas.
Merge duplicate Selectable component playercolor code.

Differential Revision: https://code.wildfiregames.com/D687
Fixes #4643
Refs D623
Patch in cooperation with: Stan

This was SVN commit r19965.
2017-08-09 11:19:14 +00:00
3d0bfc7e1b Forgotten years replacement in 3a3bcca0c5.
This was SVN commit r19962.
2017-08-09 07:11:53 +00:00
3a3bcca0c5 Refactor the code for cutting a circle into chords for textured line overlay in Selectable component. Don't compute useless arccos and avoid compound rounding errors. Reviewed by Itms.
Differential Revision: https://code.wildfiregames.com/D673
This was SVN commit r19959.
2017-08-08 17:48:44 +00:00
505a10cef6 Display rallypoints in the playercolor instead of plain blue.
Differential Revision: https://code.wildfiregames.com/D623
Fixes #4618
Patch By: Stan
This was SVN commit r19957.
2017-08-08 12:48:57 +00:00
37c2f18b9e Add AI engine function for template loading
Partial commit of https://code.wildfiregames.com/D639, taken from
Sandarac patch

Reviewed by mimo

This was SVN commit r19951.
2017-08-07 19:35:43 +00:00
9a5e1ddedb Fix BSD and OSX build that don't provide the AT&T version of timezone used by 6141c5c4fa. Refs #3832, D514.
Mostly reviewed by: leper
Tested on Windows by: Stan
This was SVN commit r19947.
2017-08-07 09:56:31 +00:00
9641d0cdb0 Fix typo in 39fcd1d031 reported by Imarok.
This was SVN commit r19941.
2017-07-31 16:33:14 +00:00
00fafda955 Stop copying the territory grid when recomputing the texture.
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.
2017-07-30 23:37:05 +00:00
98d7763765 Remove code that doesn't do anything.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D743
This was SVN commit r19933.
2017-07-29 23:27:28 +00:00
5ab426d621 Remove commented out code.
Reviewed By: Sandarac
Differential Revision: https://code.wildfiregames.com/D742
This was SVN commit r19932.
2017-07-29 23:27:14 +00:00
781cec163e Remove CTerritoryManager pointer from CWorld, a relic from before simulation2.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D731
This was SVN commit r19931.
2017-07-29 23:27:02 +00:00
27e5c5b25a Mark a few functions const.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D499
This was SVN commit r19930.
2017-07-29 23:26:44 +00:00
3fca871fd6 Take gui.scale into account when repositioning tooltips
Patch by: joskar
Differential Revision: https://code.wildfiregames.com/D749
This was SVN commit r19928.
2017-07-29 18:30:59 +00:00
99b0362edf Bump version number to Alpha 23.
Differential Revision: https://code.wildfiregames.com/D758
Reviewed By: fatherbushido
This was SVN commit r19923.
2017-07-29 16:36:55 +00:00
d56692d9e1 Rewrite the pathfinder dirtiness information system.
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.
2017-07-14 10:09:32 +00:00
918a693f0f Update the list of bundled languages for A22.
This was SVN commit r19913.
2017-07-12 13:56:28 +00:00
53eaef0746 Don't change the copyright headers of other software groups, as reported by leper.
Refs 43137fef3f / D716

This was SVN commit r19907.
2017-07-10 21:53:47 +00:00
43137fef3f Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c).
Differential Revision: https://code.wildfiregames.com/D716
Refs 09e974e1cb
Reviewed By: bb
Change in agreement with leper.

This was SVN commit r19899.
2017-07-10 14:26:24 +00:00
d49bf8b1bf Ensure the camera position being above the water level (without smoothing the water level with the terrain).
Differential Revision: https://code.wildfiregames.com/D700
Fixes #3892, D229, D638

This was SVN commit r19896.
2017-07-10 02:16:57 +00:00
a5e253162b Fix undefined macro usage in cppformat.
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.
2017-07-08 00:15:03 +00:00
9aad0137ba Stop using WMI for detecting the sound card, and use OpenAL instead. Delete WMI code altogether now it is unused.
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.
2017-07-06 17:29:49 +00:00
5c6f3505e8 Fix replay cache performance (broken by ea250b3d25). Also remove a TODO fixed by fca844eef6.
Reviewed by elexis.

This was SVN commit r19875.
2017-07-06 16:20:18 +00:00
14e1b79a0f Insert cinematic path nodes after the currently selected node instead of before (so paths are not created in the opposite of the expected order).
Differential Revision: https://code.wildfiregames.com/D656
Refs #3871
Patch By: Vladislav
This was SVN commit r19864.
2017-07-01 15:49:59 +00:00
c67d79d9f3 Recompute water graphics when changing the water level and upon deserialization to fix a graphical (non-simulation) OOS on rejoin.
Differential Revision: https://code.wildfiregames.com/D638
Refs #4596
Contains a fix mentioned by leper.

This was SVN commit r19862.
2017-07-01 04:15:49 +00:00
6f7a5fb773 Allow the JS GUI to subscribe to the window resized event and use it to conditionally update the observer panel (refs D689).
Differential Revision: https://code.wildfiregames.com/D694
Tested By: temple
Proofread By: Vladislav
This was SVN commit r19846.
2017-06-30 00:04:29 +00:00
5e6b502eab Fix dropdown list height after resizing the window (in case there is an item that used wordwrapping before but not after the resize or vice versa).
Differential Revision: https://code.wildfiregames.com/D692
Tested By: temple
Proofread by: Vladislav
Refs #3571

This was SVN commit r19845.
2017-06-29 23:39:12 +00:00
ca2390d70e JS lobby cleanup, fixes and lobby bot performance improvements:
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.
2017-06-29 02:58:04 +00:00
be2b2faa77 Properly apply texture to the last quad of an overlay textured line. Reviewed by vladislavbelov.
Fix #4617.
Differential Revision: https://code.wildfiregames.com/D663
This was SVN commit r19833.
2017-06-26 13:04:21 +00:00
e7ab22286e Fix the replay menu for people with non-latin characters in their username.
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.
2017-06-25 14:54:00 +00:00
47cc447322 Fix OsPath string8 function on Unix to account for characters that aren't covered by ISO-8859-1,
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.
2017-06-25 14:30:26 +00:00
e1b43137fe Fix incompatible value for WaterUgly warning on opening the options screen.
Reviewed by: vladislavbelov, Imarok. Patch by echotangoecho. Fixes:
#4230.
Differential Revision: https://code.wildfiregames.com/D89
This was SVN commit r19822.
2017-06-25 11:13:17 +00:00
abe5d9205a Remove useless file entry in replays list
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D668
This was SVN commit r19814.
2017-06-21 15:43:57 +00:00
ea250b3d25 Don't crash if there is a replay subdirectory without commands.txt following 80635665f7 / D39.
Differential Revision: https://code.wildfiregames.com/D667
Reviewed By: Imarok
This was SVN commit r19813.
2017-06-21 14:44:26 +00:00
6141c5c4fa Correct lobby chat timestamps.
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/D514
Fixes #3832.
Reverts the revert of 1f34a004e5 in 572847ddd4.
Patch By: Josh
Tested By: Itms
This was SVN commit r19801.
2017-06-18 18:48:18 +00:00
d5caf97185 Fix Valgrind complaints in CRenderer by properly intializing some members values introduced in ab30e0d4fb. Refs #3922, #4492. Patch by Sandarac. Reviewed by vladislavbelov.
Differential Revision: https://code.wildfiregames.com/D536
This was SVN commit r19800.
2017-06-18 14:52:54 +00:00
cfd08bbf28 Cinema Path GUI hiding and silhouettes fixes.
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/D631
Fixes #4633
Reviewed By: Vladislav
This was SVN commit r19797.
2017-06-17 14:17:30 +00:00
e6dafe9efc Fix a map exploration OOS on rejoin when starting with territory at the map boundaries.
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/D630
Fixes #4598
Proofread by: Itms
Tested By: Imarok
This was SVN commit r19790.
2017-06-16 19:39:30 +00:00
bedb13ea28 Delete gui/common/functions_utility_error.js.
Move the one function in it that is globally called from the engine to
the other function that is called equally.

This was SVN commit r19781.
2017-06-15 22:44:24 +00:00
860b5bbfce Revert an unfortunate early break introduced in 2527aabd5d, patch by Sandarac.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D641
This was SVN commit r19777.
2017-06-15 17:45:16 +00:00
b94a54b18a Use direct gui.scale instead of reciprocal gui.scale
Patch by Dariost.

Differential Revision: https://code.wildfiregames.com/D328
This was SVN commit r19774.
2017-06-14 17:13:44 +00:00
74512ef01c Remove emptyinit.xml workaround file for atlas introduced in abaea508ac that silenced an engine warning stating that the GUI page doesn't provide a JS init function.
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.
2017-06-13 02:50:41 +00:00
bb3638a9b5 Always set the Seed property from autostarted games, because it is required and used to initialize the RNG of the simulation following 6eaf76d653.
Differential Revision: https://code.wildfiregames.com/D592
Refs #4127, #3965

This was SVN commit r19749.
2017-06-08 14:47:55 +00:00
b19612c31a Fix whitespace and three refs instead of copies in the glooxwrapper/StunClient code identified by leper in 61261d14fc.
This was SVN commit r19741.
2017-06-05 20:44:00 +00:00
2527aabd5d Fix hero selection rings becoming unsaturated when moving. Patch by Sandarac, refs 0a53c5e06a, #2627.
Differential Revision: https://code.wildfiregames.com/D563
This was SVN commit r19732.
2017-06-04 13:04:04 +00:00
51f62818f7 Fix all broken checks for the absent (random-mapgen+simulation) Seed property in the engine, refs #3965.
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.
2017-06-02 15:07:58 +00:00
61261d14fc STUN + XMPP ICE implementation.
Allows lobby players to host games without having to configure their
router.

Differential Revision: https://code.wildfiregames.com/D364
Fixes #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.
2017-06-01 06:33:52 +00:00
77c4e649af Replace hardcoded copies of a C++ simulation constant in JS used to compute the mapsize with a call to a new getter in the C++ interface.
Differential Revision: https://code.wildfiregames.com/D577
Patch By: Sandarac
This was SVN commit r19699.
2017-05-31 16:43:57 +00:00
a7c09a500d That what leper said. Refs 9ff7ec3465, 31d1536e52.
This was SVN commit r19688.
2017-05-29 02:56:34 +00:00
31d1536e52 Optionally allow late observers for buddies only.
Differential Revision: https://code.wildfiregames.com/D549
Fixes #4528
Reviewed By: fpre
This was SVN commit r19685.
2017-05-28 18:05:08 +00:00
d44a407fc4 That what mimo said.
This was SVN commit r19684.
2017-05-28 17:45:17 +00:00
80635665f7 Fix replay menu loading time by using a cache file
Reviewed by: elexis
Fixes #3433
Differential Revision: https://code.wildfiregames.com/D39
This was SVN commit r19674.
2017-05-27 20:17:57 +00:00
3d53614bce Add a script to lint the translations with Dennis.
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.
2017-05-27 12:26:26 +00:00
9ff7ec3465 Scale the cursor according to the GUI scale (HiDPI support).
Differential Revision: https://code.wildfiregames.com/D320
Fixes #3875
Patch By: Dariost
Reviewed By: domdomegg
This was SVN commit r19667.
2017-05-27 09:24:04 +00:00