1
0
forked from 0ad/0ad
Commit Graph

6667 Commits

Author SHA1 Message Date
7d172a9b1d Consider that the point could be inside the goal area in some PathGoal functions
Reviewed By: wraitii
Comments By: mimo
Differential Revision: https://code.wildfiregames.com/D1089
This was SVN commit r20878.
2018-01-16 02:15:04 +00:00
5c605cf218 Allow the JS GUI to find out if the lobby client is currently disconnected.
Differential Revision: https://code.wildfiregames.com/D1224
Patch By: fpre / ffffffff
Refs #4106, D817

This was SVN commit r20872.
2018-01-15 04:30:33 +00:00
b982e7f510 Fix build on armhf with gcc 7.
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.
2018-01-14 21:18:37 +00:00
8ede017904 Don't crash while in the lobby when receiving an error IQ stanza without an error payload, refs d7121f4f55.
Differential Revision: https://code.wildfiregames.com/D1222
Patch By: Dunedan
This was SVN commit r20868.
2018-01-14 17:48:24 +00:00
bb
5729b49610 Don't early return but update the active query when having no position or when outOfWorld
Based on Patch By: fatherbushido
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1219
Differential Revision: https://code.wildfiregames.com/D704
fixes #4658

This was SVN commit r20845.
2018-01-12 21:01:17 +00:00
bb
891870a554 Stop serializing minimap playercolors
Patch By: temple
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1124
This was SVN commit r20797.
2018-01-07 20:23:04 +00:00
11bcc7c0e7 Solve some issues reported on Transifex, and update translation files
This was SVN commit r20781.
2018-01-07 00:10:14 +00:00
f352d20e17 Support both DateTime formats of XEP-0082 in the lobby, refs #3156, f2c76cc75d, 6141c5c4fa, f27efac053.
Patch By: Dunedan
Fixes #4920.
Differential Revision: https://code.wildfiregames.com/D1197
This was SVN commit r20776.
2018-01-06 16:09:10 +00:00
c90d72deb5 Replace DataTemplateManager simulation component with a globalscript, refs #4868.
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.
2017-12-31 01:02:21 +00:00
d18374bffe Fix ugly font rendering using GL linear interpolation if the UI scale was changed.
Patch By: Dariost
Refs D332

This was SVN commit r20735.
2017-12-30 17:56:07 +00:00
5500a96751 Delete Savegame format version, refs 7064565ff6.
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.
2017-12-30 14:54:13 +00:00
b8216a9164 Let Atlas provide a default AI seed.
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.
2017-12-30 14:02:09 +00:00
7e05d7edc9 Initialize the AIManager AISeed immediately in C++ rather than too late and in JS.
Fixes #4907
Differential Revision: https://code.wildfiregames.com/D1178
Reviewed By: mimo
Refs D1159, f88ee2766e

This was SVN commit r20700.
2017-12-27 16:51:25 +00:00
fb444d4165 Add GetGaiaAndNonGaiaEntities helper function in the RangeManager and use it in Extinct Volcano (D229).
Differential Revision: https://code.wildfiregames.com/D477
Reviewed By: bb
Proposed By: bb
Discussed with: fatherbushido

This was SVN commit r20691.
2017-12-26 22:03:25 +00:00
95c03dcc64 Let the template define the actor used for the projectile. Also let projectiles have an impact animation (such as an explosion).
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.
2017-12-23 09:27:19 +00:00
3319c69d97 Choose AI behavior in gamesetup
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.
2017-12-20 22:02:15 +00:00
571562d7d7 Revert 9c180f660f until there is someone maintaining AI behaviors, refs D746.
This was SVN commit r20654.
2017-12-14 13:31:00 +00:00
c5deda556c Adds a skip for invalid files in the validator
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1140
This was SVN commit r20648.
2017-12-12 20:23:26 +00:00
9c180f660f AI behavior gamesetup setting.
Based On Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D746
Refs #812, #2550

This was SVN commit r20646.
2017-12-12 16:45:09 +00:00
89e339dd16 Remove VFS cache, because it is less effective and less efficient than the OS cache (and partially redundant with higher level application caches).
Patch By: Sandarac
Discussed with: Philip, echotangoecho, Bezerra
Fixes #4072.
Differential Revision: https://code.wildfiregames.com/D587
This was SVN commit r20639.
2017-12-10 17:33:03 +00:00
38d11a6fce Long range pathfinder cleanup
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.
2017-12-10 14:23:16 +00:00
f7aa7ac79e Optimise HierarchicalPathfinder::Update by speeding up the chunk dirtiness check.
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.
2017-12-10 08:59:43 +00:00
5fbb224dc0 Render the range visualization of auras, heal and attack component in a separate RangeOverlayRenderer component instead of abusing Selectable for that.
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.
2017-12-10 02:41:08 +00:00
13ad114dd6 Move selection ring OverlayTexture code from CCmpSelectable::UpdateTexturedLineOverlay to the SOverlayTexturedLine struct in graphics/Overlay.cpp and SimRender in simulation2/helpers/Render.cpp.
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.
2017-12-10 00:19:51 +00:00
53c9e89591 Move EOverlayType and SOverlayDescriptor from the Selectable component to Overlay.h.
Refs #3915, D568
Patch By: Sandarac
Taken from D555
Reviewed By: Vladislav
This was SVN commit r20618.
2017-12-09 19:49:56 +00:00
ae343e8e9d Adds the basic actor/material validator
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1016
This was SVN commit r20615.
2017-12-08 21:40:29 +00:00
32981e6f5e Allow the AI to read JSON simulation files and use the Resources prototype from 52f311da2b for the AI directly.
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.
2017-12-06 20:26:01 +00:00
af03c72f76 Move GetAvailableMods
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1106
This was SVN commit r20591.
2017-12-05 17:17:21 +00:00
fed3fbee5d Expose the same FileExists to JS GUI, simulation and rmgen.
Thus restrict rmgen FileExists from 871ed04521 to rmgen/ and
simulation/.

Refs #4868, 8de5c26540
Differential Revision: https://code.wildfiregames.com/D1104
Same rap as in 0cfe9ab153, 7fda43d14e.

This was SVN commit r20588.
2017-12-05 00:22:03 +00:00
7fda43d14e Expose the same file listing function to JS GUI, simulation and rmgen, refs #4868.
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.
2017-12-04 23:46:55 +00:00
2c8b78ddaa Option to disable fog effects.
Fixes #4626
Patch By: dp304
This was SVN commit r20584.
2017-12-04 15:54:24 +00:00
247bde356c Reload water shaders too when changing shader settings.
Refs #4626
Patch By: dp304
This was SVN commit r20583.
2017-12-04 15:51:20 +00:00
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