Working first person animations for AssaultWeapon and DefenderWeapon and reload effect for AssaultWeapon
This commit is contained in:
+1
-1
Submodule assets updated: 6451a3f5a5...0f9208a305
@@ -32,20 +32,19 @@ public:
|
||||
|
||||
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override
|
||||
{
|
||||
EntityWrapper firstPersonWeapon = entity.FirstChildByName("Hands").FirstChildByName("AssaultWeapon");
|
||||
EntityWrapper thirdPersonWeapon = entity.FirstChildByName("PlayerModel").FirstChildByName("AssaultWeapon");
|
||||
if (IsClient && (firstPersonWeapon.Valid() || thirdPersonWeapon.Valid())) {
|
||||
if (m_ActiveWeapons.count(entity) == 0) {
|
||||
/* EntityWrapper firstPersonWeapon = entity.FirstChildByName("Hands").FirstChildByName("AssaultWeapon");
|
||||
EntityWrapper thirdPersonWeapon = entity.FirstChildByName("PlayerModel").FirstChildByName("AssaultWeapon");
|
||||
if (IsClient && (firstPersonWeapon.Valid() || thirdPersonWeapon.Valid())) {
|
||||
if (m_ActiveWeapons.count(entity) == 0) {
|
||||
WeaponInfo& wi = m_ActiveWeapons[entity];
|
||||
wi.Player = entity;
|
||||
wi.WeaponEntity = entity;
|
||||
wi.FirstPersonEntity = firstPersonWeapon;
|
||||
wi.ThirdPersonEntity = thirdPersonWeapon;
|
||||
|
||||
WeaponInfo& wi = m_ActiveWeapons[entity];
|
||||
wi.Player = entity;
|
||||
wi.WeaponEntity = entity;
|
||||
wi.FirstPersonEntity = firstPersonWeapon;
|
||||
wi.ThirdPersonEntity = thirdPersonWeapon;
|
||||
|
||||
OnEquip(cWeapon, wi);
|
||||
}
|
||||
}
|
||||
OnEquip(cWeapon, wi);
|
||||
}
|
||||
}*/
|
||||
|
||||
auto weapon = getActiveWeapon(entity);
|
||||
if (!weapon) {
|
||||
@@ -89,7 +88,7 @@ protected:
|
||||
|
||||
// Returns wi.FirstPersonEntity or wi.ThirdPersonEntity depending on
|
||||
// if the player is in first person mode or not.
|
||||
EntityWrapper getRelevantWeaponModelEntity(WeaponInfo& wi)
|
||||
EntityWrapper getRelevantWeaponEntity(WeaponInfo& wi)
|
||||
{
|
||||
if (isPlayerInFirstPerson(wi.Player)) {
|
||||
return wi.FirstPersonEntity;
|
||||
@@ -137,7 +136,7 @@ protected:
|
||||
|
||||
void playAnimationAndReturn(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName)
|
||||
{
|
||||
EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model");
|
||||
EntityWrapper root = weaponModelEntity;
|
||||
if (!root.Valid()) {
|
||||
return;
|
||||
}
|
||||
@@ -254,9 +253,9 @@ private:
|
||||
|
||||
void selectWeapon(ComponentWrapper cWeapon, EntityWrapper player)
|
||||
{
|
||||
if (!IsServer) {
|
||||
return;
|
||||
}
|
||||
//if (!IsServer) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
// Don't reselect weapon if it's already active
|
||||
if (getActiveWeapon(player)) {
|
||||
@@ -287,13 +286,15 @@ private:
|
||||
// Spawn the weapon(s)
|
||||
EntityWrapper firstPersonWeapon;
|
||||
EntityWrapper thirdPersonWeapon;
|
||||
//if (IsClient) {
|
||||
if (IsClient) {
|
||||
if (firstPersonAttachment.Valid()) {
|
||||
firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment);
|
||||
}
|
||||
//}
|
||||
if (thirdPersonAttachment.Valid()) {
|
||||
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
|
||||
}
|
||||
if (IsServer) {
|
||||
if (thirdPersonAttachment.Valid()) {
|
||||
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
|
||||
}
|
||||
}
|
||||
|
||||
WeaponInfo& wi = m_ActiveWeapons[player];
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Time>0</Time>
|
||||
<Play>false</Play>
|
||||
<Reverse>false</Reverse>
|
||||
<Speed>0</Speed>
|
||||
<Speed>1</Speed>
|
||||
<Loop>true</Loop>
|
||||
<Additive>false</Additive>
|
||||
</Animation>
|
||||
@@ -1,46 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="PrimaryBlendTree" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>WeaponAction</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:BlendAdditive>
|
||||
<Adder>MovementBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponAction">
|
||||
<Entity name="FinalBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>1</Weight>
|
||||
<Pose1>BlendTreeAssaultWeapon</Pose1>
|
||||
<Pose2>BlendTreeSecondaryWeapon</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Fire">
|
||||
<Entity name="BlendTreeAssaultWeapon">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Reload">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ReloadSwitchF</AnimationName>
|
||||
<Speed>0.5</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Fire">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootRifleF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="BlendTreeSecondaryWeapon">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootShotgunF</AnimationName>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
<Loop>false</Loop>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Reload">
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ReloadSwitchF</AnimationName>
|
||||
<Time>0.58991607886241582</Time>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -48,17 +104,116 @@
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Entity name="ViewModel">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.14837891922093149</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
|
||||
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.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="ReloadSpawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/WeaponAssaultReloadEffectView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="AmmoHUD">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Ammo_Joint</BoneName>
|
||||
<ScaleOffset X="0.5" Y="0.5" Z="1"/>
|
||||
<InheritScale>true</InheritScale>
|
||||
</c:BoneAttachment>
|
||||
<c:Transform>
|
||||
<Position X="0.0540266186" Y="-0.0954354703" Z="-0.255526125"/>
|
||||
<Orientation X="0.000684258412" Y="0.077423811" Z="0.00118651299"/>
|
||||
<Scale X="0.50000006" Y="0.500000477" Z="1.00000083"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Background">
|
||||
<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="Text">
|
||||
<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>PlayerAssault</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>PlayerAssault</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>
|
||||
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:BlendAdditive>
|
||||
<Adder>MovementBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="FinalBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>BlendTreeDefenderWeapon</Pose1>
|
||||
<Pose2>BlendTreeSecondaryWeapon</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="BlendTreeDefenderWeapon">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>ActionBlend</Pose1>
|
||||
<Pose2>Shield</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Shield">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ActivateDeactiveShieldF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ActionBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>ActionBlend2</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<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="BlendTreeSecondaryWeapon">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<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>
|
||||
@@ -2,7 +2,9 @@
|
||||
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-0.872543275" Z="-2.49763942"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
</c:Team>
|
||||
<c:Collidable/>
|
||||
<c:DashAbility/>
|
||||
<c:DefenderWeapon>
|
||||
<Slot>
|
||||
<Secondary/>
|
||||
</Slot>
|
||||
</c:DefenderWeapon>
|
||||
<c:DoubleJump/>
|
||||
<c:Health/>
|
||||
<c:Physics>
|
||||
@@ -493,250 +498,34 @@
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Hands">
|
||||
<Entity name="Weapons">
|
||||
<Components>
|
||||
<c:BlendAdditive>
|
||||
<Adder>MovementBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="PrimaryAttachment">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>AssaultWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/WeaponAssaultBlueView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
|
||||
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="AssaultWeapon">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ReloadEffect">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.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>PlayerAssault</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>PlayerAssault</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>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="SecondaryAttachment">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>SidearmWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
|
||||
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/>
|
||||
</c:Transform>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="FinalBlend">
|
||||
<Entity name="SecondaryAttachment">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>BlendTreeAssaultWeapon</Pose1>
|
||||
<Pose2>BlendTreeSecondaryWeapon</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>DefenderWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/WeaponDefenderBlueView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="BlendTreeAssaultWeapon">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Fire">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootRifleF</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="BlendTreeSecondaryWeapon">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<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>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
@@ -769,8 +558,6 @@
|
||||
<c:HiddenForLocalPlayer/>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
|
||||
<Color A="1" B="1" G="1" R="1"/>
|
||||
<Visible>true</Visible>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -790,8 +577,8 @@
|
||||
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.165396646" Y="1.14537966" Z="-0.206537575"/>
|
||||
<Orientation X="0.484640986" Y="-0.00695174001" Z="0.0685098693"/>
|
||||
<Position X="0.168977827" Y="1.03285813" Z="-0.227028549"/>
|
||||
<Orientation X="-0.00427743886" Y="-0.0853471458" Z="0.137290105"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -811,8 +598,8 @@
|
||||
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.165396646" Y="1.14537966" Z="-0.206537575"/>
|
||||
<Orientation X="0.484640986" Y="-0.00695174001" Z="0.0685098693"/>
|
||||
<Position X="0.168977827" Y="1.03285813" Z="-0.227028549"/>
|
||||
<Orientation X="-0.00427743886" Y="-0.0853471458" Z="0.137290105"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -832,7 +619,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>AimSecWepA</AnimationName>
|
||||
<Time>0.71143966913223267</Time>
|
||||
<Time>0.5</Time>
|
||||
<Loop>false</Loop>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
@@ -844,7 +631,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>AimRifleA</AnimationName>
|
||||
<Time>0.71143966913223267</Time>
|
||||
<Time>0.5</Time>
|
||||
<Loop>false</Loop>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
@@ -988,42 +775,6 @@
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="StrafeLRBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Left</Pose1>
|
||||
<Pose2>Right</Pose2>
|
||||
<Weight>0.033793529385008014</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Left">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeLeftF</AnimationName>
|
||||
<Time>0.32459360994030106</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Right">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeRightF</AnimationName>
|
||||
<Time>0.34810913982041569</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="RunWalkBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
@@ -1060,6 +811,42 @@
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="StrafeLRBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Left</Pose1>
|
||||
<Pose2>Right</Pose2>
|
||||
<Weight>0.033793529385008014</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Left">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeLeftF</AnimationName>
|
||||
<Time>0.32459360994030106</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Right">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeRightF</AnimationName>
|
||||
<Time>0.34810913982041569</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
@@ -1327,12 +1114,12 @@
|
||||
<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>
|
||||
<c:Transform>
|
||||
<Position X="0.100000001" Y="1.50176644" Z="-0.248000011"/>
|
||||
<Position X="0" Y="1.64533126" Z="-0.0171071123"/>
|
||||
<Orientation X="0" Y="3.14199996" Z="0"/>
|
||||
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
|
||||
</c:Transform>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<?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">
|
||||
<Entity name="ReloadEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Lifetime>
|
||||
<Lifetime>2</Lifetime>
|
||||
<Lifetime>1</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:ExplosionEffect>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="3.33300018" Y="0.0320000015" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="0.0790000036" Z="-0.329000026"/>
|
||||
<ExponentialAccelaration>true</ExponentialAccelaration>
|
||||
<EndColor A="0" B="19.6078434" G="19.6078434" R="1"/>
|
||||
<Velocity X="0" Y="1" Z="0"/>
|
||||
<ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
|
||||
<ExplosionDuration>1</ExplosionDuration>
|
||||
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
|
||||
<Randomness>true</Randomness>
|
||||
</c:ExplosionEffect>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
<Transparent>true</Transparent>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
@@ -1,44 +1,161 @@
|
||||
<?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">
|
||||
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:BlendAdditive>
|
||||
<Adder>MovementBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Entity name="FinalBlend">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.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:Blend>
|
||||
<Pose1>BlendTreeAssaultWeapon</Pose1>
|
||||
<Pose2>BlendTreeSecondaryWeapon</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="BlendTreeAssaultWeapon">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>Reload</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Reload">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ReloadSwitchF</AnimationName>
|
||||
<Speed>0.5</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Fire">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootRifleF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="BlendTreeSecondaryWeapon">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="AmmunitionHUD">
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<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>
|
||||
<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>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ViewModel">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="-0.0440000035" Y="0.136000007" Z="-0.119000003"/>
|
||||
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
|
||||
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="AmmunitionHUDBackground">
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.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="ReloadSpawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/WeaponAssaultReloadEffectView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="AmmoHUD">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Ammo_Joint</BoneName>
|
||||
<ScaleOffset X="0.5" Y="0.5" Z="1"/>
|
||||
<InheritScale>true</InheritScale>
|
||||
</c:BoneAttachment>
|
||||
<c:Transform>
|
||||
<Position X="0.0540266186" Y="-0.0954354703" Z="-0.255526125"/>
|
||||
<Orientation X="0.000684258412" Y="0.077423811" Z="0.00118651299"/>
|
||||
<Scale X="0.50000006" Y="0.500000477" Z="1.00000083"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Background">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
@@ -52,7 +169,7 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="AmmunitionText">
|
||||
<Entity name="Text">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -65,7 +182,7 @@
|
||||
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>Player</ParentEntityName>
|
||||
<ParentEntityName></ParentEntityName>
|
||||
<ComponentType>AssaultWeapon</ComponentType>
|
||||
<Field>MagazineAmmo</Field>
|
||||
</c:TextFieldReader>
|
||||
@@ -83,7 +200,7 @@
|
||||
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>Player</ParentEntityName>
|
||||
<ParentEntityName></ParentEntityName>
|
||||
<ComponentType>AssaultWeapon</ComponentType>
|
||||
<Field>Ammo</Field>
|
||||
</c:TextFieldReader>
|
||||
@@ -98,12 +215,6 @@
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ReloadEffect">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ThirdPersonReloadSpawner">
|
||||
<Entity name="ReloadSpawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="ReloadEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Lifetime>
|
||||
<Lifetime>2</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="Out">
|
||||
<Components>
|
||||
<c:ExplosionEffect>
|
||||
<Velocity X="0" Y="1" Z="0"/>
|
||||
<ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
|
||||
<TimeSinceDeath>1</TimeSinceDeath>
|
||||
<Delay>1</Delay>
|
||||
<Speed>-1</Speed>
|
||||
<ExplosionDuration>1</ExplosionDuration>
|
||||
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
|
||||
<Randomness>true</Randomness>
|
||||
</c:ExplosionEffect>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
<Transparent>true</Transparent>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="In">
|
||||
<Components>
|
||||
<c:Lifetime>
|
||||
<Lifetime>1</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:ExplosionEffect>
|
||||
<Velocity X="0" Y="1" Z="0"/>
|
||||
<ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
|
||||
<ExplosionDuration>1</ExplosionDuration>
|
||||
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
|
||||
<Randomness>true</Randomness>
|
||||
</c:ExplosionEffect>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
<Transparent>true</Transparent>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
@@ -1,43 +1,209 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="DefenderWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:BlendAdditive>
|
||||
<Adder>MovementBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
|
||||
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Entity name="FinalBlend">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.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:Blend>
|
||||
<Pose1>ActionBlend</Pose1>
|
||||
<Pose2>Shield</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="Shield">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ActivateDeactiveShieldF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ActionBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Fire</Pose1>
|
||||
<Pose2>ReloadBlend</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="ReloadBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>ReloadLoop</Pose1>
|
||||
<Pose2>ReloadTransitionBlend</Pose2>
|
||||
<Weight>1</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ReloadLoop">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShotgunReloadTwoF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ReloadTransitionBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>ReloadStart</Pose1>
|
||||
<Pose2>ReloadEnd</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ReloadStart">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShotgunReloadOneF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ReloadEnd">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShotgunReloadThreeF</AnimationName>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="AmmunitionHUD">
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Idle</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<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>
|
||||
<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>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ViewModel">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="-0.0460000038" Y="0.119000003" Z="-0.162"/>
|
||||
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||
<Position X="0.120748252" Y="-0.228437155" Z="-0.181454688"/>
|
||||
<Orientation X="0.0104048811" Y="-0.00268213497" Z="0.0428443402"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="AmmunitionHUDBackground">
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.00191565475" Y="0.0324025005" Z="-0.2021029"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ReloadSpawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="AmmoHUD">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Ammo_Joint</BoneName>
|
||||
<InheritScale>true</InheritScale>
|
||||
</c:BoneAttachment>
|
||||
<c:Transform>
|
||||
<Position X="0.0540265739" Y="-0.095435515" Z="-0.255526066"/>
|
||||
<Orientation X="0.000684314175" Y="0.0774238482" Z="0.00118648494"/>
|
||||
<Scale X="1.00000012" Y="1.00000048" Z="1.00000048"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Background">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
@@ -51,38 +217,20 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="AmmunitionText">
|
||||
<Entity name="Text">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<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:Transform>
|
||||
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Ammo">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>64</Content>
|
||||
<Content>38</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>
|
||||
<ParentEntityName></ParentEntityName>
|
||||
<ComponentType>DefenderWeapon</ComponentType>
|
||||
<Field>Ammo</Field>
|
||||
</c:TextFieldReader>
|
||||
@@ -93,6 +241,24 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="MagazineAmmo">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>5</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName></ParentEntityName>
|
||||
<ComponentType>DefenderWeapon</ComponentType>
|
||||
<Field>MagazineAmmo</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
@@ -40,12 +40,16 @@ void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
|
||||
magAmmo = glm::min(magSize, ammo);
|
||||
isReloading = false;
|
||||
if (wi.FirstPersonEntity.Valid()) {
|
||||
wi.FirstPersonEntity["Model"]["Visible"] = true;
|
||||
wi.FirstPersonEntity.FirstChildByName("ViewModel")["Model"]["Visible"] = true;
|
||||
}
|
||||
if (wi.ThirdPersonEntity.Valid()) {
|
||||
wi.ThirdPersonEntity["Model"]["Visible"] = true;
|
||||
}
|
||||
}
|
||||
double reloadTime = cWeapon["ReloadTime"];
|
||||
if (isReloading && reloadTimer <= reloadTime / 2) {
|
||||
|
||||
}
|
||||
|
||||
// Restore view angle
|
||||
if (IsClient) {
|
||||
@@ -122,18 +126,26 @@ void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
|
||||
// Play animation
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeAssaultWeapon", "Reload");
|
||||
if (IsClient) {
|
||||
// Spawn explosion effect
|
||||
EntityWrapper reloadEffectSpawner = wi.FirstPersonEntity.FirstChildByName("FirstPersonReloadSpawner");
|
||||
if (reloadEffectSpawner.Valid()) {
|
||||
SpawnerSystem::Spawn(reloadEffectSpawner, reloadEffectSpawner);
|
||||
// Spawn explosion effect
|
||||
if (wi.FirstPersonEntity.Valid()) {
|
||||
if (IsClient) {
|
||||
EntityWrapper reloadEffectSpawner = wi.FirstPersonEntity.FirstChildByName("ReloadSpawner");
|
||||
if (reloadEffectSpawner.Valid()) {
|
||||
reloadEffectSpawner.DeleteChildren();
|
||||
SpawnerSystem::Spawn(reloadEffectSpawner, reloadEffectSpawner);
|
||||
}
|
||||
}
|
||||
if (wi.FirstPersonEntity.Valid()) {
|
||||
wi.FirstPersonEntity["Model"]["Visible"] = false;
|
||||
}
|
||||
if (wi.ThirdPersonEntity.Valid()) {
|
||||
wi.ThirdPersonEntity["Model"]["Visible"] = false;
|
||||
wi.FirstPersonEntity.FirstChildByName("ViewModel")["Model"]["Visible"] = false;
|
||||
}
|
||||
if (wi.ThirdPersonEntity.Valid()) {
|
||||
if (IsServer) {
|
||||
EntityWrapper reloadEffectSpawner = wi.ThirdPersonEntity.FirstChildByName("ReloadSpawner");
|
||||
if (reloadEffectSpawner.Valid()) {
|
||||
reloadEffectSpawner.DeleteChildren();
|
||||
SpawnerSystem::Spawn(reloadEffectSpawner, reloadEffectSpawner);
|
||||
}
|
||||
}
|
||||
wi.ThirdPersonEntity["Model"]["Visible"] = false;
|
||||
}
|
||||
|
||||
// Sound
|
||||
@@ -190,7 +202,7 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
|
||||
}
|
||||
|
||||
// Get weapon model based on current person
|
||||
EntityWrapper weaponModelEntity = getRelevantWeaponModelEntity(wi);
|
||||
EntityWrapper weaponModelEntity = getRelevantWeaponEntity(wi);
|
||||
if (!weaponModelEntity.Valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void DefenderWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
|
||||
m_EventBroker->Publish(e);
|
||||
} else {
|
||||
isReloading = false;
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Idle");
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "ReloadEnd");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,21 @@ void DefenderWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
reloadTimer = reloadTime;
|
||||
|
||||
// Play animation
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Reload");
|
||||
if (wi.FirstPersonEntity.Valid()) {
|
||||
Events::AutoAnimationBlend eBlendStart;
|
||||
eBlendStart.RootNode = wi.FirstPersonEntity;
|
||||
eBlendStart.NodeName = "ReloadStart";
|
||||
eBlendStart.Restart = true;
|
||||
eBlendStart.Start = true;
|
||||
m_EventBroker->Publish(eBlendStart);
|
||||
Events::AutoAnimationBlend eBlendLoop;
|
||||
eBlendLoop.RootNode = wi.FirstPersonEntity;
|
||||
eBlendLoop.NodeName = "ReloadLoop";
|
||||
eBlendLoop.Restart = true;
|
||||
eBlendLoop.Start = true;
|
||||
eBlendLoop.AnimationEntity = wi.FirstPersonEntity.FirstChildByName("ReloadStart");
|
||||
m_EventBroker->Publish(eBlendLoop);
|
||||
}
|
||||
}
|
||||
|
||||
void DefenderWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
@@ -114,42 +128,48 @@ void DefenderWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi
|
||||
|
||||
bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInfo& wi, const Events::InputCommand& e)
|
||||
{
|
||||
if (e.Command == "SpecialAbility" && IsServer) {
|
||||
if (e.Command == "SpecialAbility") {
|
||||
EntityWrapper attachment = wi.Player.FirstChildByName("ShieldAttachment");
|
||||
if (attachment.Valid()) {
|
||||
if (e.Value > 0) {
|
||||
SpawnerSystem::Spawn(attachment, attachment);
|
||||
if (IsServer) {
|
||||
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);
|
||||
if (IsClient) {
|
||||
EntityWrapper root = wi.FirstPersonEntity;
|
||||
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);
|
||||
if (IsClient) {
|
||||
EntityWrapper root = wi.FirstPersonEntity;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,7 +252,7 @@ void DefenderWeaponBehaviour::fireShell(ComponentWrapper cWeapon, WeaponInfo& wi
|
||||
}
|
||||
|
||||
// Play animation
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeDefenderWeapon", "Fire");
|
||||
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Fire");
|
||||
|
||||
// Sound
|
||||
Events::PlaySoundOnEntity e;
|
||||
|
||||
@@ -52,7 +52,7 @@ void SidearmWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
|
||||
cWeapon["FireCooldown"] = 60.0 / (double)cWeapon["RPM"];
|
||||
|
||||
// Get weapon model based on current person
|
||||
EntityWrapper weaponModelEntity = getRelevantWeaponModelEntity(wi);
|
||||
EntityWrapper weaponModelEntity = getRelevantWeaponEntity(wi);
|
||||
if (!weaponModelEntity.Valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user