Commit Graph

13217 Commits

Author SHA1 Message Date
ff9d162c8c Make sure states are exited if the movement update fails.
Differential Revision: https://code.wildfiregames.com/D1998
This was SVN commit r22423.
2019-07-01 19:51:21 +00:00
d2c88acf44 Fix 3e43ddd869: s/target/this.gatheringTarget
Differential Revision: https://code.wildfiregames.com/D2032
This was SVN commit r22421.
2019-07-01 19:02:00 +00:00
bb
bdb742488a Cleanup UnitAI's FaceTowardsTarget function and allow units without a unitMotion in that.
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2014
This was SVN commit r22420.
2019-07-01 12:32:57 +00:00
bb
3a77eb25d3 Fix ESLint semicolon-related warnings
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D2004
This was SVN commit r22419.
2019-07-01 11:09:19 +00:00
b20f357764 Don't use the opposite edge in UnitAI range checks.
For now, we use the nearest-edge to nearest-edge distance for min-range
checks (following much discussion on D981).
This was missed when committing it in c219ee54b2.

UnitMotion was already correctly not using opposite edge checks.

Differential Revision: https://code.wildfiregames.com/D2031
This was SVN commit r22416.
2019-06-30 19:05:04 +00:00
3e43ddd869 Fix 0b41e8ee61, make units again properly hunt animals that died in FoW.
The reason was that the unit immediately tried gathering nearby instead
of going to the unit's last known position.

Related to D1997.

Differential Revision: https://code.wildfiregames.com/D1996
This was SVN commit r22414.
2019-06-30 18:55:26 +00:00
f42d97c6f3 Fix some animals "roaming" state not working correctly (units seem stuck in place)
Due to an issue in 4a15cc3b9f, animals incorrectly tried going towards
the roaming point instead of away from it.

With that fixed, MovementUpdate still did not trigger as the min and max
range were the same.
Use -1 as max range (= infinite) instead since we want to move
arbitrarily away.

Having an infinite max range was broken in c219ee54b2, this
re-implements that.

Further, other calls with equal min and max range have been changed
likewise.

This does not entirely fix whales, which run in other problems because
of their large roaming range.

Differential Revision: https://code.wildfiregames.com/D1980
This was SVN commit r22413.
2019-06-30 18:53:25 +00:00
a7573ae911 Fix IsInjured overwrite in 56ed4c1dc8
Reported By: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2027
This was SVN commit r22412.
2019-06-29 19:42:58 +00:00
56ed4c1dc8 Fix IsInjured call on miraged entities.
ea208f19a3 introduced an "IsInjured" function, used in the GUIInterface.
Mirages must mock this function and this was missed in the original
diff.

Tested By: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2018
This was SVN commit r22411.
2019-06-29 17:17:07 +00:00
bb
445a5d8855 Clean up technologie data files:
- put modification each on an own line
 - space/tab correct
 - space correct objects
 - remove trailling 0's

Partially requested by: Stan
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1953
This was SVN commit r22408.
2019-06-28 15:58:21 +00:00
3b77a0fba1 Update the minimap, range overlay renderer, and status bars when a player's color is changed in Atlas.
These were missing from 343ec21e75.

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1261
This was SVN commit r22402.
2019-06-26 19:16:57 +00:00
da13a6c734 Fix missing slash in common-api of entity. The mistype was introduced in c1e86161b5.
It wasn't found because it's not used at all. It was added in
07ea313ad6, and its usage was removed in 998dc21676.

Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1994
This was SVN commit r22401.
2019-06-26 18:04:33 +00:00
352ce9b41c Add the new keyword for BigTiger's maps.
Fixes 4ac8ea7989

This was SVN commit r22400.
2019-06-25 21:08:29 +00:00
fe2bb77e0f Skybox calculation - fix regression of 9376609ee8 introduced in 01a8138780
Audited By: vladislavbelov
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1985
This was SVN commit r22399.
2019-06-25 19:23:57 +00:00
47256dca84 Add Krinkle to 0 A.D.'s programming credits
Reviewed By: Krinkle
Differential Revision: https://code.wildfiregames.com/D1990
This was SVN commit r22398.
2019-06-25 19:22:46 +00:00
3573c87fc8 Makes rendering helpers (culling camera, frustums) be available through the developer overlay.
It helps to test/debug patches like D1847.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1972
This was SVN commit r22395.
2019-06-23 20:17:44 +00:00
98f6866814 Remove two duplicate textures and models. They were incorrectly added in 4981cdedad in the flow of new objects.
Noticed by: @elexis
This was SVN commit r22394.
2019-06-22 20:50:47 +00:00
abc0beb07d Teak, dragon bamboo, scaled down some baked normal and ao maps larger than the base map, minor edits to areca palm
This was SVN commit r22392.
2019-06-19 08:16:38 +00:00
1c4de428cb may have forgotten an actor file, also areca palms
This was SVN commit r22391.
2019-06-18 17:57:13 +00:00
b77336b491 bananas and strangler figs
This was SVN commit r22390.
2019-06-18 16:04:28 +00:00
6d0a91a886 Fix a little glitch on the Athenian storehouse.
Reported by: @vladislavbelov.
This was SVN commit r22389.
2019-06-18 12:14:54 +00:00
44d699b432 Remove three unused capes.
This was SVN commit r22388.
2019-06-18 09:34:15 +00:00
afca278486 Improve starting position camera for Oceanside (2)
Patch by: BigTiger
This was SVN commit r22387.
2019-06-17 22:34:41 +00:00
4ac8ea7989 3 New temperate maps by BigTiger.
This was SVN commit r22386.
2019-06-17 18:24:09 +00:00
0df4d130cf New particle actors by BigTiger.
This was SVN commit r22385.
2019-06-17 18:23:41 +00:00
1d841a71fe New terrain textures by BigTiger for the temperate biome.
This was SVN commit r22384.
2019-06-17 18:23:16 +00:00
4981cdedad New bushes, trees (Oaks, firs, Birch) by Big Tiger, as well as new cliffs, and decals.
This was SVN commit r22383.
2019-06-17 18:22:07 +00:00
4967d176b9 Define variables before mentioning them in scripted component tests, and add a linter rule for this.
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D1986
This was SVN commit r22380.
2019-06-16 20:48:28 +00:00
f4babd9b34 Wrap damage types in a Damage element in XML templates to prepare for genericizing them.
Patch By: Freagarach
Reviewed By: Wraitii
Differential Revision: https://code.wildfiregames.com/D1950
This was SVN commit r22379.
2019-06-16 17:08:27 +00:00
9e8a43401e fixed anomaly in doum palm
This was SVN commit r22377.
2019-06-15 19:43:22 +00:00
7a25c9e88e Holly oaks, fixing some weird normals on the atlas cedar, and a few edits to the quarry stone and texture maps I don't remember doing, but I can trust past me to have made good decisions, right?
This was SVN commit r22376.
2019-06-15 19:00:12 +00:00
190f8d3566 Calculate entity limit counts correctly when SpawnUnits fails in ProductionQueue.
When adding a batch of unit, these in-training units get added to the
production queue and to the entity limit count.
These in-training units need to be removed from the entity limit counts
when spawning them, or we would be double-counting them. This was done
when creating the cached entities, but this was too early: entities
might fail to spawn, for example when there is no room around the
foundation.

Change that so the entity limit count is now decremented right before
giving spawned entities the correct owner (which triggers EntityLimits
OnGlobalOwnershipChanged, which adds the spawned entities to the entity
limit count).

Additionally, add Init to TrainingRestrictions so that the test setup
doesn't complain. Other components have an empty Init instead of
checking for Init in the test setup (and 61/67 have an Init function) so
it seems more standard this way.


Reported By: elexis
Reviewed By: wraitii
Patch By: Angen
Tests By: wraitii
Differential Revision: https://code.wildfiregames.com/D1879
This was SVN commit r22375.
2019-06-15 17:27:24 +00:00
5992943f43 Fix resource-returning order sometimes not working correctly (introduced by 0c20afdfda)
Differential Revision: https://code.wildfiregames.com/D1975
This was SVN commit r22374.
2019-06-15 15:07:27 +00:00
2bcf4f678b Refactors Developer Overlay using an object instead of global functions.
Reviewed By: wraitii
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1928
This was SVN commit r22370.
2019-06-12 19:21:44 +00:00
63e1c9ff1a Fix typo in 0b41e8ee61.
This was SVN commit r22368.
2019-06-11 20:09:40 +00:00
0b41e8ee61 Fix leftovers from 0c20afdfda - improve repairing, chasing and fleeing behaviour.
0c20afdfda made states more caller-independent but did not change some
callsites to be compatible with that. This fixes those.

This does not fix chasing entirely however since unitMotion does not
always recognize that the target moved enough that the entity will never
be in range.
This will be fixed upstream.

Differential Revision: https://code.wildfiregames.com/D1968
This was SVN commit r22367.
2019-06-11 20:06:25 +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
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
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
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
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
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
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