1
0
forked from mirrors/0ad
Commit Graph

71 Commits

Author SHA1 Message Date
mimo 14aaa7c640 add some missing semicolon
This was SVN commit r17059.
2015-09-21 21:08:58 +00:00
mimo 0b86bbd424 another bunch of cleanup (mainly missing semicolon) signaled by jshint
This was SVN commit r17045.
2015-09-19 12:50:48 +00:00
Itms b77ad821c2 Reenable formations and fix/improve the communication between UnitAI and UnitMotion. With the new pathfinder some path requests can be completed instantaneously, so UnitAI has to handle MoveStarted messages even in the IDLE state.
Please note that this commit makes #3410 really visible. Formation
members might pass through buildings.

Refs #3410, #3337.

This was SVN commit r17028.
2015-09-17 16:31:23 +00:00
Itms 128a603287 Use the terrain-only grid for terrain edges in the short pathfinder algorithm. This grid is updated on each terrain change, whereas the passability grid is updated once a turn. This caused OOS on rejoin, fixes #3292.
However, using the terrain-only grid reveals one discrepancy between the
short pathfinder (which uses unit radii) and the long one (which uses
unit clearances). So I implemented the change proposed by sanderd17 in
#3294, which is removing unit radius and using only the pathfinder
clearance. Refs #3294
Now some tweaking has to be done in the templates, so that units get a
passability class suited to their apparent size. In the meantime the
unit motion is quite bugged.

This was SVN commit r16867.
2015-07-18 08:37:49 +00:00
Itms 0f10e21ab1 Keep ownership when changing formation. Fixes #3154, fix proposed by sanderd17.
This was SVN commit r16847.
2015-07-12 08:48:31 +00:00
leper 9990d4c885 Actually call the function instead of testing if it exists. Patch by falsevision. Fixes #2626.
This was SVN commit r15342.
2014-06-13 12:54:57 +00:00
sanderd17 1e3ba2d438 Let formations use the UnitAI.AddOrder method, instead of directly deciding if ReplaceOrder or PushOrder should be used. This replaces the expectedRoute, and might lead to units behaving more as demanded. Refs #2568
This was SVN commit r15207.
2014-05-24 09:40:21 +00:00
sanderd17 99a7bc67ac Fix 672f5a8b11 when sloppyness is 0
This was SVN commit r15182.
2014-05-20 18:45:36 +00:00
sanderd17 672f5a8b11 Add sloppyness and separate icon path to formation templates (makes it possible to have multiple formation templates - like different settings for different civs - with only one icon file)
This was SVN commit r15180.
2014-05-20 17:18:40 +00:00
sanderd17 86196212e2 Improve navigation for ship formations by setting the formation controller to the right passability class
This was SVN commit r15149.
2014-05-18 07:59:43 +00:00
sanderd17 a49b359748 Fix formations attacking by adding a combat.approaching state. Fixes #2496
This was SVN commit r15054.
2014-04-28 13:05:47 +00:00
sanderd17 ff2979ca68 Save formation rotation when loading a new formation
This was SVN commit r14910.
2014-04-09 18:01:12 +00:00
sanderd17 1f63325ede Rotate entities to the right angle when forming a formation
This was SVN commit r14909.
2014-04-09 11:15:00 +00:00
sanderd17 d27dffa31d Now really fix the issue with promoting and formation animations
This was SVN commit r14906.
2014-04-06 18:43:06 +00:00
sanderd17 c5e59d02e1 Fix formation animations with promoted units
This was SVN commit r14900.
2014-04-05 09:48:57 +00:00
sanderd17 61da102371 Add testudo animations to the right actor files and use it in the formation template
This was SVN commit r14898.
2014-04-04 18:38:13 +00:00
sanderd17 639b583d31 Fix scatter formation
This was SVN commit r14700.
2014-01-29 14:01:21 +00:00
sanderd17 c751500907 Refactor some formation code to let it make use of the prototypes
This was SVN commit r14693.
2014-01-27 12:34:59 +00:00
sanderd17 09a2729503 fix a fix
This was SVN commit r14682.
2014-01-26 09:40:54 +00:00
sanderd17 f1ab9b8e57 Check isInWorld before asking position
This was SVN commit r14681.
2014-01-26 09:24:32 +00:00
sanderd17 1fedf11e9e Use a filter to pick a new attack target in the same turn, while still avoiding an infinite loop
This was SVN commit r14638.
2014-01-22 18:38:15 +00:00
sanderd17 04aba0e41a Let certain formations stay in formation while attacking
This was SVN commit r14633.
2014-01-22 13:20:55 +00:00
sanderd17 e466565c35 Let formations attack other formations (still without keeping their formation position though)
This was SVN commit r14628.
2014-01-21 16:50:58 +00:00
sanderd17 96448bfa4e * add a (currently useless) attack state to formations
* add a formation attack component that will be used in the future to
coordinate formation attacks
* clean up some related methods, and move some to more appropriate
places

