1
0
forked from 0ad/0ad
Commit Graph

19553 Commits

Author SHA1 Message Date
2584cbf69a Fix warning introduced in the mirage cleanup, 905763004a
Iterating using a for..in over an array returns the indices as string,
not number, which C++ did not accept.

Differential Revision: https://code.wildfiregames.com/D1864
This was SVN commit r22254.
2019-05-08 19:24:20 +00:00
809f297707 Move the Vertex Pathfinder to its own helper class
The vertex pathfinder was implemented directly in CCmpPathfinder,
instead of being a separate helper like the hierarchical pathfinder or
the long pathfinder.

This moves it to its own helper VertexPathfinder, which gets us ready
for D14 and pathfinder threading. Some struct definitions need to be
moved around.

Differential Revision: https://code.wildfiregames.com/D1855
This was SVN commit r22253.
2019-05-08 11:53:02 +00:00
Alexandermb
6970a168d9 Add dirt decals to rome factions temple:
Basic temple and Vesta Temple.

This was SVN commit r22252.
2019-05-07 17:28:36 +00:00
6efa2b46ce Fix uv shield orientation for pikemen.
Thread:
https://wildfiregames.com/forum/index.php?/topic/17326-your-screenshots/page/17/#comments

This was SVN commit r22250.
2019-05-04 21:01:13 +00:00
b0f41952b8 Fix UnitMotion calculation of time left to avoid units going back and forth between walking and running animations.
Because of the limited precision of our fixed-point numbers, the
timeLeft calculation could sometimes return results above the actual
time left, resulting in units moving a few fixed::epsilons farther than
they should be, which makes them switch to the running animation. This
was rather unstable however, so there was a constant 'flickering'
between walking and running.
If we divide last instead of first in the operation, the errors get
gobbled up by the division and we no longer have this issue.

Reported by: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D1856
This was SVN commit r22249.
2019-05-04 15:53:46 +00:00
75d0c56070 Don't crash when calling the profiler from a 'non-main' thread
Motive behind the change: calls to Profile() currently crash unless they
are triggered from the main thread, but it's somewhat difficult to know
that from the code. It makes more sense to silently ignore those
particularly so we can easily have the same code be threaded or not.

This also removes a few profiling calls that don't make much sense.

Differential Revision: https://code.wildfiregames.com/D1853
This was SVN commit r22248.
2019-05-04 15:03:10 +00:00
905763004a Slight cleanup of fogging OnDestroy and some comments
Following b56f7f39d4 I dwelled in the fogging code. Some confusion could
have been avoided by some comments.
Also early-exit the loop to avoid doing un-necessary js->c++
transitions.

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1737
This was SVN commit r22247.
2019-05-04 13:49:08 +00:00
wackyserious
e4a5a8f848 New Texture: Persian Units
Thread:
https://wildfiregames.com/forum/index.php?/topic/23634-task-persian-unit-texture-upgrade/#comments

Reviewed by: LordGood, Wowgetoffyourcellphone and several community
members.

This was SVN commit r22246.
2019-05-04 02:15:27 +00:00
0e3a3257c2 Add special scaffoldings for the wall towers as well. Based on a model by @LordGood.
This was SVN commit r22245.
2019-05-03 22:28:42 +00:00
b852eeba9c Add missing file in 7165acf9cc. It didn't appear as changed in previous commit
This was SVN commit r22244.
2019-05-03 22:26:07 +00:00
7165acf9cc Add an AO map to the propylaea building. Enable special maps for all versions of the building. Add EOL Native to the actors.
This was SVN commit r22243.
2019-05-03 22:23:57 +00:00
55b3086c03 Add a map to be able to test which foundation fits best an actor.
This was SVN commit r22241.
2019-05-01 21:10:28 +00:00
64eb803ee4 Update templates to use the new foundation sizes.
This was SVN commit r22240.
2019-05-01 21:09:54 +00:00
d52005f990 Unify foundation sizes
1x1 is now a 1x1 grid unit for the game 2x2m unit in blender , that you
can see using THE Wireframe mode or the special texture in atlas.
Resize and adapt existing foundations accordingly
Unify construction dust, it only appears when building (scaffold
variant)
Add 64 foundations from 2x1 to 9x9 and corresponding dirt decals
Add three new scaffolds based on Lordgood's for walls
Rename props to use lowercase names as per art conventions and update
the maps accordingly.
Use 0x instead of a b c and d as per the art convention.
Add missing materials tags, and only use special textures when necessary

