The only working branch ever

This commit is contained in:
2016-03-04 05:02:25 +01:00
parent dbafab2cef
commit 177667eef5
17 changed files with 1385 additions and 618 deletions
@@ -94,6 +94,39 @@ protected:
}
}
void playAnimationAndReturn(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);
Events::AutoAnimationBlend eIdleBlend;
eIdleBlend.RootNode = root;
eIdleBlend.NodeName = "Idle";
eIdleBlend.AnimationEntity = animationNode;
eIdleBlend.Delay = -0.2;
eIdleBlend.Duration = 0.2;
m_EventBroker->Publish(eIdleBlend);
}
private:
EventRelay<ETYPE, Events::SetCamera> m_ESetCamera;
bool _OnSetCamera(const Events::SetCamera& e)
@@ -11,7 +11,7 @@
<RPM>420</RPM>
<ViewPunch>0.03</ViewPunch>
<ViewReturnSpeed>0.18</ViewReturnSpeed>
<ReloadTime>2</ReloadTime>
<ReloadTime>1.65</ReloadTime>
<EquipTime>0.5</EquipTime>
<TriggerHeld>false</TriggerHeld>
<FireCooldown>0</FireCooldown>
@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="WeaponModel" 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.0480000004" Z="-0.183000013"/>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Red/DefenderGunRed.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.120430306" Y="0.775375426" Z="1.36542225"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00191565475" Y="0.0324025005" Z="-0.2021029"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:AmmunitionHUD/>
<c:Transform>
<Position X="-0.0490000024" Y="0.0520000011" Z="-0.063000001"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionText">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<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/Red/DefenderGunRed.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>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.000284185546" Y="0.0318552479" Z="-0.193328083"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ThirdPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
+75 -54
View File
@@ -484,12 +484,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>Run</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model>
@@ -508,8 +506,8 @@
<EntityFile>Schema/Entities/WeaponAssaultBlueView.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.120430678" Y="-0.228860483" Z="-0.181454629"/>
<Orientation X="0.0104048448" Y="-0.00268179015" Z="0.0428442247"/>
<Position X="0.120525226" Y="-0.23723805" Z="-0.18130067"/>
<Orientation X="-0.00823593792" Y="-0.00347058685" Z="0.0434750468"/>
</c:Transform>
</Components>
<Children/>
@@ -526,50 +524,73 @@
<EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.120430678" Y="-0.228860483" Z="-0.181454629"/>
<Orientation X="0.0104048448" Y="-0.00268179015" Z="0.0428442247"/>
<Position X="0.120525226" Y="-0.23723805" Z="-0.18130067"/>
<Orientation X="-0.00823593792" Y="-0.00347058685" Z="0.0434750468"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BlendTreeAssaultWeapon">
<Entity name="FinalBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>WeaponAction</Pose2>
<Pose1>BlendTreeAssaultWeapon</Pose1>
<Pose2>BlendTreeSecondaryWeapon</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponAction">
<Entity name="BlendTreeAssaultWeapon">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>1</Weight>
<Pose1>Idle</Pose1>
<Pose2>WeaponAction</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Entity name="WeaponAction">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<Speed>1</Speed>
<Play>true</Play>
<Loop>false</Loop>
</c:Animation>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children/>
<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="Reload">
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Time>0.58991607886241582</Time>
<AnimationName>IdleF</AnimationName>
<Time>0.97212039472333345</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -579,22 +600,22 @@
</Entity>
</Children>
</Entity>
<Entity name="Idle">
<Entity name="BlendTreeSecondaryWeapon">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.14837891922093149</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeSecondaryWeapon">
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.51068473950665805</Time>
<Speed>1</Speed>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
@@ -651,8 +672,8 @@
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.156692833" Y="1.04078996" Z="-0.230734348"/>
<Orientation X="-0.00423099846" Y="-0.0376685001" Z="0.137512475"/>
<Position X="0.157275528" Y="1.04134643" Z="-0.233016849"/>
<Orientation X="-0.00424382696" Y="-0.0348230973" Z="0.137522101"/>
</c:Transform>
</Components>
<Children/>
@@ -672,8 +693,8 @@
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.156692833" Y="1.04078996" Z="-0.230734348"/>
<Orientation X="-0.00423099846" Y="-0.0376685001" Z="0.137512475"/>
<Position X="0.157275528" Y="1.04134643" Z="-0.233016849"/>
<Orientation X="-0.00424382696" Y="-0.0348230973" Z="0.137522101"/>
</c:Transform>
</Components>
<Children/>
@@ -780,7 +801,7 @@
<Components>
<c:Animation>
<AnimationName>CrouchStrafeLeftF</AnimationName>
<Time>0.86105870560012221</Time>
<Time>0.68480018110252416</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -792,7 +813,7 @@
<Components>
<c:Animation>
<AnimationName>CrouchStrafeRightF</AnimationName>
<Time>0.78838016755090479</Time>
<Time>0.61212164305330674</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -806,7 +827,7 @@
<Components>
<c:Animation>
<AnimationName>CrouchWalkF</AnimationName>
<Time>0.56675415272830776</Time>
<Time>0.39049562823070971</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -863,7 +884,7 @@
<Components>
<c:Animation>
<AnimationName>WalkF</AnimationName>
<Time>0.071908782138081051</Time>
<Time>0.89565025764048301</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -875,7 +896,7 @@
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.34392228616198395</Time>
<Time>0.1676637616643859</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -895,11 +916,11 @@
<c:Transform/>
</Components>
<Children>
<Entity name="Left">
<Entity name="Right">
<Components>
<c:Animation>
<AnimationName>StrafeLeftF</AnimationName>
<Time>0.25350140317161873</Time>
<AnimationName>StrafeRightF</AnimationName>
<Time>0.10075840855413531</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -907,11 +928,11 @@
</Components>
<Children/>
</Entity>
<Entity name="Right">
<Entity name="Left">
<Components>
<c:Animation>
<AnimationName>StrafeRightF</AnimationName>
<Time>0.27701693305173336</Time>
<AnimationName>StrafeLeftF</AnimationName>
<Time>0.077242878674020687</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -927,7 +948,7 @@
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.07079692416292005</Time>
<Time>0.027866837470497785</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -1096,7 +1117,7 @@
<Components>
<c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName>
<Time>1.4961314671805894</Time>
<Time>0.31987294268299138</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
@@ -1108,7 +1129,7 @@
<Components>
<c:Animation>
<AnimationName>IdleSecWepU</AnimationName>
<Time>1.4996565074703767</Time>
<Time>0.32339798297277866</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
File diff suppressed because it is too large Load Diff
-32
View File
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="BluSpawn" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:PlayerSpawn/>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
</c:Model>
<c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile>
</c:Spawner>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:Transform>
<Position X="57.7363472" Y="1.18853188" Z="79.5"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
-45
View File
@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitPlane.mesh</Resource>
</c:Model>
<c:Transform>
<Scale X="10" Y="10" Z="10"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:PlayerSpawn/>
<c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile>
</c:Spawner>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -98,6 +98,12 @@
</Entity>
</Children>
</Entity>
<Entity name="ReloadEffect">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00800000038" Y="0.0920000076" Z="-0.416000009"/>
<Orientation X="6.2760005" Y="0.00500000035" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:Transform>
<Position X="-0.0440000035" Y="0.136000007" Z="-0.119000003"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionText">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>320</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ThirdPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -60,16 +60,16 @@
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>8</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>DefenderWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
@@ -78,16 +78,16 @@
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>64</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>DefenderWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
-38
View File
@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
-122
View File
@@ -1,122 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Assault" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>AimAdditive</Adder>
<Receiver>BlendOverride</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponAttachment">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Scale X="1.00000012" Y="1" Z="1.00000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AimAdditive">
<Components>
<c:Animation>
<AnimationName>AimRifleA</AnimationName>
<Time>1</Time>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="BlendOverride">
<Components>
<c:BlendOverride>
<Master>ShootRifleAnimation</Master>
<Slave>MovementBlend</Slave>
</c:BlendOverride>
<c:Transform/>
</Components>
<Children>
<Entity name="ShootRifleAnimation">
<Components>
<c:Animation>
<AnimationName>ShootFastRifleU</AnimationName>
<Time>0.11937709655124218</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>BlendWalkRun</Pose1>
<Pose2>StrafeAnimation</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="StrafeAnimation">
<Components>
<c:Animation>
<AnimationName>StrafeRightF</AnimationName>
<Time>0.37772682263908042</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="BlendWalkRun">
<Components>
<c:Blend>
<Pose1>RunAnimtaion</Pose1>
<Pose2>WalkAnimation</Pose2>
<Weight>0.43000054359436035</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="RunAnimtaion">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.13674529278927716</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="WalkAnimation">
<Components>
<c:Animation>
<AnimationName>WalkF</AnimationName>
<Time>0.36615803446482609</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
-1
View File
@@ -143,7 +143,6 @@ Game::Game(int argc, char* argv[])
m_SystemPipeline->AddSystem<AbilityCooldownHUDSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<CapturePointArrowHUDSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<KillFeedSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<LifetimeSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<CapturePointSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<CapturePointHUDSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<PickupSpawnSystem>(updateOrderLevel);
@@ -56,6 +56,21 @@ void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
}
}
// Update first person run animation
/*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;
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;
}
}*/
// Fire if we're able to fire
if (canFire(cWeapon, wi)) {
fireBullet(cWeapon, wi);
@@ -101,25 +116,12 @@ void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
reloadTimer = reloadTime;
// Play animation
EntityWrapper modelEntity = wi.FirstPersonEntity.Parent().Parent();
if (modelEntity.Valid()) {
EntityWrapper blendTree = modelEntity.FirstChildByName("AssaultWeaponBlendTree");
EntityWrapper reloadBlend = blendTree.FirstChildByName("Reload");
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeAssaultWeapon", "Reload");
Events::AutoAnimationBlend eFireBlend;
eFireBlend.RootNode = modelEntity;
eFireBlend.NodeName = "Reload";
eFireBlend.Restart = true;
eFireBlend.Start = true;
m_EventBroker->Publish(eFireBlend);
Events::AutoAnimationBlend eIdleBlend;
eIdleBlend.RootNode = modelEntity;
eIdleBlend.NodeName = "Idle";
eIdleBlend.AnimationEntity = reloadBlend;
eIdleBlend.Delay = -0.2;
eIdleBlend.Duration = 0.2;
m_EventBroker->Publish(eIdleBlend);
// Spawn explosion effect
EntityWrapper reloadEffectSpawner = wi.FirstPersonEntity.FirstChildByName("FirstPersonReloadSpawner");
if (reloadEffectSpawner.Valid()) {
SpawnerSystem::Spawn(reloadEffectSpawner, reloadEffectSpawner);
}
}
@@ -201,26 +203,7 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
}
// Play animation
EntityWrapper modelEntity = wi.FirstPersonEntity.Parent().Parent();
if (modelEntity.Valid()) {
EntityWrapper blendTree = modelEntity.FirstChildByName("BlendTreeAssaultWeapon");
EntityWrapper fireBlend = blendTree.FirstChildByName("Fire");
Events::AutoAnimationBlend eFireBlend;
eFireBlend.RootNode = modelEntity;
eFireBlend.NodeName = "Fire";
eFireBlend.Restart = true;
eFireBlend.Start = true;
m_EventBroker->Publish(eFireBlend);
Events::AutoAnimationBlend eIdleBlend;
eIdleBlend.RootNode = modelEntity;
eIdleBlend.NodeName = "Idle";
eIdleBlend.AnimationEntity = fireBlend;
eIdleBlend.Delay = -0.2;
eIdleBlend.Duration = 0.2;
m_EventBroker->Publish(eIdleBlend);
}
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeAssaultWeapon", "Fire");
}
bool AssaultWeaponBehaviour::canFire(ComponentWrapper cWeapon, WeaponInfo& wi)