Working AssaultWeapon
This commit is contained in:
@@ -1,47 +1,40 @@
|
||||
#ifndef AssaultWeaponBehaviour_h__
|
||||
#define AssaultWeaponBehaviour_h__
|
||||
|
||||
#include "Sound/EPlaySoundOnEntity.h"
|
||||
#include "Collision/Collision.h"
|
||||
#include "Core/ConfigFile.h"
|
||||
#include "WeaponBehaviour.h"
|
||||
#include "../SpawnerSystem.h"
|
||||
#include "Collision/Collision.h"
|
||||
#include "Core/EPlayerDamage.h"
|
||||
#include "Core/EShoot.h"
|
||||
#include "Sound/EPlaySoundOnEntity.h"
|
||||
|
||||
class AssaultWeaponBehaviour : public WeaponBehaviour<AssaultWeaponBehaviour>
|
||||
{
|
||||
public:
|
||||
AssaultWeaponBehaviour(SystemParams systemParams, IRenderer* renderer, Octree<EntityAABB>* collisionOctree)
|
||||
: WeaponBehaviour(systemParams, "AssaultWeapon", renderer, collisionOctree)
|
||||
: System(systemParams)
|
||||
, WeaponBehaviour(systemParams, "AssaultWeapon", renderer, collisionOctree)
|
||||
, m_RandomEngine(m_RandomDevice())
|
||||
{ }
|
||||
|
||||
protected:
|
||||
virtual void OnPrimaryFire(WeaponInfo& wi) override;
|
||||
virtual void OnCeasePrimaryFire(WeaponInfo& wi) override;
|
||||
virtual void OnReload(WeaponInfo& wi) override;
|
||||
void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override;
|
||||
void UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt) override;
|
||||
void OnPrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||
void OnCeasePrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||
void OnReload(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||
void OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||
//bool OnInputCommand(ComponentWrapper cWeapon, WeaponInfo& wi, const Events::InputCommand& e) override;
|
||||
|
||||
private:
|
||||
// State
|
||||
bool m_Firing = false;
|
||||
bool m_Reloading = false;
|
||||
double m_ReloadTimer = 0.0;
|
||||
double m_TimeSinceLastFire = 0.0;
|
||||
EntityWrapper m_FirstPersonReloadImpostor;
|
||||
std::random_device m_RandomDevice;
|
||||
std::mt19937 m_RandomEngine;
|
||||
|
||||
bool hasAmmo();
|
||||
void fireRound();
|
||||
void spawnTracer();
|
||||
float traceRayDistance(glm::vec3 origin, glm::vec3 direction);
|
||||
void playFireSound();
|
||||
void playEmptySound();
|
||||
void viewPunch();
|
||||
void finishReload();
|
||||
void playShootAnimation();
|
||||
void playIdleAnimation();
|
||||
void playReloadAnimation();
|
||||
bool shoot(double damage);
|
||||
void showHitMarker();
|
||||
// Weapon functions
|
||||
void fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||
//void dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi, glm::vec3 direction, double damage);
|
||||
bool canFire(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||
bool dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||
|
||||
// Utility
|
||||
//Camera cameraFromEntity(EntityWrapper camera);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef DefenderWeaponBehaviour_h__
|
||||
#define DefenderWeaponBehaviour_h__
|
||||
|
||||
#include "WeaponBehaviour.h"
|
||||
#include "Collision/Collision.h"
|
||||
#include "Core/EPlayerDamage.h"
|
||||
@@ -31,4 +34,6 @@ private:
|
||||
|
||||
// Utility
|
||||
Camera cameraFromEntity(EntityWrapper camera);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef SidearmWeaponBehaviour_h__
|
||||
#define SidearmWeaponBehaviour_h__
|
||||
|
||||
#include "WeaponBehaviour.h"
|
||||
#include "Collision/Collision.h"
|
||||
#include "Core/EPlayerDamage.h"
|
||||
@@ -30,4 +33,6 @@ private:
|
||||
bool canFire(ComponentWrapper cWeapon);
|
||||
bool playerInFirstPerson(EntityWrapper player);
|
||||
//float traceRayDistance(glm::vec3 origin, glm::vec3 direction);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,12 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<AssaultWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AssaultWeapon.xsd">
|
||||
<Slot><Primary/></Slot>
|
||||
<MagazineAmmo>32</MagazineAmmo>
|
||||
<MagazineSize>32</MagazineSize>
|
||||
<Ammo>360</Ammo>
|
||||
<MaxAmmo>360</MaxAmmo>
|
||||
<BaseDamage>5</BaseDamage>
|
||||
<RPM>120</RPM>
|
||||
<ViewPunch>0.01</ViewPunch>
|
||||
<Ammo>320</Ammo>
|
||||
<MaxAmmo>320</MaxAmmo>
|
||||
<BaseDamage>15</BaseDamage>
|
||||
<SpreadAngle>0.174533</SpreadAngle> <!-- 0.174533 = 10 degrees -->
|
||||
<MaxTravelAngle>0.10</MaxTravelAngle> <!-- 0.174533 = 10 degrees -->
|
||||
<RPM>420</RPM>
|
||||
<ViewPunch>0.03</ViewPunch>
|
||||
<ViewReturnSpeed>0.18</ViewReturnSpeed>
|
||||
<ReloadTime>2</ReloadTime>
|
||||
<Slot><Primary/></Slot>
|
||||
<EquipTime>0.5</EquipTime>
|
||||
<TriggerHeld>false</TriggerHeld>
|
||||
<FireCooldown>0</FireCooldown>
|
||||
<IsReloading>false</IsReloading>
|
||||
<ReloadTimer>0</ReloadTimer>
|
||||
<CurrentTravel>0</CurrentTravel>
|
||||
</AssaultWeapon>
|
||||
@@ -7,6 +7,7 @@
|
||||
<xs:element name="AssaultWeapon">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||
<xs:element name="MagazineAmmo" type="t:int" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Ammo currently loaded into the magazine</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
@@ -20,16 +21,32 @@
|
||||
<xs:annotation><xs:documentation>Maximum ammo able to be carried</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="BaseDamage" type="t:double" minOccurs="0"/>
|
||||
<xs:element name="SpreadAngle" type="t:float" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Spread angle in radians</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="MaxTravelAngle" type="t:float" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Maximum vertical aim travel angle in radians</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RPM" type="t:double" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Rate of fire in rounds per minute</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ViewPunch" type="t:float" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>View punch in radians for each bullet fired</xs:documentation></xs:annotation>
|
||||
<xs:annotation><xs:documentation>View punch in radians for each shell fired</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ViewReturnSpeed" type="t:float" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>The speed in radians per second the view returns to its original position after being punched</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ReloadTime" type="t:double" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Time it takes to reload the weapon in seconds</xs:documentation></xs:annotation>
|
||||
<xs:annotation><xs:documentation>Time it takes to load ONE SHELL into the weapon in seconds</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||
<xs:element name="EquipTime" type="t:double" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Time it takes from selecting the weapon until it's ready to fire</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="TriggerHeld" type="t:bool" minOccurs="0"/>
|
||||
<xs:element name="FireCooldown" type="t:double" minOccurs="0"/>
|
||||
<xs:element name="IsReloading" type="t:bool" minOccurs="0"/>
|
||||
<xs:element name="ReloadTimer" type="t:double" minOccurs="0"/>
|
||||
<xs:element name="CurrentTravel" type="t:float" minOccurs="0"/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<DefenderWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DefenderWeapon.xsd">
|
||||
<Slot><Primary/></Slot>
|
||||
<MagazineAmmo>8</MagazineAmmo>
|
||||
<MagazineSize>8</MagazineSize>
|
||||
<Ammo>64</Ammo>
|
||||
@@ -12,7 +13,6 @@
|
||||
<ViewPunch>0.03</ViewPunch>
|
||||
<ViewReturnSpeed>0.2</ViewReturnSpeed>
|
||||
<ReloadTime>0.5</ReloadTime>
|
||||
<Slot><Primary/></Slot>
|
||||
<TriggerHeld>false</TriggerHeld>
|
||||
<FireCooldown>0</FireCooldown>
|
||||
<IsReloading>false</IsReloading>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<xs:element name="DefenderWeapon">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||
<xs:element name="MagazineAmmo" type="t:int" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Ammo currently loaded into the magazine</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
@@ -53,7 +54,6 @@
|
||||
<xs:element name="ReloadTime" type="t:double" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Time it takes to load ONE SHELL into the weapon in seconds</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||
<xs:element name="TriggerHeld" type="t:bool" minOccurs="0"/>
|
||||
<xs:element name="FireCooldown" type="t:double" minOccurs="0"/>
|
||||
<xs:element name="IsReloading" type="t:bool" minOccurs="0"/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<SidearmWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SidearmWeapon.xsd">
|
||||
<Slot><Secondary/></Slot>
|
||||
<MagazineAmmo>16</MagazineAmmo>
|
||||
<MagazineSize>16</MagazineSize>
|
||||
<BaseDamage>20</BaseDamage>
|
||||
@@ -8,7 +9,6 @@
|
||||
<ViewPunch>0.01</ViewPunch>
|
||||
<ReloadTime>0.5</ReloadTime>
|
||||
<EquipTime>0.5</EquipTime>
|
||||
<Slot><Secondary/></Slot>
|
||||
<TriggerHeld>false</TriggerHeld>
|
||||
<FireCooldown>0</FireCooldown>
|
||||
<IsReloading>false</IsReloading>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<xs:element name="SidearmWeapon">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||
<xs:element name="MagazineAmmo" type="t:int" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Ammo currently loaded into the magazine</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
@@ -41,7 +42,6 @@
|
||||
<xs:element name="EquipTime" type="t:double" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Time it takes from selecting the weapon until it's ready to fire</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||
<xs:element name="TriggerHeld" type="t:bool" minOccurs="0"/>
|
||||
<xs:element name="FireCooldown" type="t:double" minOccurs="0"/>
|
||||
<xs:element name="IsReloading" type="t:bool" minOccurs="0"/>
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
<?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="AssaultWeapon" 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>
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.12043038" Y="-0.244988307" Z="-0.181454808"/>
|
||||
<Orientation X="0.010404544" Y="-0.00268173823" Z="0.0428441577"/>
|
||||
</c:Transform>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
@@ -21,7 +15,8 @@
|
||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.00325386273" Y="0.0970000029" Z="-0.843000054"/>
|
||||
<Position X="0.00800000038" Y="0.0920000076" Z="-0.416000009"/>
|
||||
<Orientation X="6.2760005" Y="0.00500000035" Z="0.00600000005"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -37,9 +32,8 @@
|
||||
</Entity>
|
||||
<Entity name="AmmunitionHUD">
|
||||
<Components>
|
||||
<c:AmmunitionHUD/>
|
||||
<c:Transform>
|
||||
<Position X="-0.0430000015" Y="0.131501317" Z="-0.0670000017"/>
|
||||
<Position X="-0.0440000035" Y="0.136000007" Z="-0.119000003"/>
|
||||
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
@@ -70,6 +64,11 @@
|
||||
<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>
|
||||
@@ -79,10 +78,15 @@
|
||||
<Entity name="Ammo">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>360</Content>
|
||||
<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"/>
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
<?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">
|
||||
<Entity name="AssaultWeapon" 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>
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.163429111" Y="1.0235405" Z="-0.215489209"/>
|
||||
<Orientation X="-0.0631071255" Y="-0.0576644838" Z="0.118255548"/>
|
||||
</c:Transform>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
<Origin X="0" Y="0.772000015" Z="0"/>
|
||||
<Size X="1" Y="1.60000002" Z="1"/>
|
||||
</c:AABB>
|
||||
<c:AssaultWeapon>
|
||||
<Slot>
|
||||
<Secondary/>
|
||||
</Slot>
|
||||
</c:AssaultWeapon>
|
||||
<c:Collidable/>
|
||||
<c:DefenderWeapon/>
|
||||
<c:DashAbility/>
|
||||
<c:DoubleJump/>
|
||||
<c:SidearmWeapon/>
|
||||
<c:Health/>
|
||||
<c:Physics>
|
||||
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
|
||||
@@ -470,10 +474,10 @@
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>DefenderWeapon</Weapon>
|
||||
<Weapon>AssaultWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/DefenderWeaponView.xml</EntityFile>
|
||||
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120430619" Y="-0.229639441" Z="-0.181454554"/>
|
||||
@@ -545,13 +549,13 @@
|
||||
<Entity name="PrimaryAttachment">
|
||||
<Components>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>DefenderWeapon</Weapon>
|
||||
<Weapon>AssaultWeapon</Weapon>
|
||||
<Person>
|
||||
<ThirdPerson/>
|
||||
</Person>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/DefenderWeaponWorld.xml</EntityFile>
|
||||
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
@@ -0,0 +1,695 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="Player" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:AABB>
|
||||
<Origin X="0" Y="0.772000015" Z="0"/>
|
||||
<Size X="1" Y="1.60000002" Z="1"/>
|
||||
</c:AABB>
|
||||
<c:AssaultWeapon/>
|
||||
<c:Collidable/>
|
||||
<c:DashAbility/>
|
||||
<c:DoubleJump/>
|
||||
<c:Health/>
|
||||
<c:Physics>
|
||||
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
|
||||
</c:Physics>
|
||||
<c:Player>
|
||||
<MovementSpeed>5</MovementSpeed>
|
||||
<CurrentWeapon></CurrentWeapon>
|
||||
</c:Player>
|
||||
<c:Team>
|
||||
<Team>
|
||||
<Blue/>
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0288832188" Z="2.64144421"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="Camera">
|
||||
<Components>
|
||||
<c:Camera>
|
||||
<NearClip>0.10000000149011612</NearClip>
|
||||
<FarClip>300</FarClip>
|
||||
</c:Camera>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="1.27700007" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="CameraModel">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Widgets/Camera.mesh</Resource>
|
||||
<Visible>false</Visible>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0331346765" Z="-0.0792061687"/>
|
||||
<Scale X="1.30000007" Y="1.50000012" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="HUD">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Crosshair">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<DepthSort>false</DepthSort>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.200000003"/>
|
||||
<Scale X="0.0250000004" Y="0.0250000004" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="HitMarkerSpawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/HitMarker.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="HealthHUD">
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="HealthBar">
|
||||
<Components>
|
||||
<c:Fill>
|
||||
<Percentage>1</Percentage>
|
||||
<Color A="0.301960796" B="1" G="0" R="0"/>
|
||||
</c:Fill>
|
||||
<c:HealthHUD/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="-0.263000011" Y="-0.185000002" Z="0"/>
|
||||
<Orientation X="5.87300014" Y="0" Z="4.71200037"/>
|
||||
<Scale X="0.106000006" Y="0.333000004" Z="0.150000006"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="BoostIcons">
|
||||
<Components>
|
||||
<c:BoostIconsHUD/>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Assault">
|
||||
<Components>
|
||||
<c:Fill>
|
||||
<Color A="1" B="0.533333361" G="1" R="0.329411775"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<DepthSort>false</DepthSort>
|
||||
<Color A="0.588235319" B="0.0392156877" G="0.184313729" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0.225000009" Y="0.168000013" Z="0"/>
|
||||
<Scale X="0.27700001" Y="0.100000001" Z="0.200000003"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Defender">
|
||||
<Components>
|
||||
<c:Fill>
|
||||
<Color A="1" B="1" G="0.58431375" R="0.105882354"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<DepthSort>false</DepthSort>
|
||||
<Color A="0.588235319" B="0.34117648" G="0.192156866" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0.224999994" Y="0.27700001" Z="0"/>
|
||||
<Scale X="0.27700001" Y="0.100000001" Z="0.200000003"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Sniper">
|
||||
<Components>
|
||||
<c:Fill>
|
||||
<Color A="1" B="0.345098048" G="0" R="1"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<DepthSort>false</DepthSort>
|
||||
<Color A="0.588235319" B="0.121568628" G="0" R="0.443137258"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0.225000009" Y="0.38500002" Z="0"/>
|
||||
<Scale X="0.27700001" Y="0.100000001" Z="0.200000003"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="HealthText">
|
||||
<Components>
|
||||
<c:Fill>
|
||||
<Percentage>1</Percentage>
|
||||
<Color A="1" B="1" G="0" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Text>
|
||||
<Content>100/100</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="0.505882382" B="3.92156863" G="1.17647064" R="0"/>
|
||||
</c:Text>
|
||||
<c:HealthHUD/>
|
||||
<c:Transform>
|
||||
<Position X="-0.355000019" Y="-0.203000009" Z="0.0410000011"/>
|
||||
<Orientation X="0" Y="0.410000026" Z="0"/>
|
||||
<Scale X="0.0350000001" Y="0.0350000001" Z="0.0350000001"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="CapturePointHUD">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.190541431" Z="0"/>
|
||||
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="BackgroundHexagon">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.919596612" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ProgressionHexagon">
|
||||
<Components>
|
||||
<c:CapturePointHUD>
|
||||
<CapturePointNumber>2</CapturePointNumber>
|
||||
</c:CapturePointHUD>
|
||||
<c:Fill>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="BackgroundHexagon">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0.811270177" Y="0.440691769" Z="-0.100000001"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ProgressionHexagon">
|
||||
<Components>
|
||||
<c:CapturePointHUD>
|
||||
<CapturePointNumber>3</CapturePointNumber>
|
||||
</c:CapturePointHUD>
|
||||
<c:Fill>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="BackgroundHexagon">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="1.62788737" Y="0.919596612" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ProgressionHexagon">
|
||||
<Components>
|
||||
<c:CapturePointHUD>
|
||||
<CapturePointNumber>4</CapturePointNumber>
|
||||
</c:CapturePointHUD>
|
||||
<c:Fill>
|
||||
<Percentage>1</Percentage>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="BackgroundHexagon">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="-0.820431828" Y="0.441878349" Z="-0.100000001"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ProgressionHexagon">
|
||||
<Components>
|
||||
<c:CapturePointHUD>
|
||||
<CapturePointNumber>1</CapturePointNumber>
|
||||
</c:CapturePointHUD>
|
||||
<c:Fill>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="BackgroundHexagon">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.699999988" B="0" G="0" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="-1.58304751" Y="0.919596612" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ProgressionHexagon">
|
||||
<Components>
|
||||
<c:CapturePointHUD/>
|
||||
<c:Fill>
|
||||
<Percentage>1</Percentage>
|
||||
<Color A="0.699999988" B="0" G="0" R="1"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
<Orientation X="0" Y="0" Z="4.71238899"/>
|
||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="KillFeed">
|
||||
<Components>
|
||||
<c:KillFeed/>
|
||||
<c:Transform>
|
||||
<Position X="0.486000031" Y="0.26000002" Z="0"/>
|
||||
<Scale X="0.0149999997" Y="0.0149999997" Z="0.0149999997"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="KillFeed1">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content></Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Alignment>
|
||||
<Right/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="KillFeed2">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content></Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Alignment>
|
||||
<Right/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-1" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="KillFeed3">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content></Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Alignment>
|
||||
<Right/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-2" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="CapturePointArrow">
|
||||
<Components>
|
||||
<c:CapturePointArrowHUD/>
|
||||
<c:Model>
|
||||
<Resource>Models/Widgets/Arrows/Arrow5.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Team>
|
||||
<Team>
|
||||
<Blue/>
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.714000046" Z="-1.30000007"/>
|
||||
<Orientation X="0.405680239" Y="0.369605929" Z="0"/>
|
||||
<Scale X="0.200000003" Y="0.200000003" Z="0.200000003"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Hands">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName1>Idle</AnimationName1>
|
||||
<Time1>1.8348644854054612</Time1>
|
||||
<Speed1>1</Speed1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
</c:Animation>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/Test/FirstPerson.mesh</Resource>
|
||||
<Color A="1" B="1" G="0.309803933" R="0"/>
|
||||
</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/AssaultWeaponView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.120430619" Y="-0.229639441" Z="-0.181454554"/>
|
||||
<Orientation X="0.0104045719" Y="-0.00268170005" Z="0.0428441055"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<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.120430619" Y="-0.229639441" Z="-0.181454554"/>
|
||||
<Orientation X="0.0104045719" Y="-0.00268170005" Z="0.0428441055"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ThirdPersonCamera">
|
||||
<Components>
|
||||
<c:Camera>
|
||||
<NearClip>0.10000000149011612</NearClip>
|
||||
<FarClip>300</FarClip>
|
||||
</c:Camera>
|
||||
<c:Model>
|
||||
<Resource>Models/Widgets/Camera.mesh</Resource>
|
||||
<Visible>false</Visible>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="-0.284000009" Y="1.83800006" Z="1.18900001"/>
|
||||
<Orientation X="5.95600033" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="PlayerModel">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName1>IdleF</AnimationName1>
|
||||
<Speed1>1</Speed1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
</c:Animation>
|
||||
<c:AnimationOffset>
|
||||
<AnimationName>AimRifle</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
</c:AnimationOffset>
|
||||
<c:Shielded/>
|
||||
<c:HiddenForLocalPlayer/>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
|
||||
<Color A="1" B="1" G="0.952941179" R="1"/>
|
||||
</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>
|
||||
<Person>
|
||||
<ThirdPerson/>
|
||||
</Person>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.15691258" Y="1.04389966" Z="-0.213815808"/>
|
||||
<Orientation X="-0.00425229501" Y="-0.0330814682" Z="0.137528151"/>
|
||||
</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="WeaponMuzzle">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.00624208851" Y="0.0957332104" Z="-0.159257293"/>
|
||||
</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>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="SecondaryAttachment">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>SidearmWeapon</Weapon>
|
||||
<Person>
|
||||
<ThirdPerson/>
|
||||
</Person>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0.15691258" Y="1.04389966" Z="-0.213815808"/>
|
||||
<Orientation X="-0.00425229501" Y="-0.0330814682" Z="0.137528151"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="AABBStanding">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<Color A="0.427450985" B="1" G="1" R="1"/>
|
||||
<Visible>false</Visible>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.772000015" Z="0"/>
|
||||
<Scale X="1" Y="1.60000002" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="AABBCrouching">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<Color A="0.745098054" B="1" G="0" R="1"/>
|
||||
<Visible>false</Visible>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.772000015" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="PlayerName">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>Insert name here</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"/>
|
||||
<Orientation X="0" Y="3.14199996" Z="0"/>
|
||||
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Indicator">
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Icons/Arrow.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<DepthSort>false</DepthSort>
|
||||
<Color A="1" B="1" G="0.309803933" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:HiddenForLocalPlayer/>
|
||||
<c:SpriteIndicator>
|
||||
<MinScale>50</MinScale>
|
||||
<VisibleForSingleTeamOnly>true</VisibleForSingleTeamOnly>
|
||||
</c:SpriteIndicator>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="1.84019077" Z="0"/>
|
||||
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ShieldAttachment">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/DefenderShield.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.859000027" Z="-0.976999998"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
@@ -1,18 +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:Sprite>
|
||||
<DiffuseTexture>Textures/Effects/Ray.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="1" B="0" G="0" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.690654039" Z="2.69841838"/>
|
||||
<Scale X="2" Y="0.0260000005" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children/>
|
||||
|
||||
</Entity>
|
||||
@@ -1,43 +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>
|
||||
<Scale X="0" Y="1" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Effects/Ray.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="1" B="0" G="0" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-50"/>
|
||||
<Scale X="100" Y="0.0260000005" Z="0"/>
|
||||
<Orientation X="0" Y="-1.57099998" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Effects/Ray.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="1" B="0" G="0" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-50"/>
|
||||
<Scale X="100" Y="0.0260000005" Z="0"/>
|
||||
<Orientation X="0" Y="-1.57099998" Z="3.1400001"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
@@ -1,17 +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:Model>
|
||||
<Resource>Models/Core/UnitCylinder.mesh</Resource>
|
||||
<Color A="0" B="0" G="0" R="39.2156868"/>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Scale X="0.0400000028" Y="26.2000008" Z="0.0400000028"/>
|
||||
<Orientation X="1.57070005" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children/>
|
||||
|
||||
</Entity>
|
||||
@@ -1,20 +1,46 @@
|
||||
<?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">
|
||||
<Entity name="RayRed" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Lifetime>
|
||||
<Lifetime>0.25</Lifetime>
|
||||
<Lifetime>0.10000000149011612</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:Model>
|
||||
<Resource>Models/Effects/CylinderShot.mesh</Resource>
|
||||
<Color A="0.149019614" B="39.2156868" G="39.2156868" R="0"/>
|
||||
<Transparent>true</Transparent>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Scale X="0.0690000057" Y="0.0690000057" Z="100"/>
|
||||
<Scale X="0" Y="1" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Effects/Ray.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.419607848" B="3.92156863" G="0.270588249" R="0"/>
|
||||
</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.0260000005" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Effects/Ray.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.419607848" B="3.92156863" G="0.270588249" R="0"/>
|
||||
</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.0260000005" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -1,17 +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:Model>
|
||||
<Resource>Models/Core/UnitCylinder.mesh</Resource>
|
||||
<Color A="0" B="0" G="0" R="39.2156868"/>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Scale X="0.0400000028" Y="26.2000008" Z="0.0400000028"/>
|
||||
<Orientation X="1.57070005" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children/>
|
||||
|
||||
</Entity>
|
||||
@@ -1,20 +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:Lifetime>
|
||||
<Lifetime>0.25</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:Model>
|
||||
<Resource>Models/Effects/CylinderShot.mesh</Resource>
|
||||
<Color A="0.149019614" B="0" G="0" R="39.2156868"/>
|
||||
<Transparent>true</Transparent>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Scale X="0.0690000057" Y="0.0690000057" Z="100"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children/>
|
||||
|
||||
</Entity>
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Game/Systems/PickupSpawnSystem.h"
|
||||
#include "Game/Systems/AmmoPickupSystem.h"
|
||||
#include "Game/Systems/DamageIndicatorSystem.h"
|
||||
#include "Game/Systems/Weapon/AssaultWeaponBehaviour.h"
|
||||
#include "Game/Systems/Weapon/DefenderWeaponBehaviour.h"
|
||||
#include "Game/Systems/Weapon/SidearmWeaponBehaviour.h"
|
||||
#include "Rendering/AnimationSystem.h"
|
||||
@@ -128,6 +129,7 @@ Game::Game(int argc, char* argv[])
|
||||
m_SystemPipeline->AddSystem<PlayerMovementSystem>(updateOrderLevel);
|
||||
m_SystemPipeline->AddSystem<SpawnerSystem>(updateOrderLevel);
|
||||
m_SystemPipeline->AddSystem<PlayerSpawnSystem>(updateOrderLevel);
|
||||
m_SystemPipeline->AddSystem<AssaultWeaponBehaviour>(updateOrderLevel, m_Renderer, m_OctreeCollision);
|
||||
m_SystemPipeline->AddSystem<DefenderWeaponBehaviour>(updateOrderLevel, m_Renderer, m_OctreeCollision);
|
||||
m_SystemPipeline->AddSystem<SidearmWeaponBehaviour>(updateOrderLevel, m_Renderer, m_OctreeCollision);
|
||||
m_SystemPipeline->AddSystem<LifetimeSystem>(updateOrderLevel);
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
#include "Systems/Weapon/AssaultWeaponBehaviour.h"
|
||||
|
||||
void AssaultWeaponBehaviour::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt)
|
||||
{
|
||||
double& fireCooldown = cWeapon["FireCooldown"];
|
||||
fireCooldown = glm::max(0.0, fireCooldown - dt);
|
||||
|
||||
WeaponBehaviour::UpdateComponent(entity, cWeapon, dt);
|
||||
}
|
||||
|
||||
void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt)
|
||||
{
|
||||
// Decrement reload timer
|
||||
double& reloadTimer = cWeapon["ReloadTimer"];
|
||||
reloadTimer = glm::max(0.0, reloadTimer - dt);
|
||||
|
||||
// Start reloading automatically if at 0 mag ammo
|
||||
int& magAmmo = cWeapon["MagazineAmmo"];
|
||||
if (m_ConfigAutoReload && magAmmo <= 0) {
|
||||
OnReload(cWeapon, wi);
|
||||
}
|
||||
|
||||
// Handle reloading
|
||||
bool& isReloading = cWeapon["IsReloading"];
|
||||
if (isReloading && reloadTimer <= 0.0) {
|
||||
int& magSize = cWeapon["MagazineSize"];
|
||||
int& ammo = cWeapon["Ammo"];
|
||||
|
||||
ammo = glm::max(0, ammo - (magSize - magAmmo));
|
||||
magAmmo = glm::min(magSize, ammo);
|
||||
isReloading = false;
|
||||
}
|
||||
|
||||
// Restore view angle
|
||||
if (IsClient) {
|
||||
float& currentTravel = cWeapon["CurrentTravel"];
|
||||
float& returnSpeed = cWeapon["ViewReturnSpeed"];
|
||||
if (currentTravel > 0) {
|
||||
float change = returnSpeed * dt;
|
||||
currentTravel = glm::max(0.f, currentTravel - change);
|
||||
EntityWrapper camera = wi.Player.FirstChildByName("Camera");
|
||||
if (camera.Valid()) {
|
||||
glm::vec3& cameraOrientation = camera["Transform"]["Orientation"];
|
||||
cameraOrientation.x -= change;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fire if we're able to fire
|
||||
if (canFire(cWeapon, wi)) {
|
||||
fireBullet(cWeapon, wi);
|
||||
}
|
||||
}
|
||||
|
||||
void AssaultWeaponBehaviour::OnPrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
{
|
||||
cWeapon["TriggerHeld"] = true;
|
||||
if (canFire(cWeapon, wi)) {
|
||||
fireBullet(cWeapon, wi);
|
||||
}
|
||||
}
|
||||
|
||||
void AssaultWeaponBehaviour::OnCeasePrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
{
|
||||
cWeapon["TriggerHeld"] = false;
|
||||
}
|
||||
|
||||
void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
{
|
||||
bool& isReloading = cWeapon["IsReloading"];
|
||||
if (isReloading) {
|
||||
return;
|
||||
}
|
||||
|
||||
int& magAmmo = cWeapon["MagazineAmmo"];
|
||||
int& magSize = cWeapon["MagazineSize"];
|
||||
if (magAmmo >= magSize) {
|
||||
return;
|
||||
}
|
||||
int& ammo = cWeapon["Ammo"];
|
||||
if (ammo <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
double reloadTime = cWeapon["ReloadTime"];
|
||||
double& reloadTimer = cWeapon["ReloadTimer"];
|
||||
|
||||
// Start reload
|
||||
isReloading = true;
|
||||
reloadTimer = reloadTime;
|
||||
}
|
||||
|
||||
void AssaultWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
{
|
||||
// Make sure the trigger is released if weapon is holstered while firing
|
||||
cWeapon["TriggerHeld"] = false;
|
||||
|
||||
// Cancel any reload
|
||||
cWeapon["IsReloading"] = false;
|
||||
cWeapon["ReloadTimer"] = 0.0;
|
||||
}
|
||||
|
||||
void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
{
|
||||
cWeapon["FireCooldown"] = 60.0 / (double)cWeapon["RPM"];
|
||||
|
||||
// Ammo
|
||||
int& magAmmo = cWeapon["MagazineAmmo"];
|
||||
if (magAmmo <= 0) {
|
||||
return;
|
||||
} else {
|
||||
magAmmo -= 1;
|
||||
}
|
||||
|
||||
// View punch
|
||||
if (IsClient) {
|
||||
EntityWrapper camera = wi.Player.FirstChildByName("Camera");
|
||||
if (camera.Valid()) {
|
||||
glm::vec3& cameraOrientation = camera["Transform"]["Orientation"];
|
||||
float viewPunch = cWeapon["ViewPunch"];
|
||||
float maxTravelAngle = cWeapon["MaxTravelAngle"];
|
||||
float& currentTravel = cWeapon["CurrentTravel"];
|
||||
if (currentTravel < maxTravelAngle) {
|
||||
float change = viewPunch;
|
||||
if (currentTravel + change > maxTravelAngle) {
|
||||
change = maxTravelAngle - currentTravel;
|
||||
}
|
||||
cameraOrientation.x += change;
|
||||
currentTravel += change;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get weapon model based on current person
|
||||
EntityWrapper weaponModelEntity = getRelevantWeaponModelEntity(wi);
|
||||
if (!weaponModelEntity.Valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Tracer
|
||||
EntityWrapper tracerSpawner = weaponModelEntity.FirstChildByName("WeaponMuzzle");
|
||||
if (tracerSpawner.Valid()) {
|
||||
glm::vec3 origin = Transform::AbsolutePosition(tracerSpawner);
|
||||
glm::vec3 direction = glm::quat(Transform::AbsoluteOrientationEuler(tracerSpawner)) * glm::vec3(0, 0, -1);
|
||||
float distance = traceRayDistance(origin, direction);
|
||||
EntityWrapper ray = SpawnerSystem::Spawn(tracerSpawner);
|
||||
if (ray.Valid()) {
|
||||
((glm::vec3&)ray["Transform"]["Scale"]).z = distance;
|
||||
}
|
||||
}
|
||||
|
||||
// Deal damage
|
||||
if (dealDamage(cWeapon, wi)) {
|
||||
// Show hit marker
|
||||
EntityWrapper hitMarkerSpawner = wi.Player.FirstChildByName("HitMarkerSpawner");
|
||||
if (hitMarkerSpawner.Valid()) {
|
||||
SpawnerSystem::Spawn(hitMarkerSpawner, hitMarkerSpawner);
|
||||
Events::PlaySoundOnEntity e;
|
||||
e.EmitterID = wi.Player.ID;
|
||||
e.FilePath = "Audio/weapon/hitclick.wav";
|
||||
m_EventBroker->Publish(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool AssaultWeaponBehaviour::canFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
{
|
||||
bool triggerHeld = cWeapon["TriggerHeld"];
|
||||
bool cooldownPassed = (double)cWeapon["FireCooldown"] <= 0.0;
|
||||
bool isReloading = cWeapon["IsReloading"];
|
||||
return triggerHeld && cooldownPassed;
|
||||
}
|
||||
|
||||
bool AssaultWeaponBehaviour::dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||
{
|
||||
// Only deal damage client side
|
||||
if (!IsClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only handle damage for the local player
|
||||
if (wi.Player != LocalPlayer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure the player isn't shooting from the grave
|
||||
if (!wi.Player.Valid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 3D-pick middle of screen
|
||||
Rectangle viewport = m_Renderer->GetViewportSize();
|
||||
glm::vec2 centerScreen(viewport.Width / 2, viewport.Height / 2);
|
||||
// TODO: Some horizontal spread
|
||||
PickData pickData = m_Renderer->Pick(centerScreen);
|
||||
EntityWrapper victim(m_World, pickData.Entity);
|
||||
if (!victim.Valid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't let us somehow shoot ourselves in the foot
|
||||
if (victim == LocalPlayer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only care about players being hit
|
||||
if (!victim.HasComponent("Player")) {
|
||||
victim = victim.FirstParentWithComponent("Player");
|
||||
}
|
||||
if (!victim.Valid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
double damage = cWeapon["BaseDamage"];
|
||||
// If friendly fire, reduce damage to 0 (needed to make Boosts, Ammosharing work)
|
||||
if ((ComponentInfo::EnumType)victim["Team"]["Team"] == (ComponentInfo::EnumType)wi.Player["Team"]["Team"]) {
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
// Deal damage!
|
||||
Events::PlayerDamage ePlayerDamage;
|
||||
ePlayerDamage.Inflictor = wi.Player;
|
||||
ePlayerDamage.Victim = victim;
|
||||
ePlayerDamage.Damage = damage;
|
||||
m_EventBroker->Publish(ePlayerDamage);
|
||||
|
||||
return damage > 0;
|
||||
}
|
||||
Reference in New Issue
Block a user