Formation animation refactor - use animation variants instead of special move override.
The animation overrides are a little awkward. Instead, use animation
variants, which allow defining different animations (and props and such)
easily for different units in a formation.
This lets us clean up the special C++ code to override the walk
animations.
It continues the work started by 8446b92f1b
.
Original Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1337
This was SVN commit r22442.
This commit is contained in:
parent
3c3f85ce98
commit
7cf6244110
@ -11,14 +11,17 @@
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/base_swordsman_shield_ready.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
<variant file="biped/carry_food.xml"/>
|
||||
<variant file="biped/carry_meat.xml"/>
|
||||
<variant file="biped/carry_wood.xml"/>
|
||||
<variant file="biped/carry_stone.xml"/>
|
||||
<variant file="biped/carry_metal.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/attack_slaughter.xml"/>
|
||||
<variant file="biped/gather_tree.xml"/>
|
||||
@ -33,19 +36,5 @@
|
||||
<variant file="biped/build_farm.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -37,7 +37,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="idle"/>
|
||||
<variant frequency="1" name="walk_testudo_top">
|
||||
<variant frequency="1" name="testudo_top">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
@ -45,7 +45,7 @@
|
||||
<prop actor="" attachpoint="feather_d"/>
|
||||
</props>
|
||||
</variant>
|
||||
<variant frequency="1" name="walk_testudo_front">
|
||||
<variant frequency="1" name="testudo_front">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
@ -53,7 +53,7 @@
|
||||
<prop actor="" attachpoint="feather_d"/>
|
||||
</props>
|
||||
</variant>
|
||||
<variant frequency="1" name="walk_testudo_front_left">
|
||||
<variant frequency="1" name="testudo_front_left">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
@ -61,7 +61,7 @@
|
||||
<prop actor="" attachpoint="feather_d"/>
|
||||
</props>
|
||||
</variant>
|
||||
<variant frequency="1" name="walk_testudo_front_right">
|
||||
<variant frequency="1" name="testudo_front_right">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
@ -69,7 +69,7 @@
|
||||
<prop actor="" attachpoint="feather_d"/>
|
||||
</props>
|
||||
</variant>
|
||||
<variant frequency="1" name="idle_testudo_top">
|
||||
<variant frequency="1" name="testudo_top">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
@ -77,7 +77,7 @@
|
||||
<prop actor="" attachpoint="feather_d"/>
|
||||
</props>
|
||||
</variant>
|
||||
<variant frequency="1" name="idle_testudo_front">
|
||||
<variant frequency="1" name="testudo_front">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
@ -85,7 +85,7 @@
|
||||
<prop actor="" attachpoint="feather_d"/>
|
||||
</props>
|
||||
</variant>
|
||||
<variant frequency="1" name="idle_testudo_front_left">
|
||||
<variant frequency="1" name="testudo_front_left">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
@ -93,7 +93,7 @@
|
||||
<prop actor="" attachpoint="feather_d"/>
|
||||
</props>
|
||||
</variant>
|
||||
<variant frequency="1" name="idle_testudo_front_right">
|
||||
<variant frequency="1" name="testudo_front_right">
|
||||
<props>
|
||||
<prop actor="" attachpoint="feather_a"/>
|
||||
<prop actor="" attachpoint="feather_b"/>
|
||||
|
@ -31,9 +31,6 @@
|
||||
<variant file="biped/carry_wood.xml"/>
|
||||
<variant file="biped/carry_stone.xml"/>
|
||||
<variant file="biped/carry_metal.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/attack_slaughter.xml"/>
|
||||
<variant file="biped/gather_tree.xml"/>
|
||||
@ -47,24 +44,14 @@
|
||||
<variant file="biped/build.xml"/>
|
||||
<variant file="biped/build_farm.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/anti_cavalry_idle_front.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_idle_back.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_attack_back.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_attack_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_front.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_back.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -22,9 +22,6 @@
|
||||
<variant file="biped/carry_wood.xml"/>
|
||||
<variant file="biped/carry_stone.xml"/>
|
||||
<variant file="biped/carry_metal.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/attack_slaughter.xml"/>
|
||||
<variant file="biped/gather_tree.xml"/>
|
||||
@ -38,24 +35,14 @@
|
||||
<variant file="biped/build.xml"/>
|
||||
<variant file="biped/build_farm.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/anti_cavalry_idle_front.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_idle_back.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_attack_back.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_attack_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_front.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_back.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -31,9 +31,6 @@
|
||||
<variant file="biped/carry_wood.xml"/>
|
||||
<variant file="biped/carry_stone.xml"/>
|
||||
<variant file="biped/carry_metal.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/attack_slaughter.xml"/>
|
||||
<variant file="biped/gather_tree.xml"/>
|
||||
@ -47,24 +44,14 @@
|
||||
<variant file="biped/build.xml"/>
|
||||
<variant file="biped/build_farm.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/anti_cavalry_idle_front.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_idle_back.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_attack_back.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_attack_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_front.xml"/>
|
||||
<variant file="biped/formations/anti_cavalry_back.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -36,9 +36,6 @@
|
||||
<variant file="biped/carry_wood.xml"/>
|
||||
<variant file="biped/carry_stone.xml"/>
|
||||
<variant file="biped/carry_metal.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/attack_slaughter.xml"/>
|
||||
<variant file="biped/gather_tree.xml"/>
|
||||
@ -52,20 +49,12 @@
|
||||
<variant file="biped/build.xml"/>
|
||||
<variant file="biped/build_farm.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -36,9 +36,6 @@
|
||||
<variant file="biped/carry_wood.xml"/>
|
||||
<variant file="biped/carry_stone.xml"/>
|
||||
<variant file="biped/carry_metal.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/attack_slaughter.xml"/>
|
||||
<variant file="biped/gather_tree.xml"/>
|
||||
@ -52,18 +49,12 @@
|
||||
<variant file="biped/build.xml"/>
|
||||
<variant file="biped/build_farm.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<actor version="1">
|
||||
<castshadow/>
|
||||
<group>
|
||||
<variant file="biped/base_swordsman_shield_ready.xml">
|
||||
<variant frequency="1">
|
||||
<props>
|
||||
<prop actor="props/units/heads/new/rome_head_veteran.xml" attachpoint="head"/>
|
||||
<prop actor="props/units/heads/rome_monte_su.xml" attachpoint="helmet"/>
|
||||
@ -11,6 +11,17 @@
|
||||
</props>
|
||||
</variant>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/base_swordsman_shield_ready.xml" />
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="2" name="Scale-Brass">
|
||||
<mesh>skeletal/new/m_armor_tunic_long.dae</mesh>
|
||||
@ -49,24 +60,5 @@
|
||||
</textures>
|
||||
</variant>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -15,25 +15,14 @@
|
||||
<texture file="skeletal/rome_su3_marian_legion_spec.png" name="specTex"/>
|
||||
</textures>
|
||||
</variant>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans_spec.xml</material>
|
||||
</actor>
|
||||
|
@ -14,23 +14,14 @@
|
||||
<texture file="skeletal/rome_su4_imperial_legion.dds" name="baseTex"/>
|
||||
</textures>
|
||||
</variant>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -16,29 +16,18 @@
|
||||
<texture file="skeletal/imp/infantry_swordsman_c_a_spec.dds" name="specTex"/>
|
||||
</textures>
|
||||
</variant>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/death_infantry.xml">
|
||||
<props>
|
||||
<prop actor="props/units/capes/swordsman_shield_ready_centurion.xml" attachpoint="root"/>
|
||||
</props>
|
||||
</variant>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans_spec.xml</material>
|
||||
</actor>
|
||||
|
@ -31,9 +31,6 @@
|
||||
<variant file="biped/carry_wood.xml"/>
|
||||
<variant file="biped/carry_stone.xml"/>
|
||||
<variant file="biped/carry_metal.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant frequency="1" name="Idle"/>
|
||||
<variant file="biped/attack_capture.xml"/>
|
||||
<variant file="biped/attack_slaughter.xml"/>
|
||||
<variant file="biped/gather_tree.xml"/>
|
||||
@ -47,20 +44,12 @@
|
||||
<variant file="biped/build.xml"/>
|
||||
<variant file="biped/build_farm.xml"/>
|
||||
<variant file="biped/death_infantry.xml"/>
|
||||
</group>
|
||||
<group>
|
||||
<variant file="biped/formations/testudo_idle_top.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_top.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_left.xml"/>
|
||||
<variant file="biped/formations/testudo_idle_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_right.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_walk_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_top.xml"/>
|
||||
<variant file="biped/formations/testudo_front.xml"/>
|
||||
<variant file="biped/formations/testudo_front_left.xml"/>
|
||||
<variant file="biped/formations/testudo_front_right.xml"/>
|
||||
<variant file="biped/formations/testudo_left.xml"/>
|
||||
<variant file="biped/formations/testudo_right.xml"/>
|
||||
</group>
|
||||
<material>player_trans.xml</material>
|
||||
</actor>
|
||||
|
@ -1,5 +0,0 @@
|
||||
<variant name="attack_anti_cavalry_back" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/anti_cavalry_back_attack.dae" name="attack_anti_cavalry_back" speed="30"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="attack_anti_cavalry_front" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/anti_cavalry_front_attack.dae" name="attack_anti_cavalry_front" speed="30"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="anti_cavalry_back" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/anti_cavalry_back_attack.dae" name="Attack" speed="30"/>
|
||||
<animation file="biped/new/anti_cavalry_back_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/spear_walk_relax.dae" name="Walk" id="walk1" speed="30"/>
|
||||
<animation file="biped/new/spear_walk_relax.dae" name="Walk" id="walk2" speed="32"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="anti_cavalry_front" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/anti_cavalry_front_attack.dae" name="Attack" speed="30"/>
|
||||
<animation file="biped/new/anti_cavalry_front_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/spear_walk_relax.dae" name="Walk" id="walk1" speed="30"/>
|
||||
<animation file="biped/new/spear_walk_relax.dae" name="Walk" id="walk2" speed="32"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_anti_cavalry_back" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/anti_cavalry_back_idle.dae" name="idle_anti_cavalry_back" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_anti_cavalry_front" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/anti_cavalry_front_idle.dae" name="idle_anti_cavalry_front" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="testudo_front" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_shield_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/testudo_front_shield_walk.dae" name="Walk" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_front_shield_walk.dae" name="Walk" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_front_shield_walk.dae" name="Walk" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="testudo_front_left" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_left_shield_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/testudo_front_left_shield_walk.dae" name="Walk" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_front_left_shield_walk.dae" name="Walk" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_front_left_shield_walk.dae" name="Walk" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="testudo_front_right" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_right_shield_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/testudo_front_right_shield_walk.dae" name="Walk" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_front_right_shield_walk.dae" name="Walk" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_front_right_shield_walk.dae" name="Walk" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_testudo_front" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_shield_idle.dae" name="idle_testudo_front" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_testudo_front_left" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_left_shield_idle.dae" name="idle_testudo_front_left" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_testudo_front_right" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_right_shield_idle.dae" name="idle_testudo_front_right" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_testudo_left" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_left_shield_idle.dae" name="idle_testudo_left" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_testudo_right" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_right_shield_idle.dae" name="idle_testudo_right" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,5 +0,0 @@
|
||||
<variant name="idle_testudo_top" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_top_shield_idle.dae" name="idle_testudo_top" speed="100"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="testudo_left" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_left_shield_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/testudo_left_shield_walk.dae" name="Walk" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_left_shield_walk.dae" name="Walk" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_left_shield_walk.dae" name="Walk" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="testudo_right" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_right_shield_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/testudo_right_shield_walk.dae" name="Walk" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_right_shield_walk.dae" name="Walk" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_right_shield_walk.dae" name="Walk" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<variant name="testudo_top" frequency="0">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_top_shield_idle.dae" name="Idle" speed="100"/>
|
||||
<animation file="biped/new/testudo_top_shield_walk.dae" name="Walk" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_top_shield_walk.dae" name="Walk" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_top_shield_walk.dae" name="Walk" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,7 +0,0 @@
|
||||
<variant name="walk_testudo_front" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_shield_walk.dae" name="walk_testudo_front" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_front_shield_walk.dae" name="walk_testudo_front" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_front_shield_walk.dae" name="walk_testudo_front" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,7 +0,0 @@
|
||||
<variant name="walk_testudo_front_left" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_left_shield_walk.dae" name="walk_testudo_front_left" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_front_left_shield_walk.dae" name="walk_testudo_front_left" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_front_left_shield_walk.dae" name="walk_testudo_front_left" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,7 +0,0 @@
|
||||
<variant name="walk_testudo_front_right" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_front_right_shield_walk.dae" name="walk_testudo_front_right" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_front_right_shield_walk.dae" name="walk_testudo_front_right" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_front_right_shield_walk.dae" name="walk_testudo_front_right" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,7 +0,0 @@
|
||||
<variant name="walk_testudo_left" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_left_shield_walk.dae" name="walk_testudo_left" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_left_shield_walk.dae" name="walk_testudo_left" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_left_shield_walk.dae" name="walk_testudo_left" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,7 +0,0 @@
|
||||
<variant name="walk_testudo_right" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_right_shield_walk.dae" name="walk_testudo_right" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_right_shield_walk.dae" name="walk_testudo_right" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_right_shield_walk.dae" name="walk_testudo_right" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
</variant>
|
@ -1,10 +0,0 @@
|
||||
<variant name="walk_testudo_top" frequency="1">
|
||||
<animations>
|
||||
<animation file="biped/new/testudo_top_shield_walk.dae" name="walk_testudo_top" id="testwalk1" speed="15"/>
|
||||
<animation file="biped/new/testudo_top_shield_walk.dae" name="walk_testudo_top" id="testwalk2" speed="16"/>
|
||||
<animation file="biped/new/testudo_top_shield_walk.dae" name="walk_testudo_top" id="testwalk3" speed="17"/>
|
||||
</animations>
|
||||
<props>
|
||||
<prop actor="" attachpoint="weapon_R"/>
|
||||
</props>
|
||||
</variant>
|
@ -62,13 +62,8 @@ Formation.prototype.Schema =
|
||||
"<element name='UnitSeparationDepthMultiplier' a:help='Place the units in the formation closer or further to each other. The standard separation is the footprint size.'>" +
|
||||
"<ref name='nonNegativeDecimal'/>" +
|
||||
"</element>" +
|
||||
"<element name='Animations' a:help='Give a list of animations to use for the particular formation members, based on their positions'>" +
|
||||
"<zeroOrMore>" +
|
||||
"<element a:help='The name of the default animation (walk, idle, attack_ranged...) that will be transformed in the formation-specific ResetMoveAnimation'>" +
|
||||
"<anyName/>" +
|
||||
"<text a:help='example text: \"1..1,1..-1:animation1;2..2,1..-1;animation2\", this will set animation1 for the first row, and animation2 for the second row. The first part of the numbers (1..1 and 2..2) means the row range. Every row between (and including) those values will switch animations. The second part of the numbers (1..-1) denote the columns inside those rows that will be affected. Note that in both cases, you can use -1 for the last row/column, -2 for the second to last, etc.'/>" +
|
||||
"</element>" +
|
||||
"</zeroOrMore>" +
|
||||
"<element name='Animations' a:help='Give a list of animation variants to use for the particular formation members, based on their positions'>" +
|
||||
"<text a:help='example text: \"1..1,1..-1:animation1;2..2,1..-1;animation2\", this will set animation1 for the first row, and animation2 for the second row. The first part of the numbers (1..1 and 2..2) means the row range. Every row between (and including) those values will switch animations. The second part of the numbers (1..-1) denote the columns inside those rows that will be affected. Note that in both cases, you can use -1 for the last row/column, -2 for the second to last, etc.'/>" +
|
||||
"</element>";
|
||||
|
||||
var g_ColumnDistanceThreshold = 128; // distance at which we'll switch between column/box formations
|
||||
@ -90,12 +85,10 @@ Formation.prototype.Init = function()
|
||||
this.maxRows = +(this.template.MaxRows || 0);
|
||||
this.centerGap = +(this.template.CenterGap || 0);
|
||||
|
||||
var animations = this.template.Animations;
|
||||
this.animations = {};
|
||||
for (var animationName in animations)
|
||||
this.animations = [];
|
||||
if (this.template.Animations)
|
||||
{
|
||||
var differentAnimations = animations[animationName].split(/\s*;\s*/);
|
||||
this.animations[animationName] = [];
|
||||
let differentAnimations = this.template.Animations.split(/\s*;\s*/);
|
||||
// loop over the different rectangulars that will map to different animations
|
||||
for (var rectAnimation of differentAnimations)
|
||||
{
|
||||
@ -106,7 +99,7 @@ Formation.prototype.Init = function()
|
||||
var minRow, maxRow, minColumn, maxColumn;
|
||||
[minRow, maxRow] = rows.split(/\s*\.\.\s*/);
|
||||
[minColumn, maxColumn] = columns.split(/\s*\.\.\s*/);
|
||||
this.animations[animationName].push({
|
||||
this.animations.push({
|
||||
"minRow": +minRow,
|
||||
"maxRow": +maxRow,
|
||||
"minColumn": +minColumn,
|
||||
@ -206,16 +199,14 @@ Formation.prototype.GetPrimaryMember = function()
|
||||
/**
|
||||
* Get the formation animation for a certain member of this formation
|
||||
* @param entity The entity ID to get the animation for
|
||||
* @param defaultAnimation The name of the default wanted animation for the entity
|
||||
* E.g. "walk", "idle" ...
|
||||
* @return The name of the transformed animation as defined in the template
|
||||
* E.g. "walk_testudo_row1"
|
||||
* E.g. "testudo_row1"
|
||||
*/
|
||||
Formation.prototype.GetFormationAnimation = function(entity, defaultAnimation)
|
||||
Formation.prototype.GetFormationAnimation = function(entity)
|
||||
{
|
||||
var animationGroup = this.animations[defaultAnimation];
|
||||
if (!animationGroup || this.columnar || !this.memberPositions[entity])
|
||||
return defaultAnimation;
|
||||
var animationGroup = this.animations;
|
||||
if (!animationGroup.length || this.columnar || !this.memberPositions[entity])
|
||||
return "formation";
|
||||
var row = this.memberPositions[entity].row;
|
||||
var column = this.memberPositions[entity].column;
|
||||
for (var i = 0; i < animationGroup.length; ++i)
|
||||
@ -246,7 +237,7 @@ Formation.prototype.GetFormationAnimation = function(entity, defaultAnimation)
|
||||
|
||||
return animationGroup[i].animation;
|
||||
}
|
||||
return defaultAnimation;
|
||||
return "formation";
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1250,6 +1250,15 @@ UnitAI.prototype.UnitFsmSpec = {
|
||||
}
|
||||
},
|
||||
|
||||
"enter": function() {
|
||||
let cmpFormation = Engine.QueryInterface(this.formationController, IID_Formation);
|
||||
if (cmpFormation)
|
||||
this.SetAnimationVariant(cmpFormation.GetFormationAnimation(this.entity));
|
||||
},
|
||||
|
||||
"leave": function() {
|
||||
this.SetDefaultAnimationVariant();
|
||||
},
|
||||
|
||||
"IDLE": {
|
||||
"enter": function() {
|
||||
@ -1263,16 +1272,9 @@ UnitAI.prototype.UnitFsmSpec = {
|
||||
|
||||
"WALKING": {
|
||||
"enter": function() {
|
||||
var cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
|
||||
let cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
|
||||
cmpUnitMotion.MoveToFormationOffset(this.order.data.target, this.order.data.x, this.order.data.z);
|
||||
|
||||
var cmpFormation = Engine.QueryInterface(this.formationController, IID_Formation);
|
||||
var cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
|
||||
if (cmpFormation && cmpVisual)
|
||||
{
|
||||
cmpVisual.ReplaceMoveAnimation("walk", cmpFormation.GetFormationAnimation(this.entity, "walk"));
|
||||
cmpVisual.ReplaceMoveAnimation("run", cmpFormation.GetFormationAnimation(this.entity, "run"));
|
||||
}
|
||||
this.SelectAnimation("move");
|
||||
},
|
||||
|
||||
@ -1286,13 +1288,6 @@ UnitAI.prototype.UnitFsmSpec = {
|
||||
if (this.FinishOrder())
|
||||
return;
|
||||
|
||||
let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
|
||||
if (cmpVisual)
|
||||
{
|
||||
cmpVisual.ResetMoveAnimation("walk");
|
||||
cmpVisual.ResetMoveAnimation("run");
|
||||
}
|
||||
|
||||
let cmpFormation = Engine.QueryInterface(this.formationController, IID_Formation);
|
||||
if (cmpFormation)
|
||||
cmpFormation.SetInPosition(this.entity);
|
||||
@ -1861,19 +1856,12 @@ UnitAI.prototype.UnitFsmSpec = {
|
||||
prepare = Math.max(prepare, repeatLeft);
|
||||
}
|
||||
|
||||
if (!this.IsFormationMember())
|
||||
this.SetAnimationVariant("combat");
|
||||
|
||||
this.oldAttackType = this.order.data.attackType;
|
||||
// add prefix + no capital first letter for attackType
|
||||
let animationName = "attack_" + this.order.data.attackType.toLowerCase();
|
||||
if (this.IsFormationMember())
|
||||
{
|
||||
let cmpFormationController = Engine.QueryInterface(this.formationController, IID_Formation);
|
||||
if (cmpFormationController)
|
||||
animationName = cmpFormationController.GetFormationAnimation(this.entity, animationName);
|
||||
}
|
||||
|
||||
this.SetAnimationVariant("combat");
|
||||
|
||||
this.SelectAnimation(animationName);
|
||||
this.SelectAnimation("attack_" + this.order.data.attackType.toLowerCase());
|
||||
this.SetAnimationSync(prepare, this.attackTimers.repeat);
|
||||
this.StartTimer(prepare, this.attackTimers.repeat);
|
||||
// TODO: we should probably only bother syncing projectile attacks, not melee
|
||||
|
@ -15,14 +15,8 @@
|
||||
<MaxRows>2</MaxRows>
|
||||
<WidthDepthRatio>0.8</WidthDepthRatio>
|
||||
<Animations>
|
||||
<idle>
|
||||
1..1,1..-1: idle_anti_cavalry_front;
|
||||
2..2,1..-1: idle_anti_cavalry_back
|
||||
</idle>
|
||||
<attack>
|
||||
1..1,1..-1: attack_anti_cavalry_front;
|
||||
2..2,1..-1: attack_anti_cavalry_back
|
||||
</attack>
|
||||
1..1,1..-1: anti_cavalry_front;
|
||||
2..2,1..-1: anti_cavalry_back
|
||||
</Animations>
|
||||
<SpeedMultiplier>1</SpeedMultiplier>
|
||||
</Formation>
|
||||
|
@ -12,26 +12,9 @@
|
||||
<MaxColumns>20</MaxColumns>
|
||||
<MaxRows>8</MaxRows>
|
||||
<Animations>
|
||||
<idle>
|
||||
1..2,1..-1: phalanx_idle;
|
||||
3..4,1..-1: phalanx_idle;
|
||||
5..6,1..-1: phalanx_back_idle
|
||||
</idle>
|
||||
<walk>
|
||||
1..2,1..-1: phalanx_walk;
|
||||
3..4,1..-1: phalanx_walk;
|
||||
5..6,1..-1: phalanx_walk
|
||||
</walk>
|
||||
<run>
|
||||
1..2,1..-1: phalanx_run;
|
||||
3..4,1..-1: phalanx_run;
|
||||
5..6,1..-1: phalanx_run
|
||||
</run>
|
||||
<attack>
|
||||
1..2,1..-1: phalanx_attack;
|
||||
3..4,1..-1: phalanx_attack;
|
||||
5..6,1..-1: phalanx_idle
|
||||
</attack>
|
||||
1..2,1..-1: phalanx_front;
|
||||
3..4,1..-1: phalanx_center;
|
||||
5..6,1..-1: phalanx_back
|
||||
</Animations>
|
||||
</Formation>
|
||||
<FormationAttack>
|
||||
|
@ -13,21 +13,9 @@
|
||||
<MaxColumns>8</MaxColumns>
|
||||
<MaxRows>8</MaxRows>
|
||||
<Animations>
|
||||
<idle>
|
||||
1..2,1..-1: syntagma_front_idle;
|
||||
3..4,1..-1: syntagma_med_idle;
|
||||
4..8,1..-1: syntagma_back_idle
|
||||
</idle>
|
||||
<walk>
|
||||
1..2,1..-1: syntagma_front_walk;
|
||||
3..4,1..-1: syntagma_med_walk;
|
||||
4..8,1..-1: syntagma_back_walk
|
||||
</walk>
|
||||
<run>
|
||||
1..2,1..-1: syntagma_front_run;
|
||||
3..4,1..-1: syntagma_med_run;
|
||||
4..8,1..-1: syntagma_back_run
|
||||
</run>
|
||||
1..2,1..-1: syntagma_front;
|
||||
3..4,1..-1: syntagma_center;
|
||||
5..8,1..-1: syntagma_back
|
||||
</Animations>
|
||||
<Sloppyness>0.15</Sloppyness>
|
||||
</Formation>
|
||||
|
@ -13,22 +13,12 @@
|
||||
<MinColumns>8</MinColumns>
|
||||
<MaxColumns>8</MaxColumns>
|
||||
<Animations>
|
||||
<idle>
|
||||
1..1,2..7: idle_testudo_front;
|
||||
1..1,1..1: idle_testudo_front_left;
|
||||
1..1,8..8: idle_testudo_front_right;
|
||||
2..-1,8..8: idle_testudo_right;
|
||||
2..-1,2..-1: idle_testudo_top;
|
||||
2..-1,1..1: idle_testudo_left
|
||||
</idle>
|
||||
<walk>
|
||||
1..1,2..7: walk_testudo_front;
|
||||
1..1,1..1: walk_testudo_front_left;
|
||||
1..1,8..8: walk_testudo_front_right;
|
||||
2..-1,8..8: walk_testudo_right;
|
||||
2..-1,2..-1: walk_testudo_top;
|
||||
2..-1,1..1: walk_testudo_left
|
||||
</walk>
|
||||
1..1,2..7: testudo_front;
|
||||
1..1,1..1: testudo_front_left;
|
||||
1..1,8..8: testudo_front_right;
|
||||
2..-1,8..8: testudo_right;
|
||||
2..-1,2..-1: testudo_top;
|
||||
2..-1,1..1: testudo_left
|
||||
</Animations>
|
||||
<SpeedMultiplier>0.25</SpeedMultiplier>
|
||||
</Formation>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2018 Wildfire Games.
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -74,8 +74,6 @@ private:
|
||||
|
||||
fixed m_R, m_G, m_B; // shading color
|
||||
|
||||
std::map<std::string, std::string> m_AnimOverride;
|
||||
|
||||
// Current animation state
|
||||
fixed m_AnimRunThreshold; // if non-zero this is the special walk/run mode
|
||||
std::string m_AnimName;
|
||||
@ -228,8 +226,6 @@ public:
|
||||
serialize.NumberFixed_Unbounded("g", m_G);
|
||||
serialize.NumberFixed_Unbounded("b", m_B);
|
||||
|
||||
SerializeMap<SerializeString, SerializeString>()(serialize, "anim overrides", m_AnimOverride);
|
||||
|
||||
serialize.NumberFixed_Unbounded("anim run threshold", m_AnimRunThreshold);
|
||||
serialize.StringASCII("anim name", m_AnimName, 0, 256);
|
||||
serialize.Bool("anim once", m_AnimOnce);
|
||||
@ -462,18 +458,6 @@ public:
|
||||
m_Unit->GetAnimation()->SetAnimationState(m_AnimName, m_AnimOnce, m_AnimSpeed.ToFloat(), m_AnimDesync.ToFloat(), m_SoundGroup.c_str());
|
||||
}
|
||||
|
||||
virtual void ReplaceMoveAnimation(const std::string& name, const std::string& replace)
|
||||
{
|
||||
m_AnimOverride[name] = replace;
|
||||
}
|
||||
|
||||
virtual void ResetMoveAnimation(const std::string& name)
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it = m_AnimOverride.find(name);
|
||||
if (it != m_AnimOverride.end())
|
||||
m_AnimOverride.erase(name);
|
||||
}
|
||||
|
||||
virtual void SelectMovementAnimation(fixed runThreshold)
|
||||
{
|
||||
m_AnimRunThreshold = runThreshold;
|
||||
@ -797,10 +781,6 @@ void CCmpVisualActor::Update(fixed UNUSED(turnLength))
|
||||
else
|
||||
name = speed < m_AnimRunThreshold ? "walk" : "run";
|
||||
|
||||
std::map<std::string, std::string>::const_iterator it = m_AnimOverride.find(name);
|
||||
if (it != m_AnimOverride.end())
|
||||
name = it->second;
|
||||
|
||||
// Selecting the animation is going to reset the anim run threshold, so save it
|
||||
fixed runThreshold = m_AnimRunThreshold;
|
||||
SelectAnimation(name, false, speed);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2018 Wildfire Games.
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -28,8 +28,6 @@ DEFINE_INTERFACE_METHOD_CONST_0("GetProjectileActor", std::wstring, ICmpVisual,
|
||||
DEFINE_INTERFACE_METHOD_CONST_0("GetProjectileLaunchPoint", CFixedVector3D, ICmpVisual, GetProjectileLaunchPoint)
|
||||
DEFINE_INTERFACE_METHOD_3("SelectAnimation", void, ICmpVisual, SelectAnimation, std::string, bool, fixed)
|
||||
DEFINE_INTERFACE_METHOD_1("SelectMovementAnimation", void, ICmpVisual, SelectMovementAnimation, fixed)
|
||||
DEFINE_INTERFACE_METHOD_1("ResetMoveAnimation", void, ICmpVisual, ResetMoveAnimation, std::string)
|
||||
DEFINE_INTERFACE_METHOD_2("ReplaceMoveAnimation", void, ICmpVisual, ReplaceMoveAnimation, std::string, std::string)
|
||||
DEFINE_INTERFACE_METHOD_1("SetAnimationSyncRepeat", void, ICmpVisual, SetAnimationSyncRepeat, fixed)
|
||||
DEFINE_INTERFACE_METHOD_1("SetAnimationSyncOffset", void, ICmpVisual, SetAnimationSyncOffset, fixed)
|
||||
DEFINE_INTERFACE_METHOD_4("SetShadingColor", void, ICmpVisual, SetShadingColor, fixed, fixed, fixed, fixed)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2018 Wildfire Games.
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -105,21 +105,6 @@ public:
|
||||
*/
|
||||
virtual void SelectAnimation(const std::string& name, bool once, fixed speed) = 0;
|
||||
|
||||
/**
|
||||
* Replaces a specified animation with another. Only affects the special speed-based
|
||||
* animation determination behaviour.
|
||||
* @param name Animation to match.
|
||||
* @param replace Animation that should replace the matched animation.
|
||||
*/
|
||||
virtual void ReplaceMoveAnimation(const std::string& name, const std::string& replace) = 0;
|
||||
|
||||
/**
|
||||
* Ensures that the given animation will be used when it normally would be,
|
||||
* removing reference to any animation that might replace it.
|
||||
* @param name Animation name to remove from the replacement map.
|
||||
*/
|
||||
virtual void ResetMoveAnimation(const std::string& name) = 0;
|
||||
|
||||
/**
|
||||
* Start playing the walk/run animations, scaled to the unit's movement speed.
|
||||
* @param runThreshold movement speed at which to switch to the run animation
|
||||
|
Loading…
Reference in New Issue
Block a user