1
1
forked from 0ad/0ad
Commit Graph

7371 Commits

Author SHA1 Message Date
853e8c0f1e CVector2D: Fix members may not be initialized warnings
Differential Revision: https://code.wildfiregames.com/D2825
This was SVN commit r23784.
2020-06-21 18:21:31 +00:00
ec4f51d928 Fix --without-pch build following ffd2219200
Differential Revision: https://code.wildfiregames.com/D2819
This was SVN commit r23775.
2020-06-14 20:51:21 +00:00
6b2b071ad5 Move LOS to a los helper header and cleanup Grid.h includes.
Changing Grid.h should recompile faster, as it is now included in fewer
TUs.

Differential Revision: https://code.wildfiregames.com/D2784
This was SVN commit r23774.
2020-06-14 20:39:03 +00:00
ffd2219200 Don't overwrite JS error reporting by calling JS_ReportError.
Upstream spidermonkey supports JSNative error reporting by returning an
explicit failure code. This provides a full stacktrace. Calling
JS_ReportError, removed upstream, removes that stacktrace.

Instead, we should simply LOGERROR.

Based on a patch by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2627
This was SVN commit r23773.
2020-06-14 10:34:49 +00:00
4b1a4ef4cf Rework ScriptInterface EnumeratePropertyNames to support non-enumerable properties.
This lets it support the JSClass syntax, introduced for components in
5fb88172a2/D2492, which required a workaround before.
As cleanup, remove the prefix logic which was too specific to be in
ScriptInterface, and use an upstream-compatible API that also does more
of what we want.

Based on a patch by: elexis
Differential Revision: https://code.wildfiregames.com/D2644
This was SVN commit r23771.
2020-06-14 09:49:32 +00:00
939002f0dc RangeManager: Grid for 2D array, enum cleanups.
Range manager has several `std::vector` for fixed-size arrays and 2D
grids. By using proper data structures, the code readability is
improved.
This also moves around the LosVisibility enum.

Comments by: Stan`, nani
Differential Revision: https://code.wildfiregames.com/D2770
This was SVN commit r23769.
2020-06-13 09:05:40 +00:00
6f70a901f8 Remove duplicated call in tile rendering for TerrainOverlay.
Patch By: vinhig
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2811
This was SVN commit r23767.
2020-06-12 20:52:18 +00:00
fd8a47f5d9 Moves calculations of bounds for fixed shadows to a separate function.
Reduces complexity of the SetupFrame function. Fixed shadows were added
in 8e48e1b17e.

This was SVN commit r23766.
2020-06-12 20:09:08 +00:00
06bf3a8739 Adds GLSL shaders of overlay lines.
We were using ARB shaders in GLSL mode for overlay lines (unit
selection, ranges and so on).

Tested By: Freagarach, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2621
This was SVN commit r23765.
2020-06-12 15:39:44 +00:00
5176f848b8 Fixes missing deletion of files in 409c436ae2.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23755.
2020-06-08 22:36:19 +00:00
409c436ae2 Remove obsolete GetVideoMode platform-specifics, replaces by platform-agnostic SDL2`s APIs.
Before and after the commit we don't support multiple displays and HiDPI
properly.

Patch By: linkmauve
Tested By: Angen, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23754.
2020-06-08 17:49:26 +00:00
b62308a301 Fix error in e9361705ae.
The HWDetect changes were not working properly.

Reported by: Nescio
Tested by: Nescio
Differential Revision: https://code.wildfiregames.com/D2799
This was SVN commit r23748.
2020-06-07 20:11:37 +00:00
e9361705ae Refactor HWDetect and rendering options setup.
Remove duplication when setting graphic options by reading the configDB
directly.
Properly protect the ModIO config keys.

Approved By: linkmauve
Refs #5538

Differential Revision: https://code.wildfiregames.com/D1931
This was SVN commit r23747.
2020-06-07 13:16:57 +00:00
7440523ade Enable garrisoning on gates / fix movement of units with visible garrison points (2nd commit)
This is the same commit as 2abd9cead2 / D1418, fixing noted issues.

This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.

De-activate the obstruction of visibly-garrisoned entities, fixing the
2nd issue.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.

Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.

Based on work by temple

Fixes #2679.
Fixes #5151.

Differential Revision: https://code.wildfiregames.com/D2775
This was SVN commit r23731.
2020-06-02 11:40:29 +00:00
c4625b14df Improve the warning message for FromJSValue<CColor> when trying to convert a non-object to CColor.
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D2778
This was SVN commit r23727.
2020-06-01 16:09:28 +00:00
945ac4fc3b Do not change the gamma of the display on startup.
Added in df6fceba62 to (most likely) have some control over brightness,
this conflicted with dimming utilities and would not play nice with
starting 0 A.D. in windowed mode.

If gamma handling were to be reintroduced later, it should only affect
the 0 A.D. window.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1976
This was SVN commit r23722.
2020-06-01 05:12:51 +00:00
531dcf40c3 Revert 0363202a20, 2abd9cead2 and b4144dc2c3
Player-testing has revealed QA issues, so reverting these for now.

Differential Revision: https://code.wildfiregames.com/D2773
This was SVN commit r23714.
2020-05-31 10:06:39 +00:00
2abd9cead2 Enable garrisoning on gates / fix movement of units with visible garrison points
This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.

Remove the block-movement flag from visibly garrisoned entities.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.

Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.

Based on work by temple

Comments by: Freagarach
Tested by: Nescio
Fixes #2679
Fixes #5151

Differential Revision: https://code.wildfiregames.com/D1418
This was SVN commit r23710.
2020-05-30 09:18:33 +00:00
ebd9786268 Add missing cpp files in last commit refs D2503
This was SVN commit r23704.
2020-05-28 18:18:00 +00:00
bb
5cfce692e7 Implement keyDown event
Change HotkeyPress event to be non-repeating (HotkeyDown to replace the
repeating case)
Fix shiftlag
Make toggle hotkeys only respond to the first SDL event.

Many iterations of review by: elexis
Test done by: Imarok
Comments By: vladislav, Stan
Reviewed By: wraitii
Fixes: #5055
Differential Revision: https://code.wildfiregames.com/D1398
This was SVN commit r23701.
2020-05-26 21:47:03 +00:00
892f97743b Fix some cases of units getting stuck.
This fixes an off-by-one error that led to entities sometimes getting
stuck against obstructions.
It also increases the max-range of the short pathfinder to help entities
find their way around corridors and house blocks.

