1
0
forked from 0ad/0ad
Commit Graph

6686 Commits

Author SHA1 Message Date
d01cb88ac4 Calculate and return correct width in CGUI::GenerateText
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D836
This was SVN commit r21142.
2018-02-07 20:47:10 +00:00
2180862d40 Implement random map script backend to read terrain PMP files created with Atlas, fixes #4816.
Allows developers to set elevation and terrain textures in the map
editor and use that for a random map.

This was SVN commit r21131.
2018-02-06 23:05:58 +00:00
bb
6b88ca6a11 Fix the autostart victoryDuration support, which was broken by 63ca7ad672
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1285
This was SVN commit r21122.
2018-02-06 19:44:05 +00:00
204b04f2d4 Allow random map scripts to load heightmap image files, fixes #5018.
Move the atlas heightmap import code to MapIO.cpp and reuse it.
Implements what 33e3e6c2ab and 69b7f39bf1 wanted to be.

This was SVN commit r21113.
2018-02-05 16:02:00 +00:00
c95901515e Stop claiming that JPEG files are supported for heightmap import following c9cecab0be, refs #2828.
This was SVN commit r21112.
2018-02-05 14:22:16 +00:00
98ebb3bb77 When importing a heightmap image in atlas, don't omit the last vertex of each side of the heightmap! Fixes #5021, refs c9abf6f68c.
(Since there are 4 vertices per tile, there is one more vertex per side
than there are tiles / pixels per side.)

This was SVN commit r21111.
2018-02-05 14:08:46 +00:00
22903b09a6 Set victory conditions for autostart games.
Reviewed By: elexis
Trac Tickets: #5016

Differential Revision: https://code.wildfiregames.com/D1278
This was SVN commit r21108.
2018-02-03 19:39:33 +00:00
7819ea434e Diplomacy Colors
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.
2018-02-03 14:17:31 +00:00
4fe59c141d Fix crash at start in snd_detect(), fixes #4786.
Reviewed By: s0600204, echotangoecho
Differential Revision: https://code.wildfiregames.com/D1254
This was SVN commit r21097.
2018-02-01 18:12:53 +00:00
2bfb580415 Fix non-PCH build by adding an explicit include.
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.
2018-01-30 07:20:49 +00:00
751edb43fc Fix wrong type in 8aaff7fc62 / D1232.
Differential Revision: https://code.wildfiregames.com/D1266
Patch By: Angen
This was SVN commit r21047.
2018-01-28 17:37:55 +00:00
95179c5e46 Don't trigger a NetServerTurnManager debug breakpoint if a modified or unmodified client sends a non-sequential turnnumber.
Disconnect that client.

Refs #3643
Differential Revision: https://code.wildfiregames.com/D1256
Reviewed By: echotangoecho
This was SVN commit r21023.
2018-01-26 23:02:13 +00:00
b0b24a472b Move minimap color deserialization fix out of the gui
Differential Revision: https://code.wildfiregames.com/D1250
Reviewed by: elexis
This was SVN commit r21005.
2018-01-24 19:12:19 +00:00
034124e8d8 Fix range overlay color after deserialization following 5fbb224dc0 / D555, refs #3915.
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.
2018-01-22 06:50:35 +00:00
36fba76a74 Revert unintentional function rename in 40cc3aaa09.
Don't troll OOS-debugging developers with aura ranges rendered in an
invisible color, refs 5fbb224dc0 / D555.

This was SVN commit r20961.
2018-01-22 06:02:52 +00:00
8aaff7fc62 Implement an auto-scroll setting for GUI lists.
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.
2018-01-22 04:45:27 +00:00
340cda5d57 Use obstruction rather than footprint in dock placement
Differential Revision: https://code.wildfiregames.com/D1163
Reviewed by: wraitii
Comments by: mimo, s0600204
Fixes: #4843

This was SVN commit r20954.
2018-01-22 02:34:46 +00:00
d5af005a00 Expose INVALID_PLAYER to the JS simulation and use it instead of -1 for consistency with the C++ counterpart.
This was SVN commit r20953.
2018-01-22 01:02:29 +00:00
dde855f7d5 Use correct distance for determining nearest dropsite
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.
2018-01-21 21:21:21 +00:00
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