Cray cray weapons
This commit is contained in:
+1
-1
Submodule assets updated: 4205e92755...819f9d1c8f
@@ -9,6 +9,7 @@
|
||||
#include "Systems/SpawnerSystem.h"
|
||||
#include "Rendering/ESetCamera.h"
|
||||
#include "Core/ConfigFile.h"
|
||||
#include "Rendering/EAutoAnimationBlend.h"
|
||||
|
||||
template <typename ETYPE>
|
||||
class WeaponBehaviour : public PureSystem
|
||||
@@ -94,6 +95,31 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void playAnimation(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName)
|
||||
{
|
||||
EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model");
|
||||
if (!root.Valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityWrapper subTree = root.FirstChildByName(subTreeName);
|
||||
if (!subTree.Valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityWrapper animationNode = subTree.FirstChildByName(animationNodeName);
|
||||
if (!animationNode.Valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Events::AutoAnimationBlend eFireBlend;
|
||||
eFireBlend.RootNode = root;
|
||||
eFireBlend.NodeName = animationNodeName;
|
||||
eFireBlend.Restart = true;
|
||||
eFireBlend.Start = true;
|
||||
m_EventBroker->Publish(eFireBlend);
|
||||
}
|
||||
|
||||
void playAnimationAndReturn(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName)
|
||||
{
|
||||
EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model");
|
||||
|
||||
@@ -2,36 +2,36 @@
|
||||
<Entity name="Shield" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Deploy</Pose1>
|
||||
<Pose2>Idle</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Defender/DefenderShield.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="Shield">
|
||||
<Entity name="Deploy">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitPlane.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Shield/>
|
||||
<c:Transform>
|
||||
<Scale X="1.11800003" Y="0.0320000015" Z="1.9180001"/>
|
||||
<Orientation X="-1.57079995" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Animation>
|
||||
<AnimationName>ActivateDeactiveShieldF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="VisibleSide">
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Shielded/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitHexagon.mesh</Resource>
|
||||
<Color A="0" B="1" G="0" R="0"/>
|
||||
<Transparent>true</Transparent>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.0179871861"/>
|
||||
<Scale X="1.01900005" Y="0.0120000001" Z="1.91000009"/>
|
||||
<Orientation X="-1.57079995" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Animation>
|
||||
<AnimationName>ShieldFrontF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</c:Team>
|
||||
<c:PlayerSpawn/>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/PlayerAssaultFallbackRed.xml</EntityFile>
|
||||
<EntityFile>Schema/Entities/PlayerDefenderBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.300000012" Y="0.0270000007" Z="0"/>
|
||||
@@ -98,7 +98,7 @@
|
||||
<Color A="1" B="1" G="0.254901975" R="0"/>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="-0.600000024" Y="0" Z="0"/>
|
||||
<Position X="0.800000012" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -111,7 +111,7 @@
|
||||
<Color A="1" B="1" G="0.254901975" R="0"/>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.800000012" Y="0" Z="0"/>
|
||||
<Position X="-0.600000024" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
|
||||
@@ -485,11 +485,11 @@
|
||||
<Entity name="Hands">
|
||||
<Components>
|
||||
<c:BlendAdditive>
|
||||
<Adder>Run</Adder>
|
||||
<Adder>MovementBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
|
||||
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -506,8 +506,8 @@
|
||||
<EntityFile>Schema/Entities/WeaponAssaultBlueView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120525226" Y="-0.23723805" Z="-0.18130067"/>
|
||||
<Orientation X="-0.00823593792" Y="-0.00347058685" Z="0.0434750468"/>
|
||||
<Position X="0.120430678" Y="-0.22843723" Z="-0.181454629"/>
|
||||
<Orientation X="0.0104044294" Y="-0.00268199947" Z="0.0428439416"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -524,8 +524,8 @@
|
||||
<EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120525226" Y="-0.23723805" Z="-0.18130067"/>
|
||||
<Orientation X="-0.00823593792" Y="-0.00347058685" Z="0.0434750468"/>
|
||||
<Position X="0.120430678" Y="-0.22843723" Z="-0.181454629"/>
|
||||
<Orientation X="0.0104044294" Y="-0.00268199947" Z="0.0428439416"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -544,55 +544,31 @@
|
||||
<Entity name="BlendTreeAssaultWeapon">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>WeaponAction</Pose2>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="WeaponAction">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Fire">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootShotgunF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Reload">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ReloadSwitchF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Entity name="Fire">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.97212039472333345</Time>
|
||||
<AnimationName>ShootRifleF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Reload">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ReloadSwitchF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -608,17 +584,42 @@
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Run">
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.51068473950665805</Time>
|
||||
<Speed>1</Speed>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
@@ -672,8 +673,8 @@
|
||||
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.157275528" Y="1.04134643" Z="-0.233016849"/>
|
||||
<Orientation X="-0.00424382696" Y="-0.0348230973" Z="0.137522101"/>
|
||||
<Position X="0.15716888" Y="1.04079366" Z="-0.236010298"/>
|
||||
<Orientation X="-0.0042465888" Y="-0.0342485756" Z="0.137524009"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -693,8 +694,8 @@
|
||||
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.157275528" Y="1.04134643" Z="-0.233016849"/>
|
||||
<Orientation X="-0.00424382696" Y="-0.0348230973" Z="0.137522101"/>
|
||||
<Position X="0.15716888" Y="1.04079366" Z="-0.236010298"/>
|
||||
<Orientation X="-0.0042465888" Y="-0.0342485756" Z="0.137524009"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -801,7 +802,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeLeftF</AnimationName>
|
||||
<Time>0.68480018110252416</Time>
|
||||
<Time>0.05910900562152932</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -813,7 +814,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeRightF</AnimationName>
|
||||
<Time>0.61212164305330674</Time>
|
||||
<Time>0.9864304675723119</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -827,7 +828,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchWalkF</AnimationName>
|
||||
<Time>0.39049562823070971</Time>
|
||||
<Time>0.76480445274971487</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -870,42 +871,6 @@
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="RunWalkBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Walk</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>1.2938206818383024e-24</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Walk">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>WalkF</AnimationName>
|
||||
<Time>0.89565025764048301</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.1676637616643859</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="StrafeLRBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
@@ -920,7 +885,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeRightF</AnimationName>
|
||||
<Time>0.10075840855413531</Time>
|
||||
<Time>0.47506723307314047</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -932,7 +897,43 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeLeftF</AnimationName>
|
||||
<Time>0.077242878674020687</Time>
|
||||
<Time>0.45155170319302584</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="RunWalkBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Walk</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>1.2938206818383024e-24</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Walk">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>WalkF</AnimationName>
|
||||
<Time>0.26995908215948816</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.54197258618339106</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -948,7 +949,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.027866837470497785</Time>
|
||||
<Time>0.018840786882691418</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -1117,7 +1118,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleAssaultRifleU</AnimationName>
|
||||
<Time>0.31987294268299138</Time>
|
||||
<Time>0.69418176720199654</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -1129,7 +1130,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleSecWepU</AnimationName>
|
||||
<Time>0.32339798297277866</Time>
|
||||
<Time>0.69770680749178382</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,31 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="Player" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
<Entity name="PlayerDefender" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:AABB>
|
||||
<Origin X="0" Y="0.772000015" Z="0"/>
|
||||
<Size X="1" Y="1.60000002" Z="1"/>
|
||||
</c:AABB>
|
||||
<c:AssaultWeapon/>
|
||||
<c:Team>
|
||||
<Team>
|
||||
<Blue/>
|
||||
<Red/>
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Collidable/>
|
||||
<c:DashAbility/>
|
||||
<c:DefenderWeapon/>
|
||||
<c:DoubleJump/>
|
||||
<c:Health/>
|
||||
<c:DefenderWeapon>
|
||||
<MagazineAmmo>4</MagazineAmmo>
|
||||
<Ammo>52</Ammo>
|
||||
</c:DefenderWeapon>
|
||||
<c:Listener/>
|
||||
<c:Health>
|
||||
<Health>150</Health>
|
||||
<MaxHealth>150</MaxHealth>
|
||||
</c:Health>
|
||||
<c:ShieldAbility/>
|
||||
<c:Physics>
|
||||
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
|
||||
<Velocity X="-1.86527334e-13" Y="0" Z="1.89149233e-13"/>
|
||||
<IsOnGround>true</IsOnGround>
|
||||
</c:Physics>
|
||||
<c:Player>
|
||||
<MovementSpeed>5</MovementSpeed>
|
||||
<CurrentWeapon></CurrentWeapon>
|
||||
</c:Player>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0288832188" Z="2.64144421"/>
|
||||
<Position X="0.67159152" Y="0.0288829375" Z="1.22672582"/>
|
||||
<Orientation X="0" Y="-0.00174739491" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
@@ -38,6 +45,7 @@
|
||||
</c:Camera>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="1.27700007" Z="0"/>
|
||||
<Orientation X="1.11789882" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -213,7 +221,7 @@
|
||||
<Color A="1" B="1" G="0" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Text>
|
||||
<Content>100/100</Content>
|
||||
<Content>150/150</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="0.505882382" B="3.92156863" G="1.17647064" R="0"/>
|
||||
</c:Text>
|
||||
@@ -422,6 +430,7 @@
|
||||
<c:Text>
|
||||
<Content></Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="0.800000012" B="1" G="0.200000003" R="0"/>
|
||||
<Alignment>
|
||||
<Right/>
|
||||
</Alignment>
|
||||
@@ -485,12 +494,10 @@
|
||||
</Entity>
|
||||
<Entity name="Hands">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>BlendTreeAssaultWeapon</Pose1>
|
||||
<Pose2>BlendTreeSecondaryWeapon</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:BlendAdditive>
|
||||
<Adder>MovementBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
@@ -501,7 +508,6 @@
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
<InheritScale>true</InheritScale>
|
||||
</c:BoneAttachment>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>DefenderWeapon</Weapon>
|
||||
@@ -510,9 +516,8 @@
|
||||
<EntityFile>Schema/Entities/WeaponDefenderBlueView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120430484" Y="-0.233500004" Z="-0.181454703"/>
|
||||
<Orientation X="0.0104045747" Y="-0.00268182321" Z="0.0428442061"/>
|
||||
<Scale X="1.00000012" Y="1.00000024" Z="1.00000012"/>
|
||||
<Position X="0.120748252" Y="-0.228768602" Z="-0.181454718"/>
|
||||
<Orientation X="0.0104048951" Y="-0.00268237269" Z="0.0428444892"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -529,38 +534,39 @@
|
||||
<EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120430484" Y="-0.233500004" Z="-0.181454703"/>
|
||||
<Orientation X="0.0104045747" Y="-0.00268182321" Z="0.0428442061"/>
|
||||
<Position X="0.120748252" Y="-0.228768602" Z="-0.181454718"/>
|
||||
<Orientation X="0.0104048951" Y="-0.00268237269" Z="0.0428444892"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="BlendTreeAssaultWeapon">
|
||||
<Entity name="FinalBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>WeaponAction</Pose2>
|
||||
<Pose1>BlendTreeDefenderWeapon</Pose1>
|
||||
<Pose2>BlendTreeSecondaryWeapon</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="WeaponAction">
|
||||
<Entity name="BlendTreeDefenderWeapon">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>1</Weight>
|
||||
<Pose1>ActionBlend</Pose1>
|
||||
<Pose2>Shield</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Fire">
|
||||
<Entity name="Shield">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootShotgunF</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
<AnimationName>ActivateDeactiveShieldF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
@@ -568,39 +574,112 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Reload">
|
||||
<Entity name="ActionBlend">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ReloadSwitchF</AnimationName>
|
||||
<Time>0.080754529576125833</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>ActionBlend2</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ActionBlend2">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Fire">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootShotgunF</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Reload">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShotgunReloadTwoF</AnimationName>
|
||||
<Time>0.23333333432674408</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Entity name="BlendTreeSecondaryWeapon">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.63921736993464151</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="BlendTreeSecondaryWeapon">
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.93061516164344571</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.11396167157691739</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
@@ -632,9 +711,8 @@
|
||||
<c:Shielded/>
|
||||
<c:HiddenForLocalPlayer/>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
|
||||
<Color A="1" B="1" G="0.952941179" R="1"/>
|
||||
<Visible>false</Visible>
|
||||
<Resource>Models/Characters/Defender/DefenderBlue.mesh</Resource>
|
||||
<Color A="1" B="0" G="0" R="1"/>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -651,11 +729,11 @@
|
||||
</Person>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
|
||||
<EntityFile>Schema/Entities/WeaponDefenderBlueWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.167930618" Y="1.0368073" Z="-0.219703838"/>
|
||||
<Orientation X="-0.00422216719" Y="-0.0830619708" Z="0.137322947"/>
|
||||
<Position X="0.157449082" Y="1.04085267" Z="-0.234242111"/>
|
||||
<Orientation X="-0.0042401799" Y="-0.0355410911" Z="0.137519509"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -675,8 +753,8 @@
|
||||
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.167930618" Y="1.0368073" Z="-0.219703838"/>
|
||||
<Orientation X="-0.00422216719" Y="-0.0830619708" Z="0.137322947"/>
|
||||
<Position X="0.157449082" Y="1.04085267" Z="-0.234242111"/>
|
||||
<Orientation X="-0.0042401799" Y="-0.0355410911" Z="0.137519509"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -779,11 +857,11 @@
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Left">
|
||||
<Entity name="Right">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeLeftF</AnimationName>
|
||||
<Time>0.35189715631383223</Time>
|
||||
<AnimationName>CrouchStrafeRightF</AnimationName>
|
||||
<Time>0.73997265048741045</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -791,11 +869,11 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Right">
|
||||
<Entity name="Left">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeRightF</AnimationName>
|
||||
<Time>0.2792186182646148</Time>
|
||||
<AnimationName>CrouchStrafeLeftF</AnimationName>
|
||||
<Time>0.81265118853662788</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -809,7 +887,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchWalkF</AnimationName>
|
||||
<Time>0.057592603442017776</Time>
|
||||
<Time>0.51834663566481343</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -852,42 +930,6 @@
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="RunWalkBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Walk</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>1.2938206818383024e-24</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Walk">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>WalkF</AnimationName>
|
||||
<Time>0.56274723285179107</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.83476073687569396</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="StrafeLRBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
@@ -902,7 +944,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeRightF</AnimationName>
|
||||
<Time>0.76785538376544338</Time>
|
||||
<Time>0.22860941598823903</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -914,7 +956,43 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeLeftF</AnimationName>
|
||||
<Time>0.74433985388532875</Time>
|
||||
<Time>0.2050938861081244</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="RunWalkBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Walk</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>1.2938206818383024e-24</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Walk">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>WalkF</AnimationName>
|
||||
<Time>0.023501265074586719</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.29551476909848962</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -930,7 +1008,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.67830193028129315</Time>
|
||||
<Time>0.038981432856261655</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -1099,7 +1177,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleAssaultRifleU</AnimationName>
|
||||
<Time>1.9869699178942994</Time>
|
||||
<Time>0.44772395011709509</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -1111,7 +1189,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleSecWepU</AnimationName>
|
||||
<Time>1.9904949581840867</Time>
|
||||
<Time>0.45124899040688238</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -1159,6 +1237,50 @@
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ShieldSpawner">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.854167223" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Shield">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Deploy</Pose1>
|
||||
<Pose2>Idle</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Defender/DefenderShield.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Deploy">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ActivateDeactiveShieldF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShieldFrontF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="AABBStanding">
|
||||
@@ -1191,7 +1313,7 @@
|
||||
<Entity name="PlayerName">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>Insert name here</Content>
|
||||
<Content></Content>
|
||||
<Resource>Fonts/DroidSans.ttf,100</Resource>
|
||||
<Color A="1" B="0" G="1" R="0"/>
|
||||
</c:Text>
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource>
|
||||
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0350000001" Z="-0.295000017"/>
|
||||
</c:Transform>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
@@ -34,7 +32,7 @@
|
||||
<Entity name="AmmunitionHUD">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="-0.0490000024" Y="0.0520000011" Z="-0.063000001"/>
|
||||
<Position X="-0.0460000038" Y="0.119000003" Z="-0.162"/>
|
||||
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
@@ -2,17 +2,10 @@
|
||||
<Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
<PositionOffset X="0" Y="0.0320000015" Z="-0.165000007"/>
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource>
|
||||
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.162026152" Y="1.05794585" Z="-0.380744517"/>
|
||||
<Orientation X="-0.0628969446" Y="-0.0509683639" Z="0.118739031"/>
|
||||
</c:Transform>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
|
||||
@@ -39,6 +39,8 @@ void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
|
||||
ammo = glm::max(0, ammo - (magSize - magAmmo));
|
||||
magAmmo = glm::min(magSize, ammo);
|
||||
isReloading = false;
|
||||
wi.FirstPersonEntity["Model"]["Visible"] = true;
|
||||
wi.ThirdPersonEntity["Model"]["Visible"] = true;
|
||||
}
|
||||
|
||||
// Restore view angle
|
||||
@@ -57,19 +59,18 @@ void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
|
||||
}
|
||||
|
||||
// Update first person run animation
|
||||
/*ComponentWrapper cPlayer = wi.Player["Player"];
|
||||
ComponentWrapper cPlayer = wi.Player["Player"];
|
||||
ComponentWrapper cPhysics = wi.Player["Physics"];
|
||||
const float& movementSpeed = cPlayer["MovementSpeed"];
|
||||
float speed = glm::length((const glm::vec3&)cPhysics["Velocity"]);
|
||||
float animationSpeed = glm::max(speed, movementSpeed) / movementSpeed;
|
||||
float animationWeight = glm::min(speed, movementSpeed) / movementSpeed;
|
||||
EntityWrapper rootNode = wi.FirstPersonEntity.FirstParentWithComponent("Model");
|
||||
if (rootNode.Valid()) {
|
||||
EntityWrapper animationNode = rootNode.FirstChildByName("Run");
|
||||
if (animationNode.Valid()) {
|
||||
(bool&)animationNode["Animation"]["Play"] = animationSpeed > 0;
|
||||
(double&)animationNode["Animation"]["Speed"] = animationSpeed;
|
||||
EntityWrapper blend = rootNode.FirstChildByName("MovementBlend");
|
||||
if (blend.Valid()) {
|
||||
(double&)blend["Blend"]["Weight"] = animationWeight;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Fire if we're able to fire
|
||||
if (canFire(cWeapon, wi)) {
|
||||
@@ -122,6 +123,8 @@ void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
EntityWrapper reloadEffectSpawner = wi.FirstPersonEntity.FirstChildByName("FirstPersonReloadSpawner");
|
||||
if (reloadEffectSpawner.Valid()) {
|
||||
SpawnerSystem::Spawn(reloadEffectSpawner, reloadEffectSpawner);
|
||||
wi.FirstPersonEntity["Model"]["Visible"] = false;
|
||||
wi.ThirdPersonEntity["Model"]["Visible"] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ void DefenderWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
|
||||
m_EventBroker->Publish(e);
|
||||
} else {
|
||||
isReloading = false;
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Idle");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +97,9 @@ void DefenderWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
// Start reload
|
||||
isReloading = true;
|
||||
reloadTimer = reloadTime;
|
||||
|
||||
// Play animation
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Reload");
|
||||
}
|
||||
|
||||
void DefenderWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
@@ -115,8 +119,40 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
|
||||
if (attachment.Valid()) {
|
||||
if (e.Value > 0) {
|
||||
SpawnerSystem::Spawn(attachment, attachment);
|
||||
|
||||
EntityWrapper root = wi.FirstPersonEntity.FirstParentWithComponent("Model");
|
||||
if (root.Valid()) {
|
||||
EntityWrapper subTree = root.FirstChildByName("FinalBlend");
|
||||
if (subTree.Valid()) {
|
||||
EntityWrapper animationNode = subTree.FirstChildByName("Shield");
|
||||
if (animationNode.Valid()) {
|
||||
Events::AutoAnimationBlend eFireBlend;
|
||||
eFireBlend.RootNode = root;
|
||||
eFireBlend.NodeName = "Shield";
|
||||
eFireBlend.Restart = true;
|
||||
eFireBlend.Start = true;
|
||||
m_EventBroker->Publish(eFireBlend);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
attachment.DeleteChildren();
|
||||
|
||||
EntityWrapper root = wi.FirstPersonEntity.FirstParentWithComponent("Model");
|
||||
if (root.Valid()) {
|
||||
EntityWrapper subTree = root.FirstChildByName("FinalBlend");
|
||||
if (subTree.Valid()) {
|
||||
EntityWrapper animationNode = subTree.FirstChildByName("ActionBlend");
|
||||
if (animationNode.Valid()) {
|
||||
Events::AutoAnimationBlend eFireBlend;
|
||||
eFireBlend.RootNode = root;
|
||||
eFireBlend.NodeName = "ActionBlend";
|
||||
eFireBlend.Restart = true;
|
||||
eFireBlend.Start = true;
|
||||
m_EventBroker->Publish(eFireBlend);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,6 +231,9 @@ void DefenderWeaponBehaviour::fireShell(ComponentWrapper cWeapon, WeaponInfo& wi
|
||||
}
|
||||
}
|
||||
|
||||
// Play animation
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeDefenderWeapon", "Fire");
|
||||
|
||||
// Sound
|
||||
Events::PlaySoundOnEntity e;
|
||||
e.EmitterID = wi.Player.ID;
|
||||
|
||||
Reference in New Issue
Block a user