1
0
forked from 0ad/0ad
Commit Graph

19492 Commits

Author SHA1 Message Date
017cb504ee Drop an indentation level in UnitMotion.
This will simplify later changes.

Differential Revision: https://code.wildfiregames.com/D1893
This was SVN commit r22360.
2019-06-10 17:15:27 +00:00
eee977fd7d Fix wrong actor file for persian cavalry javelinist base actor when gathering meat
Patch by: @Angen
Differential Revision: https://code.wildfiregames.com/D1967
This was SVN commit r22359.
2019-06-10 10:13:24 +00:00
641a1a4b85 Remove duplication of attack variant from Kush hero 'hero_infantry_archer_amanirenas.xml'.
Patch by: @Angen
Differential Revision: https://code.wildfiregames.com/D1966
This was SVN commit r22358.
2019-06-10 10:11:07 +00:00
70e22e2923 Unit Motion - Face point when calling StopMoving()
FacePointAfterMoving intends for the unit to face the destination once a
move is done. Since 4fda917f46, stopping is the responsibility of UnitAI
(through a call to StopMoving()). Thus we should move that code in that
function, as this ensures we don't forget to do it and removes
duplications.

Differential Revision: https://code.wildfiregames.com/D1889
This was SVN commit r22355.
2019-06-09 17:06:24 +00:00
f2db913a7d Unit Motion - remove the m_Moving variable
The variable is not necessary since having a target is equivalent,
removing it thus reduces redundant state.

Differential Revision: https://code.wildfiregames.com/D1888
This was SVN commit r22354.
2019-06-09 17:04:18 +00:00
6e6f7699d0 Fix repairing/garrisoning range checks following 4fda917f46
4fda917f46 introduced mistakes in range checks which sometimes broke
garrisoning and repairing.

Reported By: gameboy
Differential Revision: https://code.wildfiregames.com/D1963
This was SVN commit r22353.
2019-06-09 16:59:27 +00:00
4a15cc3b9f Unit Motion - wrap target state into a struct
These variables together held the state for the target of UnitMotion, as
set by the MoveTo[X] family of functions.
Wrapping them in a struct reduces the chances that one will accidentally
forget to reset part of the state and makes it explicit in-code that
these are grouped together.

Calling StopMoving() resets this target, which wasn't before and left
the component in an incoherent state.

Differential Revision: https://code.wildfiregames.com/D1887
This was SVN commit r22352.
2019-06-09 11:18:06 +00:00
4fda917f46 Prevent UnitMotion from stopping on its own, and rename "MoveCompleted" to "MovementUpdate"
UnitAI is now solely in charge of moving and stopping, making UnitMotion
behaviour easier to predict, which will ultimately help with unitAI
development. It might temporarily make units more resilient than before
however.

UnitMotion also tells UnitAI that it's arrived with "MoveCompleted"
messages, but these actually could be wrong - unitAI could decide that
we didn't want to stop after all - so change the name for something less
misleading.

Differential Revision: https://code.wildfiregames.com/D1886
This was SVN commit r22351.
2019-06-09 11:16:40 +00:00
27b686215a Remove "MoveStarted" messages
"MoveStarted" messages were sent by UnitMotion when the unit started
moving (sort of) or failed to do so. This was used by formations and
guarding but was not really necessary as this can be done in "enter" or
in a timer.

Differential Revision: https://code.wildfiregames.com/D1885
This was SVN commit r22350.
2019-06-08 12:53:28 +00:00
08bfcf144b Allow techs to affect unit counters stats.
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D1782
This was SVN commit r22346.
2019-06-06 20:44:30 +00:00
c219ee54b2 Move "IsInRange" family of functions to the Obstruction Manager and make the commutative.
These functions were placed in UnitMotion, which had nothing to do with
range checks and made them available only to moving entities for no
particular reason.

This patch also adds support for square-square range checks and
shape-shape distance checks.