Template update will be done in the following commit.

This was SVN commit r22239.
2019-05-01 21:08:53 +00:00
ae7725b698 Add more animations to the atlas drop down list.
This was SVN commit r22238.
2019-05-01 20:57:33 +00:00
Alexandermb
f696236cb5 This was SVN commit r22237. 2019-04-29 15:52:03 +00:00
Alexandermb
e084b5239b New iberian helmets
Threa:
https://wildfiregames.com/forum/index.php?/topic/24988-task-iberian-units-update/page/4/&tab=comments#comment-372800

Including updated versions of:

* iber_helmet_05
* iber_helmet_06
* iber_helmet_07
* iber_helmet_08
* iber_helmet_09

Updated actors:

*iberians/cavalry_javelinist_a_r.xml
*iberians/cavalry_javelinist_e_r.xml
*iberians/cavalry_javelinist_c_r.xml
*iberians/infantry_spearman_a.xml
*iberians/infantry_swordsman_a.xml
*iberians/infantry_swordsman_c.xml
*iberians/infantry_swordsman_e.xml
*carthaginians/infantry_spearman_e.xml

This was SVN commit r22235.
2019-04-28 15:51:21 +00:00
839f281c98 Don't add the period outside a translated string
Previoues version reviewed by: bb
Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D1366
This was SVN commit r22234.
2019-04-28 15:26:41 +00:00
ef098db7c8 Seed unit sounds so that their pitch and their gain are always the same for the same unit.
Fixes #3578
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1584
This was SVN commit r22231.
2019-04-25 22:37:15 +00:00
34a6f17aa7 Fix forgotten tab in 06fae58904 line 1337.
Noticed by Polakrity.

This was SVN commit r22230.
2019-04-25 21:06:14 +00:00
6f31daed81 Fix missing spaces and non compliant code with regards to the coding conventions.
Add a missing semi-colon

For future reference on documenting records using JSDoc see the
differential.

Reviewed by: @elexis
Differential Revision: https://code.wildfiregames.com/D1848
This was SVN commit r22229.
2019-04-25 20:05:53 +00:00
9f5494cb87 Fixes a misprint that was introduced in cb83d494e0.
This was SVN commit r22228.
2019-04-25 18:59:41 +00:00
06fae58904 Reload wheel-adjusted batchsize immediately
Commented by: elexis
Differential Revision: https://code.wildfiregames.com/D1742
This was SVN commit r22227.
2019-04-25 17:19:47 +00:00
bc93f51a1c Add an experience status bar
Earlier version reviewed by: bb
Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D1460
This was SVN commit r22226.
2019-04-25 15:58:54 +00:00
98f4ed6cb8 Fix D1491 which introduced an ENSURE that should not have been there.
Reported by wowgetoffyourcellphone.

This was SVN commit r22225.
2019-04-25 07:08:19 +00:00
wackyserious
fbfefa6063 New Texture: Celtic Druid
Discussion:
https://wildfiregames.com/forum/index.php?/topic/23002-task-celtic-unit-textures/page/9/
Thread:
https://wildfiregames.com/forum/index.php?/topic/25402-task-celtic-druid-re-texture/

Reviewed by: Stanislas69, Genava55 and Sundiata
This was SVN commit r22223.
2019-04-25 04:55:11 +00:00
wackyserious
b0bab436de Retexture: Illyrian helmet (Bronze and Gold variants)
- Reduced probability for gold and other variant.

Reviewed by Stanislas69

This was SVN commit r22222.
2019-04-25 03:38:44 +00:00
wackyserious
d7e10a9617 New Texture: Elite Greek Hoplite (Bronze cuirass, Scale and Lamellar)
Thread:
https://wildfiregames.com/forum/index.php?/topic/22184-task-hellenic-unit-textures/page/7/#comments

Reviewed by several community and team members.

