Merge branch 'Movement'
This commit is contained in:
@@ -213,7 +213,6 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EntityWrapper firstPersonModel = m_PlayerEntity.FirstChildByName("Hands");
|
||||
if (firstPersonModel.Valid()) {
|
||||
if (val > 0) { // Walk/Run
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<c:Lifetime>
|
||||
<Lifetime>0.079999998211860657</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:NetworkComponent/>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
@@ -17,10 +18,8 @@
|
||||
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
<Linear>true</Linear>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="-1.57099998" Z="0"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="0"/>
|
||||
</c:Transform>
|
||||
@@ -35,10 +34,8 @@
|
||||
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
<Linear>true</Linear>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="4.71218538" Z="3.14199996"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="0"/>
|
||||
</c:Transform>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<c:Lifetime>
|
||||
<Lifetime>0.079999998211860657</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:NetworkComponent/>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
@@ -17,12 +18,10 @@
|
||||
<DiffuseTexture>Textures/Effects/NewRay7.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
<Linear>true</Linear>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="-1.57099998" Z="0"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="0"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -35,12 +34,10 @@
|
||||
<DiffuseTexture>Textures/Effects/NewRay7.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
<Linear>true</Linear>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="4.71218538" Z="3.14199996"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="0"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
|
||||
<Components>
|
||||
<c:Lifetime>
|
||||
<Lifetime>0.08</Lifetime>
|
||||
<Lifetime>0.080000000000000002</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:Fade>
|
||||
<FadeTime>0.08</FadeTime>
|
||||
<FadeTime>0.080000000000000002</FadeTime>
|
||||
</c:Fade>
|
||||
<c:NetworkComponent/>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
@@ -20,10 +21,8 @@
|
||||
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
<Linear>true</Linear>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="-1.57099998" Z="0"/>
|
||||
<Scale X="1" Y="0.0250000004" Z="0"/>
|
||||
</c:Transform>
|
||||
@@ -38,10 +37,8 @@
|
||||
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
<Linear>true</Linear>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="4.71218538" Z="3.14199996"/>
|
||||
<Scale X="1" Y="0.0250000004" Z="0"/>
|
||||
</c:Transform>
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
<Lifetime>2</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:ExplosionEffect>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="1.63300014" 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="0"/>
|
||||
<Velocity X="1.78000009" Y="0.0320000015" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="0.142000005" Z="-0.659000039"/>
|
||||
<EndColor A="0" B="19.6078434" G="0.00392156886" R="1.96078432"/>
|
||||
<RandomnessScalar>1.3399996757507324</RandomnessScalar>
|
||||
<Randomness>true</Randomness>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<ExponentialAccelaration>true</ExponentialAccelaration>
|
||||
<ColorDistanceScalar>5.0899982452392578</ColorDistanceScalar>
|
||||
</c:ExplosionEffect>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<Entity name="SidearmWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Shielded/>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/SecondaryWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
@@ -9,17 +10,38 @@
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Entity name="Muzzle">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="-0.0169804785" Y="-0.0188358482" Z="-0.222064406"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzleRay">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||
<EntityFile>Schema/Entities/RaySideArmBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.0123999491" Y="0.102453232" Z="-0.273824364"/>
|
||||
<Position X="0" Y="0.125075191" Z="-0.206788138"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponMuzzleFlash">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/MuzzleFlashSideArmBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.0240342002" Y="0.116005458" Z="-0.0419839472"/>
|
||||
<Scale X="0.5" Y="0.5" Z="0.5"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -11,17 +11,6 @@
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/Ray2Red.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.105000004" Z="-0.256000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="AmmunitionHUD">
|
||||
<Components>
|
||||
<c:TextFieldReader>
|
||||
@@ -38,8 +27,9 @@
|
||||
<Entity name="AmmunitionHUDBackground">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<Model>Models/Core/UnitQuad.mesh</Model>
|
||||
<GlowMap></GlowMap>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
@@ -56,16 +46,16 @@
|
||||
<Children>
|
||||
<Entity name="MagazineAmmo">
|
||||
<Components>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>Player</ParentEntityName>
|
||||
<ComponentType>SidearmWeapon</ComponentType>
|
||||
<Field>MagazineAmmo</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Text>
|
||||
<Content>16</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>SidearmWeapon</ComponentType>
|
||||
<Field>MagazineAmmo</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-0.00600000005" Z="0"/>
|
||||
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
|
||||
@@ -92,6 +82,37 @@
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Muzzle">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0.197295129" Y="-0.116625182" Z="-0.709192753"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzleRay">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RaySideArmBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.155046776"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponMuzzleFlash">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/MuzzleFlashSideArmBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Scale X="0.5" Y="0.5" Z="0.5"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -90,9 +91,10 @@
|
||||
<c:Model>
|
||||
<GlowIntensity>1.5</GlowIntensity>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.120748267" Y="-0.22843127" Z="-0.181454584"/>
|
||||
<Position X="0.120748267" Y="-0.22843127" Z="-0.181454599"/>
|
||||
<Orientation X="0.0102799674" Y="-0.00312504289" Z="0.0428140014"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
@@ -131,7 +133,7 @@
|
||||
<EntityFile>Schema/Entities/RayAssaultBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.00123506912" Y="-0.00209517847" Z="-0.681198895"/>
|
||||
<Position X="0.00179657922" Y="-0.00304772682" Z="-0.334699303"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Shielded/>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
@@ -9,17 +10,6 @@
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ReloadSpawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
@@ -29,6 +19,38 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Muzzle">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0.00728808995" Y="0.0896582007" Z="-0.643795013"/>
|
||||
<Orientation X="6.27600002" Y="0.00499999989" Z="0.00600000005"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzleFlash">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/MuzzleFlashBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="-8.41593719e-05" Y="-0.000816107844" Z="0.0612007342"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponMuzzleRay">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayAssaultBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.00179657922" Y="-0.00304772682" Z="-0.334699303"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -154,7 +155,7 @@
|
||||
<InheritScale>true</InheritScale>
|
||||
</c:BoneAttachment>
|
||||
<c:Transform>
|
||||
<Position X="0.0540262833" Y="-0.0954347998" Z="-0.225546911"/>
|
||||
<Position X="0.0540262833" Y="-0.0954347998" Z="-0.225546926"/>
|
||||
<Orientation X="0.00124507793" Y="0.077417776" Z="0.00737103401"/>
|
||||
<Scale X="0.300000012" Y="0.300000042" Z="0.299999952"/>
|
||||
</c:Transform>
|
||||
@@ -244,9 +245,10 @@
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.120748043" Y="-0.228436321" Z="-0.151475549"/>
|
||||
<Position X="0.120748043" Y="-0.228436321" Z="-0.151475564"/>
|
||||
<Orientation X="0.0102800643" Y="-0.00312487315" Z="0.0428144038"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
@@ -265,7 +267,7 @@
|
||||
<Entity name="Muzzle">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0.137428522" Y="-0.145251781" Z="-0.590083241"/>
|
||||
<Position X="0.119734153" Y="-0.145251781" Z="-0.564532101"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -275,7 +277,7 @@
|
||||
<EntityFile>Schema/Entities/RayDefenderBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.0180841181" Y="0.0252480619" Z="-0.663679719"/>
|
||||
<Position X="0" Y="0" Z="-0.109966502"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -286,7 +288,7 @@
|
||||
<EntityFile>Schema/Entities/MuzzleFlashBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.0201820824" Y="0.0212024488" Z="-0.0305794869"/>
|
||||
<Position X="0.0201820824" Y="0" Z="0"/>
|
||||
<Scale X="1.5" Y="1.5" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Shielded/>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
@@ -9,17 +10,6 @@
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/DefenderRayBlue.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>
|
||||
@@ -29,6 +19,38 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Muzzle">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="-0.0100463303" Y="0.0624945536" Z="-0.372351319"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzleRay">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayDefenderBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.0180841181" Y="0.0252480619" Z="-0.135249734"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponMuzzleFlash">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/MuzzleFlashBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.0201820824" Y="0.0212024488" Z="-0.0305794869"/>
|
||||
<Scale X="1.5" Y="1.5" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -183,6 +184,7 @@
|
||||
<c:Model>
|
||||
<GlowIntensity>1.2999999523162842</GlowIntensity>
|
||||
<Resource>Models/Weapons/Blue/SecondaryWeaponBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.185786247" Y="-0.21622014" Z="-0.412707269"/>
|
||||
@@ -204,7 +206,7 @@
|
||||
<Entity name="Muzzle">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0.197295129" Y="-0.116625182" Z="-0.709192753"/>
|
||||
<Position X="0.189540595" Y="-0.114737265" Z="-0.681462705"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -213,9 +215,7 @@
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RaySideArmBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.155046776"/>
|
||||
</c:Transform>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -86,7 +87,7 @@
|
||||
<BoneName>R_Ammo_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:Transform>
|
||||
<Position X="0.109812573" Y="-0.0832190216" Z="-0.373473197"/>
|
||||
<Position X="0.109812573" Y="-0.0832190216" Z="-0.373473227"/>
|
||||
<Orientation X="0.00118373742" Y="0.077411525" Z="0.00458352407"/>
|
||||
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||
</c:Transform>
|
||||
@@ -183,9 +184,10 @@
|
||||
<c:Model>
|
||||
<GlowIntensity>1.5</GlowIntensity>
|
||||
<Resource>Models/Weapons/Blue/SecondaryWeaponBlue.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.18578662" Y="-0.216220587" Z="-0.382728696"/>
|
||||
<Position X="0.18578662" Y="-0.216220587" Z="-0.382728726"/>
|
||||
<Orientation X="0.010279973" Y="-0.00312555139" Z="0.0428142436"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
@@ -204,10 +206,19 @@
|
||||
<Entity name="Muzzle">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0.196999997" Y="-0.116999999" Z="-0.668634355"/>
|
||||
<Position X="0.192775041" Y="-0.117133088" Z="-0.647809923"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="WeaponMuzzleRay">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RaySideArmBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponMuzzleFlash">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
@@ -219,17 +230,6 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponMuzzleRay">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RaySideArmBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.155000001"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
@@ -235,7 +235,8 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
|
||||
float distance = traceRayDistance(origin, direction);
|
||||
EntityWrapper ray = SpawnerSystem::Spawn(tracerSpawner, tracerSpawner);
|
||||
if (ray.Valid()) {
|
||||
((Field<glm::vec3>)ray["Transform"]["Scale"]).z(distance);
|
||||
((Field<glm::vec3>)ray["Transform"]["Scale"]).x(distance);
|
||||
((Field<glm::vec3>)ray["Transform"]["Position"]).z(-distance/2.f);
|
||||
}
|
||||
}
|
||||
//MuzzleFlash
|
||||
|
||||
@@ -395,9 +395,12 @@ void DefenderWeaponBehaviour::spawnTracers(ComponentWrapper cWeapon, WeaponInfo&
|
||||
glm::vec3 muzzlePosition = TransformSystem::AbsolutePosition(muzzle);
|
||||
glm::quat muzzleOrientation = TransformSystem::AbsoluteOrientation(muzzle);
|
||||
|
||||
rayOrigin = muzzlePosition;
|
||||
|
||||
glm::vec3 muzzleToHit = hitPosition - muzzlePosition;
|
||||
|
||||
rayOrigin = muzzlePosition + (muzzleToHit/2.f);
|
||||
|
||||
|
||||
glm::vec3 lookVector = glm::normalize(-muzzleToHit);
|
||||
float pitch = std::asin(-lookVector.y);
|
||||
float yaw = std::atan2(lookVector.x, lookVector.z);
|
||||
@@ -459,8 +462,8 @@ void DefenderWeaponBehaviour::dealDamage(ComponentWrapper cWeapon, WeaponInfo& w
|
||||
}
|
||||
|
||||
// Temp hit decal
|
||||
EntityWrapper hit = ResourceManager::Load<EntityFile>("Schema/Entities/HitTest.xml")->MergeInto(m_World);
|
||||
(Field<glm::vec3>)hit["Transform"]["Position"] = pick.Position;
|
||||
// EntityWrapper hit = ResourceManager::Load<EntityFile>("Schema/Entities/HitTest.xml")->MergeInto(m_World);
|
||||
// (Field<glm::vec3>)hit["Transform"]["Position"] = pick.Position;
|
||||
|
||||
// Don't let us shoot ourselves in the foot somehow
|
||||
if (victim == LocalPlayer) {
|
||||
@@ -477,12 +480,17 @@ void DefenderWeaponBehaviour::dealDamage(ComponentWrapper cWeapon, WeaponInfo& w
|
||||
|
||||
// Check for friendly fire
|
||||
if ((ComponentInfo::EnumType)victim["Team"]["Team"] == (ComponentInfo::EnumType)wi.Player["Team"]["Team"]) {
|
||||
// TODO: Ammo sharing
|
||||
// Give boost
|
||||
Events::PlayerDamage ePlayerDamage;
|
||||
ePlayerDamage.Inflictor = wi.Player;
|
||||
ePlayerDamage.Victim = victim;
|
||||
ePlayerDamage.Damage = 0;
|
||||
m_EventBroker->Publish(ePlayerDamage);
|
||||
continue;
|
||||
}
|
||||
|
||||
damageSum[victim] += pelletDamage;
|
||||
((Field<glm::vec4>)hit["Model"]["Color"]).z(1.f);
|
||||
// ((Field<glm::vec4>)hit["Model"]["Color"]).z(1.f);
|
||||
}
|
||||
|
||||
// Deal damage!
|
||||
@@ -493,7 +501,6 @@ void DefenderWeaponBehaviour::dealDamage(ComponentWrapper cWeapon, WeaponInfo& w
|
||||
ePlayerDamage.Victim = kv.first;
|
||||
ePlayerDamage.Damage = kv.second;
|
||||
m_EventBroker->Publish(ePlayerDamage);
|
||||
LOG_DEBUG("Dealt %f damage to #%i", kv.second, kv.first.ID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,15 +223,16 @@ void SidearmWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
|
||||
return;
|
||||
}
|
||||
|
||||
//Tracer
|
||||
// Tracer
|
||||
EntityWrapper tracerSpawner = weaponModelEntity.FirstChildByName("WeaponMuzzleRay");
|
||||
if (tracerSpawner.Valid()) {
|
||||
glm::vec3 origin = TransformSystem::AbsolutePosition(tracerSpawner);
|
||||
glm::vec3 direction = TransformSystem::AbsoluteOrientation(tracerSpawner) * glm::vec3(0, 0, -1);
|
||||
glm::vec3 direction = glm::quat(TransformSystem::AbsoluteOrientationEuler(tracerSpawner)) * glm::vec3(0, 0, -1);
|
||||
float distance = traceRayDistance(origin, direction);
|
||||
EntityWrapper ray = SpawnerSystem::Spawn(tracerSpawner, tracerSpawner);
|
||||
if (ray.Valid()) {
|
||||
((Field<glm::vec3>)ray["Transform"]["Scale"]).z(distance);
|
||||
((Field<glm::vec3>)ray["Transform"]["Scale"]).x(distance);
|
||||
((Field<glm::vec3>)ray["Transform"]["Position"]).z(-distance/2.f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user