Commit Graph

21640 Commits

Author SHA1 Message Date
Freagarach c4ab28cdbe Improve consistency in tutorial and random map texts.
- Combines multi-spaces into one.
- `\u000a` -> `\n`.
- Proper quotation marks instead of programmers quotes.
- A few typos.
- Capitalise classes.

Scenarios and skirmishes are excluded due to checkrefs.pl not being able
to handle proper quotes in XML.

Patch by: @Nescio
Differential revision: D3493
Comments by: @Stan
This was SVN commit r25037.
2021-03-12 06:52:26 +00:00
Freagarach d46d0032ca Clean attack lines in templates.
- Listing all damage types everywhere is not needed anymore, therefore
0-damage lines are purged.
- Trailing zeros are removed from <Attack> node lines (e.g. <MaxRange>,
<Spread>), per @bb.
- Attack nodes in templates that were effectively replaced by all their
children are deleted too.
- Clean up the confusing and haphazard attack situation in the fauna
templates.
- The now obsolete template_unit_fauna_wild_defensive_fox.xml is
deleted.
- All animals got an attack range that's at half their footprint length
+ 1 and an attack <PrepareTime> that's half their <RepeatTime>, for
consistency.

Patch by: @Nescio
Differential revision: D3342
This was SVN commit r25036.
2021-03-12 06:43:47 +00:00
Freagarach 96ab4a2de6 Fix ownership changing assertion with a garrison holder with multiple garrisoned entities.
In lieu of a better solution.

Reverts: 4b951cf4ba

This was SVN commit r25034.
2021-03-11 06:14:13 +00:00
Imarok 7376e43e06 Fix typos in log and warn messages
Patch by: LudovicRousseau
Refs: #6098

Differential Revision: https://code.wildfiregames.com/D3659
Differential Revision: https://code.wildfiregames.com/D3660
This was SVN commit r25033.
2021-03-10 16:50:15 +00:00
Freagarach 4b951cf4ba Handle ownership changes of a garrisoned entity in cmpGarrisonable.
Makes sure GarrisonHolders don't need to needlessly listen to global
ownership changes anymore.
Also fixes dying entities on turret points.

Refs. #6081
Differential revision: D3648
This was SVN commit r25031.
2021-03-08 07:26:09 +00:00
Freagarach d3c3072c83 Give the Garrisonable component the power to set garrisoned on an entity with UnitAI, instead of leaving it to UnitAI.
Since the only way of garrisoning is using `cmpGarrisonable`.
025a00340e introduced the `this.isGarrisoned`-flag, its meaning was
discussed in https://code.wildfiregames.com/D1403.

Refs. #5979, #6081
Differential revision: D2379
Comments by: @elexis, @Stan, @wraitii
This was SVN commit r25030.
2021-03-08 07:19:06 +00:00
Freagarach c310d4afcd Use seperate message to handle skirmish replacements.
Meaning GarrisonHolders won't listen for GlobalEntityRenamed messages
uselessly for the rest of the match after init.

Refs. #6081
Differential revision: D3627
This was SVN commit r25029.
2021-03-08 07:01:17 +00:00
wraitii 637e44cfd7 Hotkey search - lowercase comparison.
It is better to do case-insensitive search.
Improves on a4852c4c01, though the sensitivity is only an issue since
09ad8bfbe5

Tested by: nwtour
Reported by: nwtour
Differential Revision: https://code.wildfiregames.com/D3647
This was SVN commit r25027.
2021-03-07 15:29:19 +00:00
wraitii 839cd0ec12 Update the replay cache to consider modification time.
This makes the cache work consistently if replays are changed
externally.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3615
This was SVN commit r25026.
2021-03-07 08:55:27 +00:00
Freagarach e24e48f32d Fix AutoGarrison UnitAI order.
Typo introduced in e18001e897.
Found by PetraAI.

Differential revision: D3643
Fixes #6089
Comment by: @wraitii
This was SVN commit r25025.
2021-03-07 06:54:28 +00:00
Freagarach b48cd5244f Fix PushOrderFront with construction.
POF introduced in afd1eaee0d.
Placing foundations takes another route, for which was warned in the
original ticket but not done nonetheless.
This fixes that route.

Differential revision: D3642
Comments by: @wraitii
Fixes #6090

This was SVN commit r25024.
2021-03-07 05:55:57 +00:00
wraitii 09ad8bfbe5 Customize hotkey categories & ordering, prepare for translation.
- adds JSON files to specify the human-readable categorization, name and
description of hotkeys.
- clean up code

Translation support via messages.json not yet added - the strings need
another pass and that avoids translators doing redundant work. See D3641

Refs #5867, Refs #5996

Differential Revision: https://code.wildfiregames.com/D3596
This was SVN commit r25023.
2021-03-06 18:11:41 +00:00
wraitii 3b3a297cca Fix checkrefs following D11 / 1c9efa6fb5
Fixes D11 / 1c9efa6fb5.

The problem is that some GUI pages were simply named "page.xml" which
the regex didn't like.

Accepted By: Nescio
Differential Revision: https://code.wildfiregames.com/D3644
This was SVN commit r25022.
2021-03-06 13:57:11 +00:00
Freagarach afd1eaee0d Allow players to push orders to the front of the queue.
Differential revision: D3605
This was SVN commit r25020.
2021-03-06 06:12:07 +00:00
Freagarach 979636cc57 Ungarrison entities using cmpGarrisonable.
Follow-up to e18001e897.
This moves responsibilities even further to the garrisoning entity.

Fixes the garrison flag when renaming entities cannot garrison (#5906).
Allows easy fixing of #6087.

Ticket: #6081
Differential revision: D3628
Comments by: @Stan, @wraitii (also in length on IRC)
This was SVN commit r25019.
2021-03-06 06:07:32 +00:00
vladislavbelov 76af18b23a Removes deprecated gl_*Matrix builtins from GLSL shaders.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3635
This was SVN commit r25018.
2021-03-05 22:32:32 +00:00
wraitii 373b8b6ff1 Fix 4b7b9325ac - idle units are frozen in walk anim.
Fixes 4b7b9325ac

Differential Revision: https://code.wildfiregames.com/D3640
This was SVN commit r25017.
2021-03-05 18:34:06 +00:00
wraitii 2be7479265 Fix quickloading/quicksaving following d4c2cf4430
Fixes d4c2cf4430.

Differential Revision: https://code.wildfiregames.com/D3636
This was SVN commit r25016.
2021-03-05 13:36:27 +00:00
wraitii 4718690f71 Make attacker data explicitly optional in status effects.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3633
This was SVN commit r25015.
2021-03-05 09:40:23 +00:00
Freagarach b4fd4ab655 Combine attacker data in "data"-object in attack-related code.
Allowing for easier introduction of new parameters.
Split from D781, (D368).

Differential revision: D2269
Comments by: @Angen, @Stan, @wraitii
Idea accepted by: @wraitii
This was SVN commit r25013.
2021-03-05 06:32:44 +00:00
wraitii 4b7b9325ac Fix a rare case of unit 'gliding' while moving.
Fixes a1dc9cadd8: if the speed doesn't change, UnitMotion doesn't update
the visual actor. Unfortunately, if another component has in the
meantime reset the animation to 'Idle', the unit will now move while
Idle. This can happen when leaving formation to do something else,
though it'srare.

This fixes that by instead always calling VisualActor, which does its
own checking to avoid redundancy. It's a bit less efficient, but not too
much.
Note that this relies on UnitMotion::UpdateMovementState being called
after any UnitAI code that could reset the animation to IDLE.

Differential Revision: https://code.wildfiregames.com/D3619
This was SVN commit r25011.
2021-03-04 18:32:48 +00:00
wraitii 007bf75264 Fix map previews/descriptions in the lobby game list.
Map previews are broken in the lobby game list, except for maps with
specific previews (such as biome RMs). Descriptions were broken in
general. The error lies in 1ae4f497e8, which forgot to add the xml
extension.

Differential Revision: https://code.wildfiregames.com/D3632
This was SVN commit r25010.
2021-03-04 18:31:33 +00:00
wraitii 765a40ac5c Fix compilation with --without-audio
Compilation --without-audio was broken since D3108 / 876f6d5e50

Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3631
This was SVN commit r25009.
2021-03-04 17:36:24 +00:00
vladislavbelov 40399011f7 Fixes revealed missed include after e104b41be2.
This was SVN commit r25008.
2021-03-04 08:55:49 +00:00
wraitii cfaddf51f9 Remove 'New' tag on Atlas Valleys
Missed in 68b81f63b1.

Reported by: langbart
This was SVN commit r25007.
2021-03-04 08:40:04 +00:00
vladislavbelov 8fe9e420ee Fixes removed include after 2e4639e6dc.
This was SVN commit r25005.
2021-03-03 23:07:50 +00:00
vladislavbelov 2e4639e6dc Removes unused containers included in headers.
This was SVN commit r25004.
2021-03-03 23:01:08 +00:00
vladislavbelov c29423c723 Fixes revealed missed includes after e104b41be2.
This was SVN commit r25003.
2021-03-03 22:38:59 +00:00
vladislavbelov e104b41be2 Cleanups includes for cassert and streams.
This was SVN commit r25002.
2021-03-03 22:26:49 +00:00
wraitii d4c2cf4430 Increase MP Command delay to 4 turns, decrease MP turns to 200ms.
To hide network latency, MP turns send commands not for the next turn
but N turns after that (introduced in c684c211a2).
Further, MP turn length was increased to 500ms compared to 200ms SP
turns (introduced in 6a15b78c98).
Unfortunately, increasing MP turn length has negative consequences:
- makes pathfinding/unit motion much worse & unit behaviour worse in
general.
- makes the game more 'lag-spikey', since computations are done less
often, but thus then can take more time.

This diff essentially reverts 6a15b78c98, instead increasing
COMMAND_DELAY from 2 to 4 in MP. This:
- Reduces the 'inherent command lag' in MP from 1000ms to 800ms
- Increases the lag range at which MP will run smoothtly from 500ms to
600ms
- makes SP and MP turns behave identically again, removing the
hindrances described above.

As a side effect, single-player was not actually using COMMAND_DELAY,
this is now done (can be used to simulate MP command lag).

Refs #3752

Differential Revision: https://code.wildfiregames.com/D3275
This was SVN commit r25001.
2021-03-03 21:02:57 +00:00
Freagarach 5e6b775d1a [Gameplay] - Search for resources near a current location before the init-pos.
This should bring the behaviour back to pre-A24 and means entities will
stray a lot less when gathering.
The entity will search close to the current position, which is mostly
next to a dropsite.
When there is nothing found there, the entity searches nigh the initPos.

Differential revision: D3607
Comments by: @wraitii
Tested by: @Nescio
This was SVN commit r25000.
2021-03-03 18:24:16 +00:00
Freagarach 97addf2aa7 Autocontinue after gathering a treasure.
Follow-up to ea96e81098.
Also adds the ability to gather near a position (e.g. when ungarrisoning
with a rally point set on a treasure that is gone).
Gathering treasures should now behave exactly the same as prior to the
split.

Differential revision: D3580
Comments by: @wraitii
This was SVN commit r24999.
2021-03-03 18:20:49 +00:00
s0600204 c879308ad6 Use pkgconfig to find libpng
Should hopefully resolve an issue raised on IRC by @spcman and @Xavi92

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3610
This was SVN commit r24998.
2021-03-03 16:11:41 +00:00
s0600204 2d9db5ade6 Bump miniupnpc version built on MacOS
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3630
This was SVN commit r24997.
2021-03-03 16:06:43 +00:00
Stan 1c7f2661ce Add missing file in previous commit.
This was SVN commit r24996.
2021-03-03 15:18:44 +00:00
Stan c16d961cd2 Enable support for powerpc64 systems. New problems with NVTT will be addressed in another diff.
Patch by: @tpearson-raptor
Comments by: @q66
Refs:
https://github.com/void-linux/void-packages/blob/master/srcpkgs/0ad/patches/ppc64.patch

Differential Revision: https://code.wildfiregames.com/D1619
This was SVN commit r24995.
2021-03-03 15:13:47 +00:00
wraitii a4223c87f6 Fix NoPCH following cb346e207b
Broken in cb346e207b

Differential Revision: https://code.wildfiregames.com/D3629
This was SVN commit r24994.
2021-03-03 11:08:57 +00:00
Freagarach 298d459e45 Do not initialise null values in cmpGarrisonHolder.
Saves some serialisation data (refs #3834).

Ticket: #5979
Differential revision: https://code.wildfiregames.com/D3468
Comments by: @Angen, @Stan
This was SVN commit r24993.
2021-03-03 10:18:57 +00:00
Freagarach bf988bfde5 Add resources "component test".
To test more the interaction between components.

Differential revision: D3339
This was SVN commit r24992.
2021-03-03 08:57:06 +00:00
Freagarach bd1ec429a4 Let order use solely their message.
Improves consistency in UnitAI.

Differential revision: D3624
Approved by: @wraitii
This was SVN commit r24991.
2021-03-03 08:21:00 +00:00
Freagarach 17a7f691c0 Fix tests broken between latest rebase and commit of ea96e81098.
Reported by: CI.
This was SVN commit r24990.
2021-03-03 08:18:42 +00:00
Freagarach ea96e81098 Split treasures from ResourceSupply.
Removes some hardcoding and allows for easier modding of treasures.

Refs.: #5888
Differential revision: D3303
Comments by: @Imarok, @Nescio, @Stan, @wraitii
This was SVN commit r24989.
2021-03-03 07:47:38 +00:00
s0600204 0de47dd1ec Pass an install location to the fmt build on MacOS
Similar to what all the other sections do.


Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24987.
2021-03-02 23:40:48 +00:00
vladislavbelov 143fdf551f Moves glGetError under config to prevent a performance drop on some platforms.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3620
This was SVN commit r24986.
2021-03-02 21:24:34 +00:00
vladislavbelov 7ea57932c4 Small style fixes for framebuffer clears.
This was SVN commit r24985.
2021-03-02 21:21:08 +00:00
vladislavbelov 94ba80d0cb Removes useless framebuffer clears by glClear.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3622
This was SVN commit r24984.
2021-03-02 21:20:26 +00:00
wraitii cb346e207b Refactor all usage of RegisterFunction to ScriptFunction::Register
- Replace ScriptInterface::RegisterFunction with
ScriptFunction::Register
 - Mostly removing unused cmpPrivate*
 - Some usage introduces specific getters (mapgenerator, AIWorker,
XmppClient,...)
 - Several passthrough functions are simply removed in favour of calling
the original, reducing duplication
 - Make use of ScriptRequest/ScriptInterface capabilities where
relevant.
- Make JSI_* headers only expose necessary functions, lightening them
considerably and reducing duplication
 - Reuse namespaces in JSI_* implementations directly, reducing visual
noise there

Follows f3aedf88a6

Differential Revision: https://code.wildfiregames.com/D3626
This was SVN commit r24983.
2021-03-02 20:01:14 +00:00
wraitii 869076ebc5 Replace double division with multiplication/division
As noted by Vladislavbelov in d8ea401a95.
(Likely leads to identical assembly with optimisation & current values)

This was SVN commit r24982.
2021-03-02 18:27:06 +00:00
wraitii 2838873c0a Fixes & improvements to FunctionWrapper
- HandleValue needed to explicitly pass UndefinedHandleValue for
'default' arguments.
- Allow passing ScriptInterface as first argument.
- Statically check that a getter is provided for object methods instead
of crashing at runtime
- A few stylistic improvements

Differential Revision: https://code.wildfiregames.com/D3625
This was SVN commit r24981.
2021-03-02 16:55:22 +00:00
wraitii d8ea401a95 Decouple LOS resolution from terrain resolution
Introduce a LOS_TILE_SIZE, to replace usage of TERRITORY_TILE_SIZE in
the LOS code.
This makes it possible to change the resolution of LOS/Terrain without
affecting the other component.

Additional refactoring:
- LosTile has been renamed LosRegion (it's more comparable to the
hierarchical pathfinder regions/spatial subdivisions)
- LosState explicitly refers to "los vertices" instead of terrain
vertices.

Refs #5566

Differential Revision: https://code.wildfiregames.com/D3076
This was SVN commit r24980.
2021-03-02 16:44:40 +00:00