Modified from a patch by bb on top of work from wraitii.

Differential Revision: https://code.wildfiregames.com/D981
This was SVN commit r22345.
2019-06-06 19:37:23 +00:00
ba736916fc Clean up ThreadUtil, use standard C++11 constructs instead of custom ones.
ThreadUtil shipped a scope lock and a mutex implementation, which can be
removed since we now have these in the standard library.
This lets us clean up this header which get included everywhere (through
profiler includes).

Tested By: Angen and Stan
Differential Revision: https://code.wildfiregames.com/D1915
This was SVN commit r22344.
2019-06-06 19:30:48 +00:00
7c88828814 Add a glow material that supports normal maps as well.
This was SVN commit r22343.
2019-06-05 23:17:37 +00:00
7d53fb19a2 Additional fixes following 0c20afdfda - units no longer return to gather nearby resources when depleting a chicken/tree/...
Reuse the timer code in the gathering sub-state to avoid broken
duplication.

Reported By: minohaka
Test By: Angen
Differential Revision: https://code.wildfiregames.com/D1956
This was SVN commit r22342.
2019-06-05 20:44:43 +00:00
3ac1a004fa Fixes black water glitches for certain wind angles with the approximate solution.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1804
This was SVN commit r22341.
2019-06-05 20:13:31 +00:00
70ccc3e5cb Adds Camera test for ortho projection.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1948
This was SVN commit r22340.
2019-06-05 19:55:37 +00:00
dd67d0769e Resolve issues with 0c20afdfda - unitAI order cleanup and unitMotion MoveTo change
0c20afdfda had two issues:
- some of the unitAI code did not return true when switching states in
the "enter" phase
- missed a return false in unitMotion.cpp

This fixes the issue noticed by @bb.

Differential Revision: https://code.wildfiregames.com/D1947
This was SVN commit r22339.
2019-06-05 17:27:12 +00:00
f97213187e Version and update the Windows autobuilder script, refs #5379.
Patch by Angen, based on the previous bat script for the autobuilder
job.
Comments by Stan.
Differential Revision: https://code.wildfiregames.com/D1909
This was SVN commit r22338.
2019-06-04 16:48:22 +00:00
37e5097ea9 Fix a m_JumpPointCache assertion failure in debug mode, refs fa726867f1.
Patch By: Stan
Comments By: wraitii
Differential Revision: https://code.wildfiregames.com/D1942
This was SVN commit r22336.
2019-06-04 08:29:47 +00:00
800bf0da24 Improve UTF-8 character handling in Atlas
(Also prevents the compile-time warnings reported in the abandoned
D1432)

Accepted by: Itms
Patch linting by: Stan, Vladislav, wraitii
Also tested by: Imarok
Fixes: #4936
Differential Revision: https://code.wildfiregames.com/D1395
This was SVN commit r22335.
2019-06-03 20:19:53 +00:00
4b65cc0317 Fixes a typo introduced in cb048b4738 in shore calculations, found by Angen and fixes style notes by elexis.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1949
This was SVN commit r22334.
2019-06-03 20:19:18 +00:00
f4194df416 Removes unused variable from ModelRenderer introduced in 6bc33fe8bd. Found by Angen.
Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1812
This was SVN commit r22333.
2019-06-03 20:06:01 +00:00
wackyserious
9618c1fc2f Roman helmets texture recolor
-Adjusted the hue and saturation of the textures to achieve visual
uniformity.

Reviewed by: Stan
This was SVN commit r22331.
2019-06-01 10:44:01 +00:00
2b5aaad399 Revert 899714f667 to faciliate committing it again with credit in the commit message.
Agreed with: wraitii and liked by vladislavbelov in
https://wildfiregames.com/forum/index.php?/topic/26104-leper-attribution-request-899714f667/
Refs D1504

This was SVN commit r22330.
2019-05-31 21:56:13 +00:00
bb
7d25ab3a45 Merge persian and mauryan Archery Tradition technologies
Add the tech to ranges, and make them also pop upin captured barracks

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1941
This was SVN commit r22329.
2019-05-31 21:35:30 +00:00
bb
658a5a8dd1 Rename Stables class to Stable since we use the singular forms.
Fixes 964934cf4e

Patch By: Angen
Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D1890
This was SVN commit r22328.
2019-05-31 20:47:57 +00:00
5ecacc60f0 Fix the smoothing group issue reported by @vladislavbelov on the chat today, that is made more visible by https://code.wildfiregames.com/D1925.
- Rename civil_centre to civic_center
- Rename the shield prop object to a more explicit name.
- The template and the rubble template should be renamed in another
commit to make sure that do not affect the AI.

This was SVN commit r22327.
2019-05-31 13:21:58 +00:00
bb
bd26f04e5a Set ship status bars in parent
Patch By: Nescio
Reviewed By: wraitii
Comments By: Imarok, Stan
Differential Revision: https://code.wildfiregames.com/D1842
This was SVN commit r22326.
2019-05-31 12:00:49 +00:00
bb
e7f720d7bc Reduce defensive_wall* duplication
Including:
Remove LongWall from gates
Change the ("unused") gate cost component in more reasonable number and
adapt the repairTimeRatio with it to keep the health/second the same

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1794
This was SVN commit r22325.
2019-05-31 11:17:10 +00:00
ddcdc643ba Further cleanup of MikkTSpace
- Move the * and & to the correct side,
- Add .0 and  0.f to clearly mark the types
- Pass pointers instead of arrays
- Add a newline after forward declaration
- Add spaces between operators
- Use c++ cast

Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1934
This was SVN commit r22323.
2019-05-30 23:03:01 +00:00
bb
4495467e65 Seperate stable from barracks
Including:

    moves template_structure_military_barracks_stables.xml to
template_structure_military_stable.xml
    updates all its children accordingly
    merges values from pers_stable.xml into the new generic template
    changes generic name Stable (singular, without s)
    standardizes rubble sizes to 5x5 (pers had 4x4)
    corrects specific name for Greek factions
    adds foundation actor to kush_stable.xml

Patch By: Nescio
Comments By: Angen
Differential Revision: https://code.wildfiregames.com/D1790
This was SVN commit r22322.
2019-05-30 21:00:18 +00:00
2cf1f85d7e Fixes tests compilation after ebfec91057. Found by Angen.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1937
This was SVN commit r22321.
2019-05-30 17:27:55 +00:00
bb
93139ab417 Rename pers_stables to pers_stable as rest of {civ}_stable to simplify check done by Petra
Patch By: Angen
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D1860
This was SVN commit r22320.
2019-05-30 16:55:45 +00:00
ebfec91057 Adds Camera test for frustum.
Reviewed By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1927
This was SVN commit r22319.
2019-05-29 20:12:41 +00:00
wackyserious
97fad1fe1d Re-upload the uncompressed PNG files for the previous commits.
There was a setback when I used tinypng to compress the images as it
eliminated necessary image component.

Reviewed by: Stan
This was SVN commit r22318.
2019-05-29 09:44:10 +00:00
wackyserious
dcdff5e9ca New Texture: Macedonian Units
Thread:
https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-update/

Reviewed by: Art Department and forum community.
This was SVN commit r22317.
2019-05-29 09:30:16 +00:00
39720041f7 Cleanup MikktspaceWrapper.
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D1872
This was SVN commit r22316.
2019-05-28 22:06:29 +00:00
8cb7c4ec34 New horse and cattle fauna template corrections
Patch by: @Nescio
Reviewed by: @Stan
Differential Revision: https://code.wildfiregames.com/D1874
This was SVN commit r22315.
2019-05-28 20:46:56 +00:00
ca9109be75 Fix a crash on some system when Alt-tabbing during game setup.
Move checks for rendering a frame in Render() to avoid missing calls to
this functions, which can crash on certain systems.

Move the sound manager's idle task out of Render().
Move the buffer swapping in Render() since we do not need to swap
buffers unless we are rendering.

Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1495
This was SVN commit r22314.
2019-05-28 13:18:32 +00:00
0c20afdfda Unit Motion: MoveTo family of function no longer returns false if the move is un-necessary, instead unitAI checks explicitly.
This also moves the actual "moving" code to states instead of orders,
making states more self-contained and removing the change of errors when
cleaning up a state.

Differential Revision: https://code.wildfiregames.com/D1865
This was SVN commit r22313.
2019-05-28 11:38:18 +00:00
e2233a4a90 Don't clear pathnames in vfs::GetPathnames so it can be called several times.
Differential Revision: https://code.wildfiregames.com/D1914
This was SVN commit r22312.
2019-05-28 10:18:04 +00:00
899714f667 Small commands.js cleanup
Differential Revision: https://code.wildfiregames.com/D1504
This was SVN commit r22311.
2019-05-28 10:00:19 +00:00
0f645b45a9 Fix red squares on some maps when using HQ water effects
This fixes an oversight in rp22297.

Reported By: gameboy
Differential Revision: https://code.wildfiregames.com/D1919
This was SVN commit r22310.
2019-05-28 09:57:14 +00:00
42591587a8 New less broken walls for the gauls, move the gaul walls to the gaul repository, the gaul gate will be moved when it's replaced/improved.
Thread:
https://wildfiregames.com/forum/index.php?/topic/17326-your-screenshots/page/19/
https://wildfiregames.com/forum/index.php?/topic/19465-suggestions-for-the-gauls/page/4/

This was SVN commit r22309.
2019-05-27 22:01:25 +00:00
804d36fca3 Add a build flag to prefer locally-built libraries (linux/bsd systems)
To use:
```
./update-workspaces.sh --prefer-local-libs
```
Then run `make` as usual.

Accepted by: Itms
Differential Revision: https://code.wildfiregames.com/D1747
This was SVN commit r22308.
2019-05-27 15:45:57 +00:00
792027f18d Unify stables names.
Fix some decals,
Remove AO suffix,
Rename struct_b to roof
Use stable_elephant as per the art convention
<general>_<civ>_<type>_<extra>_<variation>

This was SVN commit r22306.
2019-05-26 20:11:58 +00:00
12f893b1e3 Remove 'Async' from short/long path requests names
Having Async in the name was not really informative and made it awkward
to reuse for non-async code.

Reviewed By: Kuba386
Differential Revision: https://code.wildfiregames.com/D1854
This was SVN commit r22305.
2019-05-26 13:47:41 +00:00
f504c643a0 Allow entities to be affected by Status Effects from ranged attacks.
This implements a status effects receiver component (in a similar
fashion to the damage receiver component). The plan is to further extend
this component notably to handle graphical indication of status effects,
and a variety of other effects.

Currently implemented: ranged attacks can inflict status effects that
reduce HP over time.
This can be resisted by armour.

No units currently utilise this in-game but with proper graphics support
that could be changed.

Patch By: Mate-86
Reviewed By: wraitii
References #1912

Differential Revision: https://code.wildfiregames.com/D1252
This was SVN commit r22304.
2019-05-26 12:44:46 +00:00
65fcd66556 Update precompiled headers to improve build times.
Expect a 10-25% build time improvement.

Original Patch By: Angen
Reviewed By: Angen
References #5038

Differential Revision: https://code.wildfiregames.com/D1333
This was SVN commit r22303.
2019-05-26 07:21:12 +00:00
9ea68317ad Use pkg-config where possible instead of hard-coding or library-specific programs
Accepted by: Itms, wraitii
Previously tested by: andy5995
Fixes: #5157
Refs: D1582
Differential Revision: https://code.wildfiregames.com/D1611
This was SVN commit r22302.
2019-05-25 18:00:40 +00:00