Fixes 2ff8614ce2 (off-by-one error) and reverts the range changes from
32e8ed51aa

Reported By: Freagarach
Fixes #5586 . Refs #5624

Differential Revision: https://code.wildfiregames.com/D2754
This was SVN commit r23699.
2020-05-25 20:13:35 +00:00
Angen
c8e6c05334 Fix gcc warning reported by Imarok after 204e17206b
Introduced in 204e17206b.
Gcc gives warning about missing parenthesis so this patch is adding
them, not changing result of expression.
Fix proposed by Imarok in P206 after report on irc
http://irclogs.wildfiregames.com/2020-05/2020-05-22-QuakeNet-%230ad-dev.log.

Differential Revision: https://code.wildfiregames.com/D2762
Reviewed by: elexis
This was SVN commit r23692.
2020-05-23 12:21:49 +00:00
Angen
204e17206b Update plural_forms.cpp by tinygettext to reflect needs of translators
Some languages like sk in [[SVN:21907]] have changed crucial line with
information about how many plurals language uses and how to calculate
correct one. However in plural_forms this line could not be matched with
implemented functions so as result object with default settings have
been returned what resulted in using only singular for translatePlural
calls.

Affected languages (12):
sk, lt, uk, cs, pl, ro, mk, he, ga, cy, be, br

I am leaving old variants as they can be useful for another languages.

Differential Revision: https://code.wildfiregames.com/D2751
Comments by: wraitii
This was SVN commit r23690.
2020-05-22 20:06:40 +00:00
57636140b5 Fix typo (certifiacte -> certificate) imported from gloox in 0e2adda813, reported by pilino1234 on transifex, relayed via Angen on Phabricator.
This was SVN commit r23685.
2020-05-21 10:15:26 +00:00
c1ddc0c4b9 Internationalise Damage Types and Status Effects using (optional) JSON files.
.json files in simulation/data/template/helpers/damage_types and
status_effects will be used to internationalise damage types and status
effects, as well as share common text.
Fixes the order of damage types being inconsistent.

Add the possibility for i10n xml extractor to set a custom context.

Fixes #4801
Related to D2296.

Featuring work from: Freagarach

Differential Revision: https://code.wildfiregames.com/D2337
This was SVN commit r23681.
2020-05-20 17:26:37 +00:00
c9d9b7be83 macOS build fixes and Jenkins pipelines.
This includes:
- some build fixes
- Jenkins pipelines, in use since January
- a revamped DMG build script, including dmgbuild configuration by Tobbi
and a tweak by norsnor (D2650)

Differential Revision: https://code.wildfiregames.com/D2523
This was SVN commit r23676.
2020-05-17 14:12:53 +00:00
20ea4b1329 Enable preSelectedi actions on the minimap
Quickly tested by: Stan
Differential Revision: https://code.wildfiregames.com/D2728
This was SVN commit r23653.
2020-05-10 14:22:39 +00:00
1ed64439ea IGUIObject ScriptEventi: optional return value for signalling if the event has been handled
Comments by: badosu, elexis
Differential Revision: https://code.wildfiregames.com/D2727
This was SVN commit r23652.
2020-05-10 14:01:00 +00:00
1e1ce27eba Adds offsets to the terrain resize function and adds comments how the resizing works.
Original Patch By: Clockwork-Muse
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2724
This was SVN commit r23639.
2020-05-07 21:46:17 +00:00
Angen
990e3163d8 Do not store empty Garrison tag in map xml files after 8bfb449375
Differential Revision: https://code.wildfiregames.com/D2690
Patch by: Freagarach
Reported on forum:
https://wildfiregames.com/forum/index.php?/topic/27867-tag-in-the-map-xml-file/

8bfb449375 introduced Garrison tag to the xml map files.
In case GarrisonHolder was present, but held no entities, empty tag was
written. This is adding check for emptyness so that behaviour is
prevented.

