1
0
forked from mirrors/0ad
Commit Graph

20026 Commits

Author SHA1 Message Date
Stan 89fadf8b3a Actually fix band-aid from 40289e4a1a. Missing garrison flags date back from e63a938529 (Stoa, Theater, Sentry Tower)
Fix typo from b0b0495fc9 which caused erratic garrison flag behavior on
the Brit Scout Tower
Reported by: @faction02
Thread:
https://wildfiregames.com/forum/index.php?/topic/26896-ninja-stuff-or-bug/&tab=comments#comment-385787

This was SVN commit r23015.
2019-09-29 13:16:57 +00:00
wraitii db4fabcc4c Fix phase notification accidentally deleted in e16c4c4800
Reported By: elexis
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2336
This was SVN commit r23014.
2019-09-29 08:53:28 +00:00
wraitii 6b29cbac10 Add simple tests for Attacking.
Forgot to 'svn add' in 38b2e37a61

This was SVN commit r23013.
2019-09-29 07:03:09 +00:00
wraitii 38b2e37a61 Fix bonus multiplier issue in 16b452cf91 (multiple attack effects) and consider more entities in EntitiesNearPoint
- the bonus multiplier would self-multiply with every effect, so an
attack with multiple effect would have a broken multiplier.
- EntitiesNearPoint used IID_Resistance, which is now facultative. To
not miss entities, it now returns all entities owned by enemy players.
For GAIA it checks for Health to avoid returning trees.
This means enemy units have higher priority over missed projectiles, but
that should generally be OK.

This also adds simple tests.

Reported By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2322
This was SVN commit r23012.
2019-09-29 06:58:03 +00:00
wraitii 81e084d616 Remove specific macedonian workshop code and template usage now that all civilisations ahve them.
All civilisations were given workships in da973b81f1.

Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2323
This was SVN commit r23011.
2019-09-29 06:42:02 +00:00
elexis 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
elexis 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
elexis 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
elexis 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
vladislavbelov 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
Stan 5d88955e14 Fix sounds fileendings and add distanceless and owner only tags to fit D944
This was SVN commit r23001.
2019-09-26 14:45:28 +00:00
Stan 69381e0489 Fix broken legionnaries introduced in 35dcdb263f
This was SVN commit r23000.
2019-09-26 14:42:13 +00:00
elexis b247e8b830 Chat filter to allow players to only read network or game notifications during the match.
Differential Revision: https://code.wildfiregames.com/D1605
This was SVN commit r22999.
2019-09-26 13:03:40 +00:00
elexis 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
elexis 23543383e3 Display observercount in the lobby gamelist.
Differential Revision: https://code.wildfiregames.com/D284
Based on patch by: fpre, Krinkle
This was SVN commit r22997.
2019-09-26 11:48:33 +00:00
elexis 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
elexis 767c7f5856 Fix alphabetic template order using templatessorter.sh.
This was SVN commit r22995.
2019-09-26 10:07:36 +00:00
elexis 3521218df5 Fix lineendings.
This was SVN commit r22994.
2019-09-26 09:46:01 +00:00
elexis 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
elexis 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
Stan 9425572bb1 Fix projectiles fired from sky / missing cast in Vector3D in b1659e7618. Removes a trailing .0
Reported by: @faction02
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D2326
This was SVN commit r22990.
2019-09-24 14:21:06 +00:00
Stan f06907da02 Fix blood sometimes appearing below cattle, because of a variant having a frequency set to 1. It should only be switched to by code.
This was SVN commit r22987.
2019-09-23 13:58:02 +00:00
Stan ec040fba08 New cattle sounds by @Samulis
Sound repartition suggested by @Samulis

Also reduce the max range of the bull as it looks really weird. They now
cross horns.

Thread:
https://wildfiregames.com/forum/index.php?/topic/26396-cattle-sounds/&tab=comments#comment-385360

This was SVN commit r22986.
2019-09-23 13:57:16 +00:00
elexis aefb75090c Rewrite Savegame page to use class syntax, enabled by bdc6a7d3fd / D2290, refs #5387.
Uses simple event subscription to make the classes independent of each
other.
Removes all globals except two variables and one function (that may be
avoided in the future too).
Allows the reader to focus on the relevant aspect of the implementation
(encapsulation, information hiding) and makes implementation more
modifiable and extensible.

Differential Revision: https://code.wildfiregames.com/D2310
This was SVN commit r22985.
2019-09-23 10:06:29 +00:00
wraitii da973b81f1 Enable workshops for all civilisations.
Also in this patch:
- reorder workshop training queue to ram, boltshooters, stonethrowers,
siege towers
- remove all siege units and technologies from all fortresses
- list champions before heroes in the production queues of fortresses
- update tooltips of fortresses accordingly.

Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1761
This was SVN commit r22984.
2019-09-23 08:34:54 +00:00
wraitii 47671d1987 Fix mistakes in 74897ebc2d
Some files were not completely changed.