This was SVN commit r14569.
2014-01-11 12:19:43 +00:00
sanderd17 f9b950aa96 improve rearrange of idle formation when units are tasked away from the formation + fix formation-settable idle animations
This was SVN commit r14544.
2014-01-08 10:55:44 +00:00
sanderd17 e8c4031bea Don't disband idle formations anymore, but give the formations a decent idle state. Formationmembers still need to leave the formation to anything other than walking, but this is a small step towards attacking formations.
This was SVN commit r14543.
2014-01-08 09:47:27 +00:00
sanderd17 4585f7322c Make the tooltips and the required members part of the formation template + fix allowing the wedge formation only for cavalry
This was SVN commit r14542.
2014-01-08 08:02:15 +00:00
sanderd17 aadd297cce Implement the ability to switch animations based on the formation position
This was SVN commit r14537.
2014-01-07 20:21:55 +00:00
sanderd17 b1e0f1b62a Clean up the mess of different ways to note the formations (capitalised, with spaces, with underscores, concatenated ...) by always referring to the template name.
This was SVN commit r14534.
2014-01-07 13:33:08 +00:00
sanderd17 94907897a7 Fix tests + fix classes Ashoka. Fixes #2362
This was SVN commit r14533.
2014-01-07 09:23:59 +00:00
sanderd17 f19a8d6b41 Take the box formation out of the special case formations
This was SVN commit r14524.
2014-01-06 13:32:48 +00:00
sanderd17 9989359c46 Small code cleanup + fixed default formation orientation
This was SVN commit r14522.
2014-01-06 10:16:28 +00:00
sanderd17 2f077fd9e1 Remove wedge formation from being a special case in the formation code
This was SVN commit r14521.
2014-01-06 09:10:46 +00:00
sanderd17 92ed27e3c5 Treat the flank formation as a regular formation, rather than a special implementation.
This was SVN commit r14518.
2014-01-05 18:50:31 +00:00
sanderd17 b8ee766cd3 Remove some hardcoded formation shapes. Some special formations still have a special treatment though. Also implement speed modifiers for formations, so we can have faster and slower formations.
This was SVN commit r14516.
2014-01-05 17:13:22 +00:00
sanderd17 d0497c83f1 Split the formation template in different templates. This can be used later to remove hard-coded formation statistics and forms to attributes in those templates
This was SVN commit r14510.
2014-01-05 10:09:42 +00:00
sanderd17 8269f0cfd4 Group units in clusters of separate formations when they're too far apart.
This was SVN commit r14483.
2014-01-02 20:04:50 +00:00
sanderd17 953e44d9f8 try using footprint instead of obstruction for separation space between formation members + Fix some footprint sizes of siege units
This was SVN commit r14393.
2013-12-26 12:24:52 +00:00
sanderd17 bcba922893 fix switching between column and other formations
This was SVN commit r14358.
2013-12-15 09:51:13 +00:00
sanderd17 c6cf074e7a Fix unitAI warning when member left the formation
This was SVN commit r14327.
2013-12-11 15:17:43 +00:00
sanderd17 208200db28 fix querying unitAI of non-existing members
This was SVN commit r14312.
2013-12-08 19:57:34 +00:00
sanderd17 783907264f cache the offset positions for formations, and only recalculate if the rotation towards a new target is big enough
This was SVN commit r14300.
2013-12-06 10:21:07 +00:00
sanderd17 d3f7da1e27 Let formation attack from the moment the first unit is in range
This was SVN commit r14297.
2013-12-05 19:26:55 +00:00
sanderd17 7b82fba8d0 remove distance sorting for formation place assignment, as it made the center of the formation run + remove debug warning in AI code
This was SVN commit r14292.
2013-12-05 12:31:04 +00:00
sanderd17 03d9db0bb7 fix comment
This was SVN commit r14291.
2013-12-05 10:44:39 +00:00
sanderd17 cf88da5829 improve formations a bit more
* Take obstruction size into account, so bigger units have more space in
formations
* Minimize the maximum walk distance to get in formation by letting the
units far away from the centre pick their positions first

This was SVN commit r14289.
2013-12-05 10:23:49 +00:00
sanderd17 3afd8e9d9e better formation place assignments (units run around less)
This was SVN commit r14281.
2013-12-04 13:14:31 +00:00
mimo 8b0f1c3f1f cleaning
This was SVN commit r14234.
2013-11-27 16:30:14 +00:00
mimo ce7c97b79f Improve back to work behaviour (queues taken into account), fix #2206, patch from Itms
This was SVN commit r14063.
2013-11-01 22:00:06 +00:00
sanderd17 379a7b208f Implement the js side of auras. Refs #2048. Patch with the help of Alpha123. Only the temple aura is added as example, all other aura components are removed from the templates to be created from scratch again.
This was SVN commit r13998.
2013-10-14 15:51:21 +00:00