1
0
forked from 0ad/0ad
Commit Graph

21625 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
40399011f7 Fixes revealed missed include after e104b41be2.
This was SVN commit r25008.
2021-03-04 08:55:49 +00:00
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
8fe9e420ee Fixes removed include after 2e4639e6dc.
This was SVN commit r25005.
2021-03-03 23:07:50 +00:00
2e4639e6dc Removes unused containers included in headers.
This was SVN commit r25004.
2021-03-03 23:01:08 +00:00
c29423c723 Fixes revealed missed includes after e104b41be2.
This was SVN commit r25003.
2021-03-03 22:38:59 +00:00
e104b41be2 Cleanups includes for cassert and streams.
This was SVN commit r25002.
2021-03-03 22:26:49 +00:00
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
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
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
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
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
1c7f2661ce Add missing file in previous commit.
This was SVN commit r24996.
2021-03-03 15:18:44 +00:00
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
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
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
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
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
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
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
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
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
7ea57932c4 Small style fixes for framebuffer clears.
This was SVN commit r24985.
2021-03-02 21:21:08 +00:00
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
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
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
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
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
1c9efa6fb5 Implement Single-Player campaigns - Barebones tutorial campaign included.
This implements necessary tooling to create a simple SP campaign.
The architecture is intended to be easily extensible in the future.