This was SVN commit r22221.
2019-04-25 02:02:02 +00:00
bb
c6c439a81f Correct the grammer of 0ed704e791
Differential Revision: https://code.wildfiregames.com/D1841
This was SVN commit r22220.
2019-04-24 19:15:57 +00:00
fa726867f1 Const-Correct the long range pathfinder
Debug variables are kept mutable as one otherwise has to use a complex
system and this is really not worth it.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1491
This was SVN commit r22219.
2019-04-24 19:07:32 +00:00
d3de36527d Hierarchical pathfinder: fix an issue with regions and some touch-ups
FindPassableRegions intends to return all passable regions in a chunk,
but did not as it used the number of regions in that chunk. In fact,
regions can have individual IDs higher than the number of regions (as
shown by the test), therefore FindPassableRegions might miss some.
This only affected the JPS pathfinder, when starting on an impassable
cell, which called FindNearestPassableNavcell with then possibly
returned a sub-optimal navcell. This is a limited impact but upcoming
patches will rely on that function more.

Fixed using a vector to store IDs, which also makes for-range loops
usable.

Differential Revision: https://code.wildfiregames.com/D1832
This was SVN commit r22218.
2019-04-24 19:02:09 +00:00
71125baf74 Fix tests on Visual Studio 2013, which doesn't deduce types when using std::map initializer lists.
Includes some style normalization.

Refs 60cfd2d16c.

Patch By: Stan
Reviewed By: vladislavbelov, Itms
Differential Revision: https://code.wildfiregames.com/D1845
This was SVN commit r22216.
2019-04-23 20:54:32 +00:00
3a031128f7 Refactor and cleanup of CGameView.
Commented By: asterix, elexis, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D1571
This was SVN commit r22214.
2019-04-22 22:12:08 +00:00
285db48813 Simple cleanup of Shapes, removes old style format.
Reviewed By: wraitii
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1809
This was SVN commit r22213.
2019-04-22 21:53:11 +00:00
eae5f11c5e Fix TLS Segfault on various mac versions
Accepted by: @wraitii
Tested by: Tobbi, Servo, HMS-Surprise
Thread:
https://wildfiregames.com/forum/index.php?/topic/25120-macos-osx-rc-bundles/page/2/&tab=comments#comment-368603

Fixes #5386

Differential Revision: https://code.wildfiregames.com/D1772
This was SVN commit r22212.
2019-04-22 21:49:55 +00:00
fd719833ab Replace includes uniform_foo with uniform_foo_distribution as it's deprecated in newer versions of boost. It was added in the 1.47 version.
Reviewed by: @Angen, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1823
This was SVN commit r22211.
2019-04-22 21:45:23 +00:00
bc3fd69bf0 Const-correct the hierarchical pathfinder.
Use at() over find() as it makes the code neater and the performance
impact is negligible.
This forces an algorithm change in FindReachableRegions as the key
accessed is not guaranteed to exist.

Differential Revision: https://code.wildfiregames.com/D1830
This was SVN commit r22210.
2019-04-22 16:07:25 +00:00
a0ec66fc4a Fix portrait icons of mechanical units broken by d3a73f0611. Reported by Polakrity.
This was SVN commit r22209.
2019-04-22 15:53:34 +00:00
ccfae46042 Accidentally committed an upstream version of the hierarchical pathfinder tests in 60cfd2d16c.
This fixes that.

This was SVN commit r22208.
2019-04-22 14:31:19 +00:00
60cfd2d16c Actually add the test file for ab5f63e087.
This was SVN commit r22207.
2019-04-22 12:44:28 +00:00
4c7f14b7f3 Add a few assertions to pathfinder tests, fix the disabled tests.
Differential Revision: https://code.wildfiregames.com/D1831
This was SVN commit r22206.
2019-04-22 12:13:54 +00:00
ab5f63e087 Add tests for the hierarchical pathfinder.
These variously test some simple MakeGoalReachable and
FindNearestNavcell calls, as well as checking edges and regions when
updating the map.