This was SVN commit r23634.
2020-05-07 16:57:45 +00:00
a4341acaa6 Fixes macOS builds after 76909984b2 because of removed header.
This was SVN commit r23625.
2020-05-05 11:31:19 +00:00
76909984b2 Removes obsolete clipboard, replaces by platform-agnostic SDL2`s APIs. Refs D2476.
Patch By: linkmauve
Tested By: bb, elexis, Stan
This was SVN commit r23624.
2020-05-05 11:18:00 +00:00
2e6aecb210 Fixes FXAA for maps with default effects, FXAA was introduced in 113b1c49b9.
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2712
This was SVN commit r23617.
2020-05-02 22:34:29 +00:00
2489e57d58 Uses EPS to compare Camera quads after 50f70b7be3.
We don't need exact precision in that kind of calculations. Since we use
not fixed floating point numbers and use them only for visual stuff.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2713
This was SVN commit r23608.
2020-04-29 18:41:53 +00:00
ebf0591a8f Skip and warn about globalscripts and random map tests following 077c4f2576 and 0a6db43c83 when testing without public mod present or if the respective folders don't exist.
Differential Revision: https://code.wildfiregames.com/D2645
Reported By: ricotz
Reviewed By: Angen
Comments By: Stan, Freagarach
This was SVN commit r23598.
2020-04-23 12:06:56 +00:00
0ad79096bd Add a C++ interface for CCmpAttack.
This allows Atlas not to rely on eval() to get access to the attack
component.
Add a quick test for the added method.
This fixes the animation speed matching that of the actor instead of the
template.
Remove some dead code after af2abb8cbf
Fixes: #5129
Reviewed by: @Angen
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D2464
This was SVN commit r23592.
2020-04-21 21:44:05 +00:00
ff7ab2fa8f Revert 0916ffbbb1
Summary: Having a mouse event and a hotkey for the same hardware key
turned out to be bad. If the mouse is above a gui element that handles
the middle mouse event and the middle mouse is released, this event will
be consumed by the gui handler of this gui element. Therefore the hotkey
handler does not know that the key was released. If we change that
behaviour typing in input fields would trigger hotkeys. So this seems
unsolvable without adding special handling for the middle mouse case,
which would be ugly.


Fixes: #5695

Differential Revision: https://code.wildfiregames.com/D2700
This was SVN commit r23589.
2020-04-19 12:29:40 +00:00
accf7ade37 Add thread names on Linux (implements debug_SetThreadName), also add the thread name of the UPnP thread.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2479
This was SVN commit r23568.
2020-04-06 20:20:27 +00:00
32a105d6f8 Update cppformat from v0.11.0 to v1.1.0, fixes #5646, refs #3190.
Use the opportunity to rename the lib from cppformat to fmt, refs #4148.

Patch By: adrian
Rebased By: s0600204
Differential Revision: https://code.wildfiregames.com/D2613
This was SVN commit r23562.
2020-04-01 07:29:33 +00:00
c2afb5cdb6 Fix warnings with VS2015 introduced in 800bf0da24
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2394
This was SVN commit r23531.
2020-03-15 16:13:51 +00:00
Angen
8bfb449375 Support garrisoned enitites defined in map files.
This is adding support to handle garrisoned entities defined in map
files by game engine and atlas allowing future extension for atlas ui
and solving recreation of entites on init in D1958. Also solving
deepfreeze described in D2562.

Differential Revision; https://code.wildfiregames.com/D2597
Ticket: #3008
Patch by: Freagarach
Comments by: elexis
This was SVN commit r23529.
2020-03-15 13:54:50 +00:00
8be20790b5 Check for missing selection textures and missing range overlay textures
Refs: D2618

This was SVN commit r23520.
2020-03-07 11:06:51 +00:00
Angen
0b8aa7eb5a Fix GetTerritoryPercentage when changing number of players
Check for player being out of bounds after m_TerritoryCellCounts may be
recomputed.

Differential Revision: https://code.wildfiregames.com/D2046
Reviewed by: @Stan
This was SVN commit r23510.
2020-02-23 18:24:31 +00:00
b4da3388ec Should have waited for the bears
refs D1752
refs 0916ffbbb1

This was SVN commit r23507.
2020-02-17 19:23:42 +00:00
0916ffbbb1 Add GUI events for middle mouse click
Summary: Add gui events for middle mouse click

Differential Revision: https://code.wildfiregames.com/D1752
This was SVN commit r23505.
2020-02-17 18:16:58 +00:00
Angen
0535eb9b92 Fix formationmember not leaving walking state if offset cannot be reached
Fail movement for formationmember when cannot find path to destination
and formationcontroller is not moving so formationmember will enter idle
state or follow next command relying on member stopping movement first.

Introduced in a1dc9cadd8.

Differentail Revision: https://code.wildfiregames.com/D2438

This was SVN commit r23496.
2020-02-13 19:44:03 +00:00
Angen
a3a5b2fd08 Simplify conditions in SetAnimation
Introduced in d3f57744d9.
There are 2 mane cases when entity cannot play animation.
1st there are not bones
2nd animation is not valid

These conditions are merged into one.

Differential Revision: https://code.wildfiregames.com/D2416
Reviewed by: @Stan
This was SVN commit r23495.
2020-02-13 19:24:08 +00:00
0dff6940f7 Implement a FixedVector2D::CompareLengthSquared function to provide a more performant alternative to CompareLength.
Avoids computing the square of the compared value every call.

Differential Revision: https://code.wildfiregames.com/D2058
Reviewed By: Vladislav
This was SVN commit r23489.
2020-02-09 21:00:43 +00:00
113b1c49b9 Adds anti-aliasing option with FXAA algorithm.
Differential Revision: https://code.wildfiregames.com/D2537
This was SVN commit r23484.
2020-02-05 21:53:10 +00:00
00989a6560 Uses fixed-function pipeline functions only in FFP mode.
Differential Revision: https://code.wildfiregames.com/D2619
This was SVN commit r23481.
2020-02-05 14:00:52 +00:00
36883f2832 Renames RenderTerrain to RenderTerrainFixed to follow its implementation.
RenderTerrainShader was added in d295dacb9b.

This was SVN commit r23479.
2020-02-04 23:16:30 +00:00
b42ebe99f5 Fixes commented block introduced in ecc7d2913e.
Noticed By: Stan
This was SVN commit r23463.
2020-01-29 23:44:14 +00:00
ecc7d2913e Moves GL error check after SwapBuffers to decrease a possible synchronization during rendering process.
Comments By: Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2600
This was SVN commit r23462.
2020-01-29 22:03:44 +00:00
936cf78ac1 Adds tests for terrain resize, it helps to describe the exact behavior of height preserving.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D2604
This was SVN commit r23457.
2020-01-29 16:01:25 +00:00
0a6db43c83 Support random map script tests, fixes #4827.
Differential Revision: https://code.wildfiregames.com/D2085
Comments By: wraitii
This was SVN commit r23455.
2020-01-29 00:30:07 +00:00
f98cbb290a Support GUI script includes in included XML files to further decoupling of GUI page contents, refs #5387.
Differential Revision: https://code.wildfiregames.com/D2599
Comment By: Stan, Vladislav
This was SVN commit r23452.
2020-01-28 01:06:34 +00:00
95b13cda13 Adds const to Material and CShaderProgram::Binding methods, removes a redundant variable from ModelRenderer
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2598
This was SVN commit r23445.
2020-01-26 21:32:12 +00:00
ccea97670e CSlider inherits IGUIButtonBehavior to gains button sounds, press/release events, duplication removal, continuation of sliding if the object is not hovered while the button is still pressed, refs #2593, c016a74309/D325, 359df88f1a/D1622.
Use the events to fix jittering of the gamesetup slider in
multiplayermode, refs 352d4ea78f/D2571.

Differential Revision: https://code.wildfiregames.com/D2592
Reviewed By: nani
Comments By: Vladislav
This was SVN commit r23435.
2020-01-24 00:56:51 +00:00
c50a621cea Disable Quicksave during multiplayer, since the feature is not implemented and triggering it can crash the turnmanager.
Differential Revision: https://code.wildfiregames.com/D2584
Comments By: Stan
This was SVN commit r23429.
2020-01-22 14:05:17 +00:00
365e6c58e8 Removes unused gfx::GetMonitorSize function
GetMonitorSize was added in 5b5726ed4d. Its usage wasn't added. We don't
need to have the custom implementation of the function, since SDL2 can
do this. Also it doesn't make sense to get the default monitor size in
multi-monitor environments since the application window might be located
on each of them.

Patch By: linkmauve
This was SVN commit r23426.
2020-01-20 21:54:31 +00:00
421124d486 Removes unused MemorySizeMiB. Refs D2476.
We don't need to account #2145 anymore, since we dropped SDL1. SDL2
doesn't have SDL_GetVideoInfo. We might use OpenGL extensions like
GL_ATI_meminfo, GLX_MESA_query_renderer or GL_NVX_gpu_memory_info.
But they aren't spreaded very well. Also VRAM size isn't so useful for
us, since OpenGL driver can swap memory pages when it needs to.

Patch By: linkmauve
This was SVN commit r23425.
2020-01-20 21:24:09 +00:00
32b52f9f67 Saves sidebar/bottombar width/height between Atlas sessions
Tested By: Nescio, Stan
Differential Revision: https://code.wildfiregames.com/D2583
This was SVN commit r23424.
2020-01-20 20:58:17 +00:00
d3328f9358 Adds non-strict search to the Atlas entity list
Tested By: Nescio, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2542
This was SVN commit r23423.
2020-01-20 20:42:54 +00:00
02f39840c2 Show an error message instead of triggering a debug breakpoint if a GUI page attempts to include a directory or file from an invalid path.
Differential Revision: https://code.wildfiregames.com/D2363
Patch By: nani
This was SVN commit r23420.
2020-01-20 09:58:03 +00:00
Angen
d33f1c7321 Remove not needed checks and code for VS2015 [VS2013 -> VS2015]
Some pragma warnings are not more needed for VS2015 compilation this
removes them.
Removing some specific code for older version than VS2015.
Forcing build to fail if compiling with VS older than VS2015.

Differential Revision: https://code.wildfiregames.com/D1396
Reviewed by: @Itms
This was SVN commit r23416.
2020-01-19 12:43:41 +00:00
7c72cb7bb9 Reports SDL builtin and runtime versions and video backend in hwdetect report.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2485
This was SVN commit r23412.
2020-01-18 16:45:50 +00:00
1750b0b34c Fixes GLES mode builds on Mesa and running on Intel Iris drivers.
Patch By: linkmauve
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2448
This was SVN commit r23410.
2020-01-17 21:13:51 +00:00
df314f2974 Refactors Preprocessor testing and adds more tests
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D2574
This was SVN commit r23405.
2020-01-16 00:02:22 +00:00
215447a761 Upgrade the Ogre GLSL Preprocessor
Add #elif support and some fixes.

Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2456
This was SVN commit r23404.
2020-01-15 18:20:36 +00:00
eafd44cfc5 Remove counterproductive lowercasing of GUI ScriptEvent names, refs #127.
a8f48ff7e0 introduced XeroXMB lowercasing of element and attribute names
as a feature.
cf9d8b9797, 4d390f501c, dda6268466 added bugfixes and TODOs because of
that.
f76d0ffdc6, 44fe226dd2 removed the XeroXMB lowercase feature.
This patch removes the lowercasing GUI bugfixes that don't fix any bug
anymore while increasing code complexity and lowering performance
(string copies).

Do not send mouse coordinates objects for events that do not relate to
the mouse.

Store event names in static const members to:
(1) improve performance, ensuring that the CStr is not reconstructed
every call,
(2) obtain compile errors when misspelling event names,
(3) allow reuse of the strings in inherited and friend classes.

Differential Revision: https://code.wildfiregames.com/D2445
Comments by Matei, Philip on 2006-03-11-QuakeNet-#wfg-Meeting-0126.log
and 2006-06-24-QuakeNet-#wfg-Meeting-0139.log

This was SVN commit r23403.
2020-01-15 16:00:37 +00:00
49415f8716 Splits debug display of frustums for an easier debugging of a culling and shadows
This was SVN commit r23395.
2020-01-14 23:51:29 +00:00
dbb69285a5 Set source and executable character sets to UTF-8 on Windows, removes a platform discrepancy, fixes #5094.
Patch By: Inari
Tested By: Angen
Differential Revision: https://code.wildfiregames.com/D1411
This was SVN commit r23383.
2020-01-12 20:19:56 +00:00
601892a2bb Officially drop support for Visual Studio 2013, which stopped working after 3a839517ce, fixes #5379.
This was SVN commit r23382.
2020-01-12 20:04:22 +00:00
b6300eb417 Reorder rendering passes to decrease a possible driver synchronization
Hack inside the ShadowMap was added in b889826a3d and became outdated in
1866c2d3b7.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2541
This was SVN commit r23370.
2020-01-11 15:25:05 +00:00
bbcd9b34cc Removes obsolete sys_cursor. Refs D2557.
sys_cursor was introduced in 7e1bcd5159 and partially in 5299dcad86.
Usage of sys_cursor was completely removed in 9a2d0f803e. At the moment
we use SDL and GL cursors.

Patch By: linkmauve
Comments By: Stan
This was SVN commit r23364.
2020-01-10 23:45:40 +00:00
604ec667f3 Removes possible copying of CStr in CTerrainTextureEntry and adds const where possible.
The copy returning was introduced in 7577d224a6.

This was SVN commit r23363.
2020-01-10 22:36:22 +00:00
39986f80e1 Adds const to PathfinderPassability where possible.
This was SVN commit r23362.
2020-01-10 20:37:59 +00:00
c3ded34cf7 Improves performance of Atlas terrain elevation by updating the only changed terrain.
Reviewed By: Itms
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2557
This was SVN commit r23361.
2020-01-10 19:54:35 +00:00
8e48e1b17e Adds optional fixed shadows without swimming effect
Fixed shadows have fixed rendering distance. Also they don't have a
swimming (blinking) effect on camera movement/rotation.

Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2465
This was SVN commit r23333.
2020-01-05 22:44:39 +00:00
a8f241da5d Adds snapping to edges for buildings
Allows to place buildings a bit faster and more perfectly aligned. Also
it helps to find a nearest placeable position in some cases.

Reviewed By: elexis
Comments By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D2079
This was SVN commit r23330.
2020-01-05 01:08:05 +00:00
cf7635f57b Remove JSInterface_Lobby IsRankedGame function duplicitous with g_GameAttributes.settings.RatingEnabled && !g_IsReplay, refs #3550, D2483.
This was SVN commit r23329.
2020-01-04 17:10:12 +00:00
df109bd246 Fix XmppClient upon registration or entering wrong password following 2cccd9825d/D2412.
Differential Revision: https://code.wildfiregames.com/D2482
Tested on: clang 9.0.1, Jenkins/VS2015, Jenkins/gcc6

This was SVN commit r23323.
2020-01-02 22:14:14 +00:00
8abc7c051b Include Pyrogenesis.h and os_path.h where needed
These two headers were missing in various places, preventing build in
some cases.

Patch By: linkmauve
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2481
This was SVN commit r23321.
2020-01-02 18:07:40 +00:00
f96f0ec78e Throw JS exceptions instead of C++ breakpoints if lobby JS code calls a JSInterface_Lobby function under an invalid circumstance.
Differential Revision: https://code.wildfiregames.com/D2526
Tested on: clang 9.0.1, Jenkins/gcc6, Jenkins/VS2015, Jenkins/macOS

This was SVN commit r23319.
2020-01-01 21:49:13 +00:00
Angen
5ad75fa580 Precompiled logic update [Windows build]
Nuke HAVE_PCH and use only one macro for PCH logic.
This macro is enabled (=1) or disabled (=0) based on --without-pch and
no_pch parameters in premake5
Visual studio does not more override this logic

Differential Revision: https://code.wildfiregames.com/D1380
Reviewed by: @Itms
This was SVN commit r23314.
2019-12-31 13:58:48 +00:00
cc7071c691 Upgrade NVTT to version 2.1.1, fixes #4549.
Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi,
containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.

The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.

Differential Revision: https://code.wildfiregames.com/D2475
This was SVN commit r23305.
2019-12-29 11:21:33 +00:00
Angen
b1a78ce285 Treat min range in the same manner as max range when computing goal
Problem description:
When unit gets command to move to the range exactly X units from some
point/entity, what means minRange == maxRange, that triggers computing
goal when distance < minRange with result distance(goal, target) >
maxRange, because minRange computation uses clearance even when is
treating target as circle.

Solution:
Do not use clearance when treating target as circle, so computation when
distance < minimum range is done in same way as computation when
distance > maximum range and so computed goal has correct position.

Reported on forum:
https://wildfiregames.com/forum/index.php?/topic/27384-strange-landing-on-the-island-and-unable-to-attack/
Differential Revision: https://code.wildfiregames.com/D2512
Tested by: gameboy
This was SVN commit r23283.
2019-12-26 21:03:15 +00:00
dd1678287d Marks unused arguments in macOS implementation of try_gui_display_error
This was SVN commit r23275.
2019-12-21 14:31:47 +00:00
b276c9b76f Enable hardware S3TC on GLES too by using GL_EXT_texture_compression_s3tc
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2489
This was SVN commit r23274.
2019-12-21 12:12:38 +00:00
e269466f51 Splits CameraController and adds ICameraController interface
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2478
This was SVN commit r23272.
2019-12-21 00:44:18 +00:00
091f3167e0 Use raise() instead of kill() for debug_break()
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2480
This was SVN commit r23271.
2019-12-21 00:30:34 +00:00
d6d6cb0696 Refactors ownership of SOverlayTexturedLine in CCmpRangeOverlayRenderer
Differential Revision: https://code.wildfiregames.com/D2463
This was SVN commit r23270.
2019-12-20 22:33:50 +00:00
0406509823 Merges two camera JS interface functions into the single one.
Differential Revision: https://code.wildfiregames.com/D2467
This was SVN commit r23264.
2019-12-19 23:41:20 +00:00
e1cf1e16b9 Unbind the correct texture slot in SkyManager
Wrong binding pair was introduced in 779a33ee30.

Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2487
This was SVN commit r23263.
2019-12-19 21:41:01 +00:00
4171d62d1b Workaround for L3 cache detection of Ryzen 3000
This code is planned to get refactored or removed anyway, so just do a
cheap workaround.

Reviewed by: Imarok
Fixes: #4360
Differential Revision: https://code.wildfiregames.com/D2353
This was SVN commit r23262.
2019-12-19 16:52:47 +00:00
dd891f6193 Fix User Reporter worker thread always using a full CPU-Thread
Summary:
This bug was introduced in 62dd922bc0.
Fixed by not using the predicate of the `wait` command.
It was wrong and even if it was right it wouldn't be really usefull.

Reviewed by: Angen
Fixes: #5620

Differential Revision: https://code.wildfiregames.com/D2373
This was SVN commit r23259.
2019-12-18 17:19:56 +00:00
b5bac2a2a2 Fixes overlay renderer on fixed render path, it was introduced in 14bfbbf9d4.
This was SVN commit r23247.
2019-12-16 18:45:03 +00:00
b2665437fc Allow calling timer_DisplayClientTotals multiple times.
According to the `timer_DisplayClientTotals` comment 953d2621dd broke
correctness of `clients` after the function call.

Patch By: echotangoecho
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D812
This was SVN commit r23240.
2019-12-14 22:49:44 +00:00
2fa18b1503 Replaces direct Camera member usage by appropriate method call (m_Orientation > GetOrientation()).
This was SVN commit r23234.
2019-12-14 12:56:47 +00:00
df329d1b81 Optimise out of frustum rendering of texture overlays.
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1847
This was SVN commit r23229.
2019-12-10 23:13:37 +00:00
6110d108c1 Removes hard-coded clip planes from water shader.
Differential Revision: https://code.wildfiregames.com/D2443
This was SVN commit r23228.
2019-12-10 21:39:09 +00:00
9391756294 Add a more explicit message when requested animation rig does not match rigged model.
Reviewed By: @Angen
Discussed With: @Alexandermb

Differential Revision: https://code.wildfiregames.com/D2447
This was SVN commit r23225.
2019-12-08 19:50:36 +00:00
Angen
0fa06de9b6 Refactor ColorActivateFastImpl function
Refactor function from 6fbce9c355, making it shorter, cleaner and easier
to read.


Differential Revision: https://code.wildfiregames.com/D2415
This was SVN commit r23220.
2019-12-07 18:17:08 +00:00
Angen
f4562b87b6 Remove duplication of code from WaterManager
Use already defined function ReloadWaterNormalTextures with the same
code.
Fixes the TODO from 2d7d5b446d / aab15123f1

Differential Revision: https://code.wildfiregames.com/D2413
Reviewed By: @vladislavbelov
This was SVN commit r23219.
2019-12-07 15:32:47 +00:00
aef0c3c13a Move Ogre3D GLSL Preprocessor to a third_party folder and restore its original name. Also restore the Wrapper name to reflect what it's wrapping and move it to renderer.
Reviewed by: @Angen
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D2338
This was SVN commit r23215.
2019-12-07 11:48:03 +00:00
Angen
a3941e8cca Fix UnitmotionFlying and implement CMessageMotionUpdate::FromJSVal
In 32e8ed51aa have been changed message from MotionChanged to
MotionUpdate and CMessageMotionUpdate::FromJSVal was not implemented to
reflect changes in message structure.
As a result UnitMotionFlying tries to send MotionChanged message which
not only was renamed, but sending it from js is not supported anymore.
Also reported at this thread:
https://wildfiregames.com/forum/index.php?/topic/27294-cheats-error/

Differential Revision: https://code.wildfiregames.com/D2450
Tested by: @gameboy
Tested on: Jenkins/vs2015, Jenkins/gcc6
Fixes: #5626

This was SVN commit r23208.
2019-12-06 17:36:25 +00:00
5d2c20beb0 Replace boost::unordered_map, boost::unordered_set with std::unordered_map, std::unordered_set to establish consistency.
Replace boost::hash_combine with a lib/hash.h hash_combine performing
the same statement.
Replace inconspicuous global boost hash_value specializations with
std::hash specializations.
No performance difference was observed in three simple MeshManager
measurements.

Remove unused TAG_MASK and h_tag in h_mgr.cpp following 0748c5a75e.
Replace typedef with using keyword and sort header includes.

Differential Revision: https://code.wildfiregames.com/D2441
Tested on: clang  9.0.0, gcc 9.2.0, Jenkins/vs2015, Jenkins/gcc6

This was SVN commit r23191.
2019-11-25 14:30:25 +00:00
52f282a7e1 Move CGUI constructor to the top of its file following 5cc814759f.
Move object type definitions to own file, since CGUI doesn't use the
GUIObject types otherwise and for similarity with GUISettingTypes,
making it slightly easier to maintain and read.

Differential Revision: https://code.wildfiregames.com/D2439
Tested on: clang 9.0.0, Jenkins/vs2015, Jenkins/gcc6

This was SVN commit r23184.
2019-11-24 10:26:48 +00:00
2cccd9825d Rewrite lobby page to use class semantics, add more gamedetails labels, improve performance using batch processing and caching and gain possibility for game creation/player-join/leave events, refs #5387.
Game selection details features:
* Display victory conditions following their sending but missing display
following bffe917914, refs 7b0f6f530c.
* Display the host of the match and the game name in the selected game
details following 61261d14fc, refs D1666.
* Display mods if the mods differ (without having to attempt to join the
game prior) following eca956a513.

Performance features:
* Implement batch message processing in the XmppClient to rebuild GUI
objects only once when receiving backlog or returning from a match.
* Implement Game class to cache gamelist, filter and sorting values, as
they rarely change but are accessed often.
* Cache sprintf objects.

Security fixes:
* Add escapeText in lobby/ to avoid players breaking the lobby for every
participant, supersedes D720, comments by bb.
* Do not hide broadcasted unrecognized chat commands that mods used as
leaking private channels, fixes #5615.

Defect fixes:
* Fix XmppClient.cpp storing unused historic message types resulting in
memory waste and unintentional replay of for instance
disconnect/announcements messages following both e8dfde9ba6/D819 and
6bf74902a7/D2265, refs #3306.
* Fix XmppClient.cpp victoryCondition -> victoryConditions gamesetup.js
change from 6d54ab4c1f/D1240.
* Fix leaderboard/profile page cancel hotkey closing the lobby dialog as
well and removes cancel hotkey note from lobby_panels.xml from
960f2d7c31/D817 since the described issue was fixed by f9b529f2fb/D1701.
* Fix lobby playing menu sound in a running game after having closed the
lobby dialog following introduction in 960f2d7c31/D817.
* Fix GUI on nick change by updating g_Username.
* Update profile panel only with data matching the player requested.

Hack erasure:
* Object semantics make it cheap to add state and cache values, storing
literals in properties while removing globals, adding events while
decoupling components and gaining moddability.
* Erase comments and translation comments stating that this would be
IRC!!, supersedes D1136.
* Introduce Status chat message type to supersede "/special" chat
command + "isSpecial" property from bffe917914 (formerly g_specialKey
e6840f5fca) deluxe hack.
* Introduce System chat message type to supersede system errors
disguising as chat from a mock user called "system".

Code cleanups:
* Move code from XML to JS.
* Move size values from JS to XML, especially following 960f2d7c31/D817
and 7752219cef/D1051.
* Rename "user" to "player".
* Fix lobby/ eslint warnings, refs D2261.
* Remove message.nick emptiness check from 0940db3fc0/D835, since
XEP-0045 dictates that it is non-empty.
* Add translated string for deleted subjects.
* Add TODOs for some evident COList issues, refs #5638.

Differential Revision: https://code.wildfiregames.com/D2412
This was SVN commit r23172.
2019-11-21 13:44:41 +00:00
92cbcf85e5 Rename CProgressBar numeric "caption" setting to "progress" to distinguish it from the Button, Input, Text and Tooltip "caption" setting values that are tag-formatted texts.
Remove TODO question from c4684effb6 since the class updates correctly.

Differential Revision: https://code.wildfiregames.com/D2419
Tested on: clang 9.0.0, Jenkins/gcc6, Jenkins/vs2015

This was SVN commit r23151.
2019-11-12 16:53:19 +00:00
235e238f9d Fix 34ce0f865d resetting the cursor after calling the GUI pages script "init" function, refs #539.
Reset the cursor everytime the GUI page is opened, therefore also when
hotloading.

The init function shall be able to determine a cursor, such as already
present in the loading screen.

Differential Revision: https://code.wildfiregames.com/D2417
Tested on: clang 9.0.0, Jenkins/gcc6, Jenkins/vs2015

This was SVN commit r23149.
2019-11-12 14:43:58 +00:00
6a97c59c67 Change CGUIManager::SendEventToAll to send to all GUI pages.
Notably enables processing of GuiInterface messages when dialogs are
opened.

Differential Revision: https://code.wildfiregames.com/D2408
Tested on: clang 9.0.0, Jenkins/vs2015

This was SVN commit r23138.
2019-11-06 00:30:18 +00:00
570891e362 Fix session quickload taking ownership of frozen objects by providing a clone following 003d588d13/D2302 and a report by minohaka.
Differential Revision: https://code.wildfiregames.com/D2406
Tested on: gcc 9.2.0, Jenkins

This was SVN commit r23136.
2019-11-05 14:24:24 +00:00
f7161ad5c6 Support deleting GUI Object event handlers following af9c336b43, refs #5387.
Differential Revision: https://code.wildfiregames.com/D2395
Reported by: nani
Tested on: gcc 9.2.0, Jenkins/vs2015

This was SVN commit r23103.
2019-10-28 11:35:04 +00:00
197ab42bd2 Remove catch of critical PSERROR_Scripting exceptions in the GUI that is obsolete for the intended case and wrong for the unintended case.
The catch had been introduced in 953fb41c82, seemingly to catch the case
PSERROR_Scripting_LoadFile_OpenFailed from 1e40ed1543 which was removed
in 4b1297b328, refs D2363.
The LoadGlobalScript and LoadGlobalScriptFile functions don't throw
these errors unless that JS code calls broken C++ code throwing that.
In that case catching the error and continuing like nothing happened
leads to subsequent segfaults and similarly severe errors caused by C++,
not XML.

Differential Revision: https://code.wildfiregames.com/D2366
Tested on: clang 9.0.0, gcc 9.2.0, Jenkins/vs2015
Accepted By: nani
This was SVN commit r23068.
2019-10-11 19:30:28 +00:00
a01e68a4ea Don't leak all GUI objects on name ambiguity following 5cc814759f and remove ERROR_GROUP GUI.
Delete CGUI::UpdateObjects and don't recreate the entire object
hierarchy by recursing through the existing one each time when inserting
one GUI Object.
Change CGUI::AddObject to only insert the one relevant pointer into the
map hierarchy, return success value and delete the child upon failed
insertion in the caller instead of leaking it.
Defer GUIM_LOAD and UpdateCachedSize recursion until all XML files
linked in the page XML file were loaded.
Delete related ERROR_TYPE NameAmbiguity, ObjectNeedsName, and unrelated
JSOpenFailed and in consistency with the rest, do the LOGERROR in the
scope where the error occurs.
Delete ERROR_TYPE InvalidSetting from 90f6641c1d unused following
85a622b13a, 1a49ccb294, ERROR_TYPE OperationNeedsGUIObject from
90f6641c1d unused following d3e56f0f57, see also e1014aad3b, refs #128.

This was SVN commit r23067.
2019-10-11 16:20:50 +00:00
8cd9d402fe Correct button hovering following 8190293f8b / D2325, clarify difference between IsMouseOver and IsMouseHovering following 5122b0f906.
Differential Revision: https://code.wildfiregames.com/D2354
Tested on: clang 8.0.1, Jenkins/vs2015

This was SVN commit r23054.
2019-10-05 09:58:31 +00:00
d7ea078583 Removes unused variables after 7f38bef8e1 and 75d9c6293b. Reported by elexis.
This was SVN commit r23046.
2019-10-04 22:06:52 +00:00
e2f0e409f0 Adds containers serialization tests, std::set serialization and movement semantics
Reviewed By: elexis
Tested By: elexis, Freagarach
Differential Revision: https://code.wildfiregames.com/D2352
This was SVN commit r23044.
2019-10-04 21:30:52 +00:00
75d9c6293b Adds projection type to CCamera to control usages of projection dependent properties.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2351
This was SVN commit r23036.
2019-10-03 18:51:40 +00:00
8d2b143cb8 Cleanup Camera related code and uses constant references where possible, fixes #5408.
Patch By: shh
Reviewed By: wraitii
Tested By: Angen
Commented By: Stan, Itms, historic_bruno
Differential Revision: https://code.wildfiregames.com/D1784
This was SVN commit r23034.
2019-10-03 13:20:56 +00:00
a19b14aeb7 Cleanup Camera related code and uses constant references where possible.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2350
This was SVN commit r23033.
2019-10-03 12:58:47 +00:00
7f38bef8e1 Splits Camera control from CGameView to separate file.
Commented By: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2347
This was SVN commit r23031.
2019-10-02 20:55:43 +00:00
28e94c0d96 Cleanup CCmpRallyPointRenderer
Replace std::deque by std::vector
Replace some casts by cpp casts
Move the class and struct declaration to a separate file for clarity.
Fixes db864f10c3 by removing offending function
Refs #5288
Refs D1681

Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1682
This was SVN commit r23029.
2019-10-02 15:01:46 +00:00
6db0f91823 Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders.
Differential Revision: https://code.wildfiregames.com/D2345
Tested on: gcc 9.1.0
Comments By: Vladislav
This was SVN commit r23028.
2019-10-02 09:44:00 +00:00
1cf6c6b63c Moves CSmoothedValue to separate file.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2346
This was SVN commit r23026.
2019-10-01 22:42:54 +00:00
45a18c652d Removes unused methods and hides private member.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2342
This was SVN commit r23025.
2019-10-01 21:11:29 +00:00
32d6d07eda Rename CClientArea to CGUISize, GUIbase.h to CGUISize.h, avoid temporary instances and default value and error duplication.
The name is in accordance with its JS classname, member names and
setting names.

Differential Revision: https://code.wildfiregames.com/D2341
Tested on: clang 8.0.1, Jenkins/vs2015

This was SVN commit r23023.
2019-10-01 15:06:13 +00:00
07cc1ba34c Move GUIbase structs and enums to separate files.
Differential Revision: https://code.wildfiregames.com/D2340
Tested on: clang 8.0.1, Jenkins

This was SVN commit r23022.
2019-10-01 12:46:55 +00:00
8190293f8b Remove virtual inheritance from the codebase, refs 6b51d71c85, e21ebb37f5 e326ebae46.
Remove workaround in 3d07327837 / D2136, the pointer from IGUIObject to
IGUITextOwner that avoided the dynamic_cast.
Have the GUIObject implementing class take responsibility of calling the
virtual methods in the base classes.
Leaves the code in a clean state that can serve as an example for new
GUI object classes, such as D1346, refs #4683.

Differential Revision: https://code.wildfiregames.com/D2325
Comments By: Vladislav on IRC 2019-07-30, 2019-08-22, 2019-09-20-23
Tested on: clang 8.0.1, Jenkins

This was SVN commit r23020.
2019-09-30 14:08:14 +00:00
1679510bb8 Resolve Loader memory leak from 1f1642bfe3.
Use C++11 featured shared_ptr to avoid conditional deletion in multiple
locations.
Drops C compatibility(?) of Loader.h.

Differential Revision: https://code.wildfiregames.com/D2331
Tested on: clang 8.0.1., Jenkins
Comments on IRC #wfg 2005-05-07
Refs 77d3c5d0b5, 5e3b0f06ec, f19d8dafee.

This was SVN commit r23019.
2019-09-30 08:49:00 +00:00
218399bf3d Rename JSInterface_GUITypes to JSInterface_GUISize, refs 8734efca94, 9be8a560a9.
Rename init to RegisterScriptClass.

Differential Revision: https://code.wildfiregames.com/D2339
Tested on: clang 8.0.1., Jenkins/vs2015

This was SVN commit r23018.
2019-09-30 08:19:56 +00:00
52b7fd5cd9 Remove redundant IGUITextOwner::AddText IGUIObject/this argument.
Differential Revision: https://code.wildfiregames.com/D2333
Tested on: clang 8.0.1., Jenkins/vs2015

This was SVN commit r23009.
2019-09-28 11:46:06 +00:00
b097f38a79 Remove little IGUIButtonBehavior::DrawButton duplication.
Differential Revision: https://code.wildfiregames.com/D2332
Tested on: clang 8.0.1., gcc 9.1.0, Jenkins/vs2015

This was SVN commit r23008.
2019-09-28 11:33:58 +00:00
813fc38420 Fix alphabetic sorting induced syntax error in previous, a33fd55e81/D2313, reported by go2die.
This was SVN commit r23006.
2019-09-27 14:08:00 +00:00
a33fd55e81 Change GUI Object Setting values to be members of the IGUIObject inheriting class, rename AddSetting to RegisterSetting.
Improves performance for Draw calls by 3-5% according to a shady
benchmark.
Improves memory layout, since the values are not on the heap anymore but
in the using class.
Reduces complexity of the implementation and increases type safety.
Allows specifying default values at setting value construction time,
refs D2242.
Inspired by Vladislav introducing members that cached GetSetting values
in c016a74309/D325, refs #4039, ee38f0db37/D763, refs 4225,
a1c4c23ce4/D474, D406, which were formerly proposed to be removed in
D2241.

Differential Revision: https://code.wildfiregames.com/D2313
Tested on: clang 8.0.1, gcc 9.1.0, Jenkins vs2015
Comments By: Vladislav
This was SVN commit r23005.
2019-09-27 12:49:59 +00:00
7790fd7d29 Removes duplication of Clamp function.
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1763
This was SVN commit r23002.
2019-09-26 21:14:21 +00:00
fc08fe60ab Support testing rejoins on turn 0, refs #3460, #4242, #5185, #5162, 2bf1dbfd13
Differential Revision: https://code.wildfiregames.com/D1522
This was SVN commit r22998.
2019-09-26 12:09:19 +00:00
0817d5d715 Always inform clients why the server chose to disconnect them, i.e. stop using NDR_UNKNOWN as a disconnect reason when the reason is known and add a LOGWARNING for future authors.
Differential Revision: https://code.wildfiregames.com/D1561
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22996.
2019-09-26 11:36:03 +00:00
00b58fc2ed Fix previous, don't save replay metadata if a multiplayer gamesetup page was opened and closed, refs 35408e7e7e / D2197, refs #5565.
This was SVN commit r22992.
2019-09-25 16:41:14 +00:00
35408e7e7e Save replay metadata for non-visual games too, refs #4577, #5548, fixes #5565.
Remove gui/common/ hack by going through the GUIInterface and fragile
EndGame() hardcoding by saving if and only if a ReplayLogger exists
following 7470e88624, refs #4020.
Refs D2211, D2213.

Differential Revision: https://code.wildfiregames.com/D2197
Based on patch by: irishninja
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22991.
2019-09-25 10:06:12 +00:00
92ad6a61fa Fix OOS introduced by pathfinder threading preparation diff d592bf9cb6
Following d592bf9cb6, paths were computed at the end of turn N, and then
messages were sent at the beginning of turn N+1. However, the path
requests were removed at the end of turn N and so weren't serialised,
and neither were computed paths. This meant rejoiners would OOS when the
game was serialised with pending path results.

To fix this in preparation for threading, the architecture needs to
change slightly so that requests are kept and serialised correctly, and
rejoiners can compute the paths after deserialisation, in order to send
the messages at the beginning of turn N+1.

Fixes #5604

Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2317
This was SVN commit r22979.
2019-09-23 06:38:16 +00:00
b9d413852b Cleanup GUI includes, whitespace, map iterators, nullptr.
Remove TODO comment about m_Children deletion from e21ebb37f5, refs
e05f939fab / D2311.

Differential Revision: https://code.wildfiregames.com/D2321
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22976.
2019-09-22 23:28:25 +00:00
e67f364887 Warn if the derived class and the base class have the same AddSetting call instead of silently ignoring it.
Enabled by f69261d37b (refs d412b2010b / D2314, 7bb0f2ea69 / D2318).
Helps structuring the GUI so that AddSetting and GetSetting are in the
same file, which defragments code and may allow for future optimizations
(setting values as class members for Draw calls), refs D2313.

Differential Revision: https://code.wildfiregames.com/D2320
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22975.
2019-09-22 22:49:20 +00:00
987b36d53c Do not send Reflection and Refraction matrices to shader when not needed
Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1954
This was SVN commit r22971.
2019-09-22 14:56:22 +00:00
077c4f2576 Adds a "properties"-property to resources and let mods be able to prevent resources from being bartered, traded and/or tributed.
Patch By: Freagarach
Comments By: elexis, Stan`, Nescio
Reviewed By: wraitii, Angen
Fixes #4370