This was SVN commit r22983.
2019-09-23 08:17:25 +00:00
wraitii 74897ebc2d Move palisades from other/ to structures/
Following D1881 which introduced a common parent, palisade templates can
be moved:
 - other/palisades_rocks_* to structures/palisades_*
 - other/palisades_*_spike* to structures/palisades_spike*

Map scripts were updated accordingly.

Patch By: Nescio
Reviewed By: wraitii
Refs #4770

Differential Revision: https://code.wildfiregames.com/D2234
This was SVN commit r22982.
2019-09-23 07:48:00 +00:00
wraitii d69da4c948 Fix undefined resource in PetraAI diplomacy manager after D1846/077c4f2576.
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2319
This was SVN commit r22980.
2019-09-23 06:46:40 +00:00
wraitii 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
LordGood 83b7dac3f4 Split ptolemaic house actors into old and new files
This was SVN commit r22977.
2019-09-23 00:58:02 +00:00
elexis 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
elexis 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
Alexandermb cc494ec5df Celtic iron Sheath
This was SVN commit r22973.
2019-09-22 15:24:01 +00:00
Alexandermb 979150283d Enable greaves for some greek cavalry.
This was SVN commit r22972.
2019-09-22 15:23:18 +00:00
wraitii 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
wraitii 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
elexis 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
bb e771ff40ea Use arrow functions in AI filters
Comments By: elexis, wraitii
Differential Revision: https://code.wildfiregames.com/D1883
This was SVN commit r22968.
2019-09-22 14:01:49 +00:00
wraitii db4637f73a Fix issue with D274/e16c4c4800 - modifications are a list of effects, not a single effect
D274 introduced a silent change that modifications would only have one
effect per value-path, which was an unnoticed regression.

Detected following the comments from SonarQube reported here:
e16c4c4800#inline-4214

Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D2315
This was SVN commit r22967.
2019-09-22 12:05:04 +00:00
elexis 31a2dd294e Fix top panel being hidden during pause mode following 702cdbf0c7 / D2292 reported by Freagarach, ValihrAnt, Krinkle et al.
Remove the false misleading default.cfg z value that is always
overwritten by CGUI::Xeromyces_ReadObject, both introduced in
e21ebb37f5.
Remove multiline property since its redundant with the default C++
boolean, making the default style more agnostic of final GUI Object
classes.

Close advanced locale dialog correctly upon cancel following 86c151ebaa
/ D1684.
Don't switch the background image when closing the credits dialog
following bcf2c75513, refs #3744.

This was SVN commit r22966.
2019-09-22 10:51:08 +00:00
wraitii 2678d5e52e Fix broken paths in d1bcce55db
The commit moved files but did not apply the changes.
Further, this sets eol-style native to these files.

Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D2316
This was SVN commit r22965.
2019-09-22 10:11:11 +00:00
wraitii 026ce76e3f Update the fast-actions cheat and AI bonuses to use the modifiers manager
This deletes custom-code and shows how to use this system component for
triggers.

Differential Revision: https://code.wildfiregames.com/D1011
This was SVN commit r22964.
2019-09-22 07:46:29 +00:00
wraitii 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
Alexandermb d96ac8ea24 Gladius sheath.
Fix a typo Transvesal > Transversal

This was SVN commit r22961.
2019-09-21 23:06:37 +00:00
elexis fb65515550 Fix missing replay menu function following loadgame and savegame unification bdc6a7d3fd / D2290.
Refs d64b95b28c, ad1a4d6121

Differential Revision: https://code.wildfiregames.com/D2309
String reviewed by: Nescio
This was SVN commit r22960.
2019-09-21 21:04:15 +00:00
Alexandermb 8fdfbb7cfd Transversal Crested gallic centurion helmet.
Requested by @Wowgetoffyourcelphone

This was SVN commit r22959.
2019-09-21 20:49:12 +00:00
elexis 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
elexis 702cdbf0c7 Remove GUI object setting values z="0", size="0 0 100% 100%", hidden="false" in XML page specifications that are redundant with the default style values.
Remove question by brian in single_details_area.xml from b66d1716e7
which is answered by "because the style set it".
Delete BuildNameText style, because it specifies ghost="true" in both
style and sole object using the style.
Don't touch progressbar and structree styles, because there is more to
clean.

Differential Revision: https://code.wildfiregames.com/D2292
This was SVN commit r22957.
2019-09-21 15:54:25 +00:00
elexis 869a9548a9 Delete duplicate global default style following 1e6614918b.
Excerpt from D2292.

This was SVN commit r22956.
2019-09-21 15:23:05 +00:00
Alexandermb a9d477b269 Replace old illyrian helmet on seleucid infantry archer.
Mentioned by @Stan

This was SVN commit r22955.
2019-09-21 15:09:59 +00:00