Differential Revision: https://code.wildfiregames.com/D1833
This was SVN commit r22205.
2019-04-22 12:07:30 +00:00
d3a73f0611 Rename generic ballista template to boltshooter and onager to stonethrower to avoid ambiguity. Remove template_unit_mechanical.xml and remove '_mechanical' from ship and siege template paths.
The template tree included 'template_unit_mechanical.xml', which had two
children, '*_ship.xml' and '*_siege.xml'.
This template did little and implied a relevant common ancestor to ship
and siege units. As organic units do not descend from a generic
'Organic', this was not necessary.

This commit removes this template and the '_mechanical' bit from
children templates to simplify.

Additionally, this renames:
 - template_unit_mechanical_siege_ballista.xml to
template_unit_siege_boltshooter.xml
 - template_unit_mechanical_siege_onager.xml to
template_unit_siege_stonethrower.xml
This helps avoid ambiguity, as our Roman ballista for example throws
stones (even if it is a torsion engine), and 'ballista' refers to a bolt
shooter in Age of Empires 1 (and in AoE 2 for the Elephant Ballista,
confusingly not named a scorpion like other bolt shooters in that game).

Patch By: Nescio
Reviewers: Wraitii

Subscribers: Itms, O14 Maps, wraitii, elexis, Vulcan, Stan

Differential Revision: https://code.wildfiregames.com/D1760
This was SVN commit r22204.
2019-04-21 17:04:15 +00:00
bb
0ed704e791 Communicate field diminishing returns to the player in the fields tooltip
refs: #4669
Patch By: happyconcepts
Comments By: Nescio
Differential Revision: https://code.wildfiregames.com/D1803
This was SVN commit r22203.
2019-04-21 16:26:39 +00:00
bb
a7c2f40ac5 Bring the palisade templates under their own parent (instead of the stone wall).
While at it:
- Remove the stone cost/loot from palisades
- Change the gate tooltip to not mention stone walls
- Standartize palisade armour (don't reuse the walls' armour)
- Demand village phase instead of town phase for all palisades
- Remove stone wall classes from palisades

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1796
This was SVN commit r22202.
2019-04-21 14:55:36 +00:00
f9b529f2fb Remove workaround in GetGUIObjectByName
f0d9806b3f added a problem: Engine.GetGuiObjectByName is unaware of the
caller GUI page.
So GUI pages in the background that still run the onTick and other event
code tried to look on the topmost GUI page, rather than their own GUI
page.
9674c3c0fe added a workaround that has to be copied to any place that
can call JS code.
If developers don't know about the reason for this workaround and add a
new place that can call JS code (#5369), they won't be able to implement
anything.

This removes this workaround by passing the pointer to the correct GUI
page as callback data.

Patch By: elexis
Reviewed By: wraitii
Refs #5369

Trac Tickets: #5369

Differential Revision: https://code.wildfiregames.com/D1701
This was SVN commit r22200.
2019-04-20 15:49:42 +00:00
6225377c4d Cleanup deprecated SM-specific syntax in ExtractFormations in Commands.js
This piece of code used Array comprehensions, since deprecated, and
removed in Firefox 58. See
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions

Patch By: smiley
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1724
This was SVN commit r22199.
2019-04-20 15:34:40 +00:00
def47cb7ae Change Run Speed into a Run multiplier.
This changes running speed into a running multiplier (of walk speed).

The advantage is that it simplifies code since you can setup a default
run multiplier at the template level and it'll work for all subsequent
templates, and technologies cannot forget to change it. It makes
specialised unit templates easier to maintain, too.

Formations have a 100 run multiplier which effectively sets their
maximal walking speed at 100

Reviewed By: bb, O2 JS Simulation
Differential Revision: https://code.wildfiregames.com/D438
This was SVN commit r22197.
2019-04-19 10:04:50 +00:00
46fc204033 Correctly handle receiving 0 damage as not receiving any damage.
Do not flag a unit as injured when it receives 0 damage.
Do not flag dead units as injured.
Do not mark units as injured when they are full health and killed at one
shot.

Cleanup Reduce, introducing a separate function to handle deaths.

Patch By: Angen
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1769
This was SVN commit r22196.
2019-04-19 09:13:31 +00:00
e678f4c151 cattails fix
This was SVN commit r22194.
2019-04-18 22:18:51 +00:00