Differential Revision: https://code.wildfiregames.com/D1846
This was SVN commit r22970.
2019-09-22 14:53:47 +00:00
7bb0f2ea69 Defragment IGUIButtonBehavior Settings.
Moves the AddSetting sound calls from CButton and CCheckbox to
IGUIButtonBehavior, since the latter is the only class to use them.
Moves ChooseColor from IGUIButtonBehavior to CButton, since that's the
only class to use it and the only class registering the dependent
Settings following b1422137e5 (refs d412b2010b / D2314)

Initialize m_PressedRight in the constructor to prevent undefined
behavior in possible future code following 0d204037b6, refs #1028.
Remove unused soundPath variable following 0e26503cc6 / D2209.

Differential Revision: https://code.wildfiregames.com/D2318
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22969.
2019-09-22 14:53:27 +00:00
d1bcce55db Improve js glue code in D1839/61e3f1ec0d (hotkey state fix) and deal with rebase leftovers.
The code could be improved by using more modern code.

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2295
This was SVN commit r22963.
2019-09-22 07:38:13 +00:00
f69261d37b Remove AddSetting<CStrW>("tooltip") and AddSetting<CStr>("tooltip_style") calls redundant with the ones in the IGUIObject base constructor.
If all redundant calls are removed, the code will be able to warn about
them.

Tested on: clang 8.0.1

This was SVN commit r22958.
2019-09-21 16:13:18 +00:00
d412b2010b Delete unused CCheckbox text setting remains following b1422137e5, refs 0f807c643a.
Differential Revision: https://code.wildfiregames.com/D2314
Tested on: clang 8.0.1., Jenkins

This was SVN commit r22952.
2019-09-21 03:11:18 +00:00