'Campaign Run' contains the metadata of a campaign, e.g. maps
played/won. It's saved in the user folder under
saves/campaigns/*.0adcampaign
Campaign templates are JSON files in campaigns/

Campaigns can specify which Menu interface they will use. This is
intended to allow more complex layouts/presentation.
For now, a simple list interface is provided. This allows making
campaigns without any fancy art required (and effectively mimics AoE1's
campaign interface).

The behaviour on game end is also intended to be extensible, supporting
things such as carrying over units between scenarios - for now, it
simply records won games.

GameSetup is not available for now - scenarios are triggered with the
settings defined in the map/default settings. Improving on this requires
refactoring the gamesetup further.

The load/save game page has been extended slightly to support
showing/hiding campaign games (campaign gamed are saved under saves/
directly, there is no strong motivation to do otherwise at this point)

Closes #4387

Differential Revision: https://code.wildfiregames.com/D11
This was SVN commit r24979.
2021-03-02 15:43:44 +00:00
b7ff2107ea Partial revert of d038b3c4f2 / REJECT_ORDER with FinishOrder()
Fixes d038b3c4f2, by partially reverting it.

If the new order is rejected, PushOrder() will call FinishOrder. If
there are no more orders on the queue, this calls SetNextState("idle"),
with the intention os switching the unit to IDLE. However, this only
works from within an FSM call, and thus does nothing if a new command
gets rejected.

The problem is that this.order/this.orderQueue is already replaced by
the point the order is rejected when called via ReplaceOrder. Ideally,
this would not happen (but doing so isn't trivial).

The current code avoids having 2 different ways to reject an order, thus
isn't a complete revert of d038b3c4f2. It triggers an IDLE re-entry that
wasn't there before if the unit is IDLE when it receives the rejected
order, which at the moment basically never happens.

Refs #5771 (reopened)

Reported by: gameboy
Comments by: Freagarach, Angen
Differential Revision: https://code.wildfiregames.com/D3618
This was SVN commit r24978.
2021-03-02 15:18:39 +00:00
e18001e897 Let entities garrison using cmpGarrisonable.
Followup to f4c9305eee.
Moves the logic for garrisoning from cmpGarrisonHolder to the entity
that is being garrisoned.
Also fixes
https://wildfiregames.com/forum/topic/36863-teleportation-feature-in-a24/?do=findComment&comment=418441
while at it (setting garrisoned before transferring orders on
transform).

Differential revision: D3280
Refs: #5906
Comments by: @Stan, @wraitii
This was SVN commit r24977.
2021-03-02 15:06:16 +00:00
a64536b45f Fix MSVC unknown pragma warning
Follows f3aedf88a6.

Reported by: Stan
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3623
This was SVN commit r24976.
2021-03-02 15:00:33 +00:00
5e5ea5cba5 Fix replayprofile/ graphing tool for Profiler1
All modern browsers block ajax request to local file.
This changes extract.pl to generate a single HTML file with data
embedded.
This is now the default behaviour, --to-json to export, --from-json to
load exported.

Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3621
This was SVN commit r24975.
2021-03-02 08:35:39 +00:00
23aa59e3d4 Let domestic animals flee when attacked.
Since slaughter kills animals in one strike since 3d61c227f3, domestic
animals can now be set to flee when attacked by anything else than
slaughter, like area damage or stray missiles.

Original patch by: @elexis
Differential revision: D193
Comments by: @mimo, @wraitii
This was SVN commit r24973.
2021-03-02 06:18:56 +00:00
f020a145f1 Fix Iberian starting walls on Skirmish maps.
Typo caused by b57abe806c, pointed out by @Sundiata in
https://wildfiregames.com/forum/topic/36706-why-alpha-24-is-not-nice/page/4/?tab=comments#comment-418337.

Patch by: @Nescio
Differential revision: D3616
This was SVN commit r24972.
2021-03-02 06:14:23 +00:00
bcd292d6c9 Make forge smoke only visible when the forge is researching.
Add missing particle sparks.

Thread:
https://wildfiregames.com/forum/topic/27329-visual-feedback-for-researching

This was SVN commit r24971.
2021-03-02 00:01:00 +00:00
ac72fb4486 Fix compilation of Atlas on UNICODE BUILDS
Patch by: @madpilot
Tested by: nwtour
Differential Revision: https://code.wildfiregames.com/D1593
This was SVN commit r24970.
2021-03-01 23:32:23 +00:00
f3aedf88a6 Introduce C++ templates replacements for DEFINE_INTERFACE_X and RegisterFunction macros
The new methods:
- aren't included in ScriptInterface.h directly, lightening that header
- don't use boost CPP
- don't need argument types or number or constness to be specified
- can work with object methods somewhat transparently
- support optional cmptPrivate (allowing removal of many UNUSED macro)
- support optional const ScriptRequest&, which is safer.

This first diff changes only some of the JSI files & the component
manager. Further diffs will update other files and finally delete the
current code.

Differential Revision: https://code.wildfiregames.com/D2818
This was SVN commit r24969.
2021-03-01 20:52:24 +00:00
9ed3b88d25 Guarantees no memset for allocation of DynamicArena::Block
Differential Revision: https://code.wildfiregames.com/D3609
This was SVN commit r24968.
2021-03-01 20:35:30 +00:00
502b229655 Check for missing auras in GUI Interface
Improve the explicitedness of the following error.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3614
This was SVN commit r24967.
2021-03-01 17:54:46 +00:00
6dc0ffd86f Add a 'debug' catalog & PEP8 the long string file
- Adds a function to generate a 'debug' catalog. This prepends 'X_X '
to strings, to make it obvious in-game which are translated and which
aren't, while still remaining usable.
 - cleans up the code and formats to PEP8 properly (except for line
lengths).

Differential Revision: https://code.wildfiregames.com/D3617
This was SVN commit r24966.
2021-03-01 16:37:33 +00:00
d6e0a9963d Remove corral aura which was not supposed to be committed in c888844b3a.
Spotted by: @wraitii
This was SVN commit r24964.
2021-02-28 21:00:05 +00:00
c888844b3a Decay/Regenerate option for resources.
Allows entities to change their resource amount over time, possibly with
some constraint.

This is a not-so-bare minimum, but can certainly be improved and/or
extended later.

Part of: #1973
Original patch by: @smiley
Redone by: @Stan
Standing on the shoulders of giants: @Freagarach
(Revisions: 59; Inlines: 209)
Differential revision: D1718
Comments by: @Angen, @elexis, @Imarok, @Langbart, @nani, @Nescio,
@smiley, @Stan, @wraitii

This was SVN commit r24963.
2021-02-28 20:14:53 +00:00