1
0
forked from 0ad/0ad
Commit Graph

19536 Commits

Author SHA1 Message Date
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
6cde90104a Update precompiled win32 libogg to 1.3.3 and libvorbis to 1.3.6, building them with VS2015, refs #5379.
Use the default naming for both libraries (libvorbis instead of vorbis),
and use our default suffix for debug versions of the libs.

This was SVN commit r22406.
2019-06-27 22:36:04 +00:00
8babfe2330 Refactors camera projections - makes projection functions of camera more clear.
Reviewed By: elexis
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2012
This was SVN commit r22404.
2019-06-26 22:54:05 +00:00
ec4d84c72f Removes unused and obsolete LightingModel.
It was introduced in d295dacb9b as a way to control behavior of shaders.
Its usage in shaders was completely removed in 05008d190e (before that
in b7888aea52).

Reviewed By: elexis
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2011
This was SVN commit r22403.
2019-06-26 22:30:23 +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
844462b0c0 #5445
This was SVN commit r22397.
2019-06-25 05:05:06 +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
61db02790c Fix cppformat failures on MacOS tests.
cppformat tests failed on MacOS - the global locale was not set and
defaulted to something unexcpeted.
It is now fixed to US notation.

Patch By: Krinkle
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1978
This was SVN commit r22378.
2019-06-16 15:25:17 +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
d1fb66d2a7 Cleanups BoundingBoxAxisAligned and fixes coding styles a bit.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1951
This was SVN commit r22372.
2019-06-12 20:23:14 +00:00
3e53d05298 Fixes includes and forward declarations in CPatchRData.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1952
This was SVN commit r22371.
2019-06-12 20:03:22 +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
98f609df1d UnitMotion - Change "Possibly At Destination" logic.
UnitMotion will now send hints that a move may be completed if:
- it is a formation member and the formation member has stopped moving.
- it isn't and it is in range from its target.

Differential Revision: https://code.wildfiregames.com/D1899
This was SVN commit r22366.
2019-06-11 19:52:40 +00:00
8ac104b07a Fix 'gliding' behaviour at the end of movement by moving the PossiblyAtDestination check earlier.
Units in 0 A.D. exhibited a "gliding" behaviour at the end of a
movement, e.g. they switched to the Idle animation and still moved a
little bit.

The reason for this behaviour is that entities check if they reached
their destination after moving. Other components (unitAI mostly) will
then possibly change animations and such, resulting in a movement over
the turn while the entity is possibly now in another animation state
than "move".
Instead, what should be done is checking if the entity has arrived
before moving, so if UnitAI calls StopMoving, then entity won't move at
all on the same turn, and the gliding effect vanishes.

The STATE_STOPPING state is made un-necessary by this change, since this
off-by-one mistake was the reason for its existence. It can be removed
(see downstream).

Differential Revision: https://code.wildfiregames.com/D1898
This was SVN commit r22365.
2019-06-11 18:51:55 +00:00
f04bdd84ae UnitMotion - Split Move() into several functions
Move() is generally 4 parts:
- Moving
- Updating our state
- Handling obstructed moves
- Checking if we are at destination.

These can all be put in their own functions, clarifying logic and making
it harder to make mistakes.

Differential Revision: https://code.wildfiregames.com/D1897
This was SVN commit r22364.
2019-06-11 17:25:59 +00:00
ad4594e55d UnitMotion - move TryGoingStraight before the core of the 'Move' logic
In preparation for D1897, this logic isn't related to the "movement"
part of Move(), and can be called earlier.

Differential Revision: https://code.wildfiregames.com/D1896
This was SVN commit r22363.
2019-06-10 19:35:02 +00:00
36341b5d6c UnitMotion - Handle obstruction moving flag similarly to m_CurSpeed
The obstruction manager keeps a flag of moving units. This should be
updated in the same location as the entity's current speed, since they
have similar properties.

Differential Revision: https://code.wildfiregames.com/D1895
This was SVN commit r22362.
2019-06-10 19:33:24 +00:00
1adf9560b8 Unit Motion - update our current speed even when we have not moved.
VisualActor refers to unit motion's `m_CurSpeed` to know what animation
to display in the special walk mode. However that variable was
inconsistently updated. By making sure we reach that codepath in one
place, we remove opportunities for issues.

This should fix most existing instances of moonwalking, another upstream
diff will fix the rest.

Differential Revision: https://code.wildfiregames.com/D1894
This was SVN commit r22361.
2019-06-10 18:27:27 +00:00
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