Merge remote-tracking branch 'origin/master' into Animations
# Conflicts: # resources/Schema/Types/Entity.xsd
This commit is contained in:
+1
-1
Submodule assets updated: 4e2b71f13a...7a6d70787b
@@ -27,6 +27,7 @@ struct EntityWrapper
|
|||||||
bool HasComponent(const std::string& componentType);
|
bool HasComponent(const std::string& componentType);
|
||||||
void AttachComponent(const char* componentName);
|
void AttachComponent(const char* componentName);
|
||||||
EntityWrapper Parent();
|
EntityWrapper Parent();
|
||||||
|
EntityWrapper FirstParentByName(const std::string& parentEntityName);
|
||||||
EntityWrapper FirstChildByName(const std::string& name);
|
EntityWrapper FirstChildByName(const std::string& name);
|
||||||
EntityWrapper FirstLevelChildByName(const std::string& name);
|
EntityWrapper FirstLevelChildByName(const std::string& name);
|
||||||
EntityWrapper FirstParentWithComponent(const std::string& componentType);
|
EntityWrapper FirstParentWithComponent(const std::string& componentType);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "../Core/ELockMouse.h"
|
#include "../Core/ELockMouse.h"
|
||||||
#include "../Core/EFileDropped.h"
|
#include "../Core/EFileDropped.h"
|
||||||
#include "../Rendering/Texture.h"
|
#include "../Rendering/Texture.h"
|
||||||
|
#include "Game/Events/ESpawnerSpawn.h"
|
||||||
|
|
||||||
class EditorGUI
|
class EditorGUI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public:
|
|||||||
void AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID);
|
void AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID);
|
||||||
virtual bool AssaultDashDoubleTapped() const { return m_AssaultDashDoubleTapped; }
|
virtual bool AssaultDashDoubleTapped() const { return m_AssaultDashDoubleTapped; }
|
||||||
virtual bool PlayerIsDashing() const { return m_PlayerIsDashing; }
|
virtual bool PlayerIsDashing() const { return m_PlayerIsDashing; }
|
||||||
|
bool SpecialAbilityKeyDown() const { return m_SpecialAbilityKeyDown; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const int m_PlayerID;
|
const int m_PlayerID;
|
||||||
@@ -145,10 +146,10 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
if (m_NumberOfMovementKeysDown == 0) {
|
if (m_NumberOfMovementKeysDown == 0) {
|
||||||
m_MovementKeyDown = false;
|
m_MovementKeyDown = false;
|
||||||
}
|
}
|
||||||
//you have just released the key, store what key it was and reset the doubletap-sensitivity-timer
|
//you have just released the key, store what key it was and reset the doubletap-sensitivity-timer
|
||||||
m_AssaultDashTapDirection = m_CurrentDirectionVector;
|
m_AssaultDashTapDirection = m_CurrentDirectionVector;
|
||||||
m_AssaultDashDoubleTapDeltaTime = 0.f;
|
m_AssaultDashDoubleTapDeltaTime = 0.f;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,18 +162,11 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (e.Command == "SpecialAbility") {
|
if (e.Command == "SpecialAbility") {
|
||||||
if (e.Value > 0) {
|
m_SpecialAbilityKeyDown = e.Value > 0;
|
||||||
m_SpecialAbilityKeyDown = true;
|
|
||||||
} else {
|
|
||||||
m_SpecialAbilityKeyDown = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m_SpecialAbilityKeyDown && m_MovementKeyDown) {
|
|
||||||
m_ShiftDashing = true;
|
|
||||||
} else {
|
|
||||||
m_ShiftDashing = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_ShiftDashing = m_SpecialAbilityKeyDown && m_MovementKeyDown;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ public:
|
|||||||
{
|
{
|
||||||
// Check if we are trying to add more than the package can fit.
|
// Check if we are trying to add more than the package can fit.
|
||||||
if (m_MaxPacketSize < m_Offset + sizeof(T)) {
|
if (m_MaxPacketSize < m_Offset + sizeof(T)) {
|
||||||
LOG_WARNING("Packet AddPrimitive(): You are trying to add more than we have allocated for! New size is %i bytes\n", m_MaxPacketSize*2);
|
if (m_MaxPacketSize >= 32000) {
|
||||||
|
LOG_WARNING("Package::WritePrimitive(): New size is huge %i bytes\n", m_MaxPacketSize*2);
|
||||||
|
}
|
||||||
resizeData();
|
resizeData();
|
||||||
}
|
}
|
||||||
memcpy(m_Data + m_Offset, &val, sizeof(T));
|
memcpy(m_Data + m_Offset, &val, sizeof(T));
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
#ifndef AmmunitionHUDSystem_h__
|
|
||||||
#define AmmunitionHUDSystem_h__
|
|
||||||
|
|
||||||
#include "../../Engine/Core/System.h"
|
|
||||||
#include "../../Engine/GLM.h"
|
|
||||||
|
|
||||||
class AmmunitionHUDSystem : public ImpureSystem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
AmmunitionHUDSystem(SystemParams params)
|
|
||||||
: System(params)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
virtual void Update(double dt) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#ifndef AmmunitionHUDSystem_h__
|
||||||
|
#define AmmunitionHUDSystem_h__
|
||||||
|
|
||||||
|
#include <boost/lexical_cast.hpp>
|
||||||
|
#include "../../Engine/Core/System.h"
|
||||||
|
#include "../../Engine/GLM.h"
|
||||||
|
|
||||||
|
class TextFieldReader : public PureSystem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TextFieldReader(SystemParams params)
|
||||||
|
: System(params)
|
||||||
|
, PureSystem("TextFieldReader")
|
||||||
|
{ }
|
||||||
|
|
||||||
|
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cTextFieldReader, double dt) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,47 +1,40 @@
|
|||||||
#ifndef AssaultWeaponBehaviour_h__
|
#ifndef AssaultWeaponBehaviour_h__
|
||||||
#define AssaultWeaponBehaviour_h__
|
#define AssaultWeaponBehaviour_h__
|
||||||
|
|
||||||
#include "Sound/EPlaySoundOnEntity.h"
|
|
||||||
#include "Collision/Collision.h"
|
|
||||||
#include "Core/ConfigFile.h"
|
|
||||||
#include "WeaponBehaviour.h"
|
#include "WeaponBehaviour.h"
|
||||||
#include "../SpawnerSystem.h"
|
#include "Collision/Collision.h"
|
||||||
#include "Core/EPlayerDamage.h"
|
#include "Core/EPlayerDamage.h"
|
||||||
#include "Core/EShoot.h"
|
#include "Sound/EPlaySoundOnEntity.h"
|
||||||
|
|
||||||
class AssaultWeaponBehaviour : public WeaponBehaviour<AssaultWeaponBehaviour>
|
class AssaultWeaponBehaviour : public WeaponBehaviour<AssaultWeaponBehaviour>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AssaultWeaponBehaviour(SystemParams systemParams, IRenderer* renderer, Octree<EntityAABB>* collisionOctree)
|
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:
|
void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override;
|
||||||
virtual void OnPrimaryFire(WeaponInfo& wi) override;
|
void UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt) override;
|
||||||
virtual void OnCeasePrimaryFire(WeaponInfo& wi) override;
|
void OnPrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||||
virtual void OnReload(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:
|
private:
|
||||||
// State
|
std::random_device m_RandomDevice;
|
||||||
bool m_Firing = false;
|
std::mt19937 m_RandomEngine;
|
||||||
bool m_Reloading = false;
|
|
||||||
double m_ReloadTimer = 0.0;
|
|
||||||
double m_TimeSinceLastFire = 0.0;
|
|
||||||
EntityWrapper m_FirstPersonReloadImpostor;
|
|
||||||
|
|
||||||
bool hasAmmo();
|
// Weapon functions
|
||||||
void fireRound();
|
void fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||||
void spawnTracer();
|
//void dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi, glm::vec3 direction, double damage);
|
||||||
float traceRayDistance(glm::vec3 origin, glm::vec3 direction);
|
bool canFire(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||||
void playFireSound();
|
bool dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||||
void playEmptySound();
|
|
||||||
void viewPunch();
|
// Utility
|
||||||
void finishReload();
|
//Camera cameraFromEntity(EntityWrapper camera);
|
||||||
void playShootAnimation();
|
|
||||||
void playIdleAnimation();
|
|
||||||
void playReloadAnimation();
|
|
||||||
bool shoot(double damage);
|
|
||||||
void showHitMarker();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
|
#ifndef DefenderWeaponBehaviour_h__
|
||||||
|
#define DefenderWeaponBehaviour_h__
|
||||||
|
|
||||||
#include "WeaponBehaviour.h"
|
#include "WeaponBehaviour.h"
|
||||||
#include "Collision/Collision.h"
|
#include "Collision/Collision.h"
|
||||||
#include "Core/EPlayerDamage.h"
|
#include "Core/EPlayerDamage.h"
|
||||||
#include "Rendering/ESetCamera.h"
|
#include "Sound/EPlaySoundOnEntity.h"
|
||||||
|
|
||||||
class DefenderWeaponBehaviour : public WeaponBehaviour<DefenderWeaponBehaviour>
|
class DefenderWeaponBehaviour : public WeaponBehaviour<DefenderWeaponBehaviour>
|
||||||
{
|
{
|
||||||
@@ -10,29 +13,27 @@ public:
|
|||||||
: System(systemParams)
|
: System(systemParams)
|
||||||
, WeaponBehaviour(systemParams, "DefenderWeapon", renderer, collisionOctree)
|
, WeaponBehaviour(systemParams, "DefenderWeapon", renderer, collisionOctree)
|
||||||
, m_RandomEngine(m_RandomDevice())
|
, m_RandomEngine(m_RandomDevice())
|
||||||
{
|
{ }
|
||||||
EVENT_SUBSCRIBE_MEMBER(m_ESetCamera, &DefenderWeaponBehaviour::OnSetCamera);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override;
|
void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override;
|
||||||
void UpdateWeapon(WeaponInfo& wi, double dt) override;
|
void UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt) override;
|
||||||
void OnPrimaryFire(WeaponInfo& wi) override;
|
void OnPrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||||
void OnCeasePrimaryFire(WeaponInfo& wi) override;
|
void OnCeasePrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||||
bool OnInputCommand(WeaponInfo& wi, const Events::InputCommand& e) 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:
|
private:
|
||||||
std::random_device m_RandomDevice;
|
std::random_device m_RandomDevice;
|
||||||
std::mt19937 m_RandomEngine;
|
std::mt19937 m_RandomEngine;
|
||||||
EntityWrapper m_CurrentCamera;
|
|
||||||
|
|
||||||
EventRelay<DefenderWeaponBehaviour, Events::SetCamera> m_ESetCamera;
|
|
||||||
bool OnSetCamera(const Events::SetCamera& e);
|
|
||||||
|
|
||||||
// Weapon functions
|
// Weapon functions
|
||||||
void fireShell(WeaponInfo& wi);
|
void fireShell(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||||
void dealDamage(WeaponInfo& wi, glm::vec3 direction, double damage);
|
void dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi, glm::vec3 direction, double damage);
|
||||||
|
bool canFire(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||||
|
|
||||||
// Utility
|
// Utility
|
||||||
float traceRayDistance(glm::vec3 origin, glm::vec3 direction);
|
|
||||||
Camera cameraFromEntity(EntityWrapper camera);
|
Camera cameraFromEntity(EntityWrapper camera);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#ifndef SidearmWeaponBehaviour_h__
|
||||||
|
#define SidearmWeaponBehaviour_h__
|
||||||
|
|
||||||
|
#include "WeaponBehaviour.h"
|
||||||
|
#include "Collision/Collision.h"
|
||||||
|
#include "Core/EPlayerDamage.h"
|
||||||
|
|
||||||
|
class SidearmWeaponBehaviour : public WeaponBehaviour<SidearmWeaponBehaviour>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SidearmWeaponBehaviour(SystemParams systemParams, IRenderer* renderer, Octree<EntityAABB>* collisionOctree)
|
||||||
|
: System(systemParams)
|
||||||
|
, WeaponBehaviour(systemParams, "SidearmWeapon", renderer, collisionOctree)
|
||||||
|
, m_RandomEngine(m_RandomDevice())
|
||||||
|
{ }
|
||||||
|
|
||||||
|
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 OnEquip(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||||
|
void OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::random_device m_RandomDevice;
|
||||||
|
std::mt19937 m_RandomEngine;
|
||||||
|
|
||||||
|
// Weapon functions
|
||||||
|
void fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi);
|
||||||
|
//void dealDamage(WeaponInfo& wi, glm::vec3 direction, double damage);
|
||||||
|
|
||||||
|
// Utility
|
||||||
|
bool canFire(ComponentWrapper cWeapon);
|
||||||
|
bool playerInFirstPerson(EntityWrapper player);
|
||||||
|
//float traceRayDistance(glm::vec3 origin, glm::vec3 direction);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
#include "Collision/EntityAABB.h"
|
#include "Collision/EntityAABB.h"
|
||||||
#include "Input/EInputCommand.h"
|
#include "Input/EInputCommand.h"
|
||||||
#include "Systems/SpawnerSystem.h"
|
#include "Systems/SpawnerSystem.h"
|
||||||
|
#include "Rendering/ESetCamera.h"
|
||||||
|
#include "Core/ConfigFile.h"
|
||||||
|
|
||||||
template <typename ETYPE>
|
template <typename ETYPE>
|
||||||
class WeaponBehaviour : public PureSystem
|
class WeaponBehaviour : public PureSystem
|
||||||
@@ -20,42 +22,85 @@ public:
|
|||||||
, m_Renderer(renderer)
|
, m_Renderer(renderer)
|
||||||
, m_CollisionOctree(collisionOctree)
|
, m_CollisionOctree(collisionOctree)
|
||||||
{
|
{
|
||||||
EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &WeaponBehaviour::_OnInputCommand)
|
EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &WeaponBehaviour::_OnInputCommand);
|
||||||
|
EVENT_SUBSCRIBE_MEMBER(m_ESetCamera, &WeaponBehaviour::_OnSetCamera);
|
||||||
|
auto config = ResourceManager::Load<ConfigFile>("Config.ini");
|
||||||
|
m_ConfigAutoReload = config->Get<bool>("Gameplay.AutoReload", true);
|
||||||
}
|
}
|
||||||
virtual ~WeaponBehaviour() = default;
|
virtual ~WeaponBehaviour() = default;
|
||||||
|
|
||||||
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt) override
|
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override
|
||||||
{
|
{
|
||||||
auto weapon = getActiveWeapon(entity);
|
auto weapon = getActiveWeapon(entity);
|
||||||
if (!weapon) {
|
if (!weapon) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
UpdateWeapon(*weapon, dt);
|
UpdateWeapon(cWeapon, *weapon, dt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct WeaponInfo
|
struct WeaponInfo
|
||||||
{
|
{
|
||||||
std::string WeaponComponent;
|
|
||||||
EntityWrapper Player;
|
EntityWrapper Player;
|
||||||
EntityWrapper WeaponEntity;
|
EntityWrapper WeaponEntity;
|
||||||
EntityWrapper FirstPersonEntity;
|
EntityWrapper FirstPersonEntity;
|
||||||
EntityWrapper ThirdPersonEntity;
|
EntityWrapper ThirdPersonEntity;
|
||||||
ComponentWrapper GetComponent() { return WeaponEntity[WeaponComponent]; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IRenderer* m_Renderer;
|
IRenderer* m_Renderer;
|
||||||
|
EntityWrapper m_CurrentCamera;
|
||||||
Octree<EntityAABB>* m_CollisionOctree;
|
Octree<EntityAABB>* m_CollisionOctree;
|
||||||
std::unordered_map<EntityWrapper, WeaponInfo> m_ActiveWeapons;
|
std::unordered_map<EntityWrapper, WeaponInfo> m_ActiveWeapons;
|
||||||
|
bool m_ConfigAutoReload;
|
||||||
|
|
||||||
virtual void UpdateWeapon(WeaponInfo& wi, double dt) { }
|
virtual void UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt) { }
|
||||||
virtual void OnPrimaryFire(WeaponInfo& wi) { }
|
virtual void OnPrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi) { }
|
||||||
virtual void OnCeasePrimaryFire(WeaponInfo& wi) { }
|
virtual void OnCeasePrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi) { }
|
||||||
virtual void OnReload(WeaponInfo& wi) { }
|
virtual void OnReload(ComponentWrapper cWeapon, WeaponInfo& wi) { }
|
||||||
virtual bool OnInputCommand(WeaponInfo& wi, const Events::InputCommand& e) { return false; }
|
virtual void OnEquip(ComponentWrapper cWeapon, WeaponInfo& wi) { }
|
||||||
|
virtual void OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi) { }
|
||||||
|
virtual bool OnInputCommand(ComponentWrapper cWeapon, WeaponInfo& wi, const Events::InputCommand& e) { return false; }
|
||||||
|
|
||||||
|
bool isPlayerInFirstPerson(EntityWrapper player)
|
||||||
|
{
|
||||||
|
if (!m_CurrentCamera.Valid()) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return m_CurrentCamera == player || m_CurrentCamera.IsChildOf(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns wi.FirstPersonEntity or wi.ThirdPersonEntity depending on
|
||||||
|
// if the player is in first person mode or not.
|
||||||
|
EntityWrapper getRelevantWeaponModelEntity(WeaponInfo& wi)
|
||||||
|
{
|
||||||
|
if (isPlayerInFirstPerson(wi.Player)) {
|
||||||
|
return wi.FirstPersonEntity;
|
||||||
|
} else {
|
||||||
|
return wi.ThirdPersonEntity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float traceRayDistance(glm::vec3 origin, glm::vec3 direction)
|
||||||
|
{
|
||||||
|
float distance;
|
||||||
|
glm::vec3 pos;
|
||||||
|
auto entity = Collision::EntityFirstHitByRay(Ray(origin, direction), m_CollisionOctree, distance, pos);
|
||||||
|
if (entity) {
|
||||||
|
return distance;
|
||||||
|
} else {
|
||||||
|
return 100.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
EventRelay<ETYPE, Events::SetCamera> m_ESetCamera;
|
||||||
|
bool _OnSetCamera(const Events::SetCamera& e)
|
||||||
|
{
|
||||||
|
m_CurrentCamera = e.CameraEntity;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
EventRelay<ETYPE, Events::InputCommand> m_EInputCommand;
|
EventRelay<ETYPE, Events::InputCommand> m_EInputCommand;
|
||||||
bool _OnInputCommand(const Events::InputCommand& e)
|
bool _OnInputCommand(const Events::InputCommand& e)
|
||||||
{
|
{
|
||||||
@@ -70,15 +115,19 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the player has this weapon
|
// Make sure the player has this weapon
|
||||||
auto weapon = getWeaponComponent(player);
|
auto cWeapon = getWeaponComponent(player);
|
||||||
if (!weapon) {
|
if (!cWeapon) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Weapon selection
|
// Weapon selection
|
||||||
if (e.Command == "SelectWeapon") {
|
if (e.Command == "SelectWeapon") {
|
||||||
if (static_cast<ComponentInfo::EnumType>(e.Value) == static_cast<ComponentInfo::EnumType>((*weapon)["Slot"])) {
|
if (e.Value > 0) {
|
||||||
selectWeapon(player);
|
if (static_cast<ComponentInfo::EnumType>(e.Value) == static_cast<ComponentInfo::EnumType>((*cWeapon)["Slot"])) {
|
||||||
|
selectWeapon(*cWeapon, player);
|
||||||
|
} else {
|
||||||
|
holsterWeapon(*cWeapon, player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,18 +140,18 @@ private:
|
|||||||
// Fire
|
// Fire
|
||||||
if (e.Command == "PrimaryFire") {
|
if (e.Command == "PrimaryFire") {
|
||||||
if (e.Value > 0) {
|
if (e.Value > 0) {
|
||||||
OnPrimaryFire(*activeWeapon);
|
OnPrimaryFire(*cWeapon, *activeWeapon);
|
||||||
} else {
|
} else {
|
||||||
OnCeasePrimaryFire(*activeWeapon);
|
OnCeasePrimaryFire(*cWeapon, *activeWeapon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reload
|
// Reload
|
||||||
if (e.Command == "Reload" && e.Value != 0) {
|
if (e.Command == "Reload" && e.Value != 0) {
|
||||||
OnReload(*activeWeapon);
|
OnReload(*cWeapon, *activeWeapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
return OnInputCommand(*activeWeapon, e);
|
return OnInputCommand(*cWeapon, *activeWeapon, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<ComponentWrapper> getWeaponComponent(EntityWrapper player)
|
boost::optional<ComponentWrapper> getWeaponComponent(EntityWrapper player)
|
||||||
@@ -129,8 +178,13 @@ private:
|
|||||||
return activeWeapon;
|
return activeWeapon;
|
||||||
}
|
}
|
||||||
|
|
||||||
void selectWeapon(EntityWrapper player)
|
void selectWeapon(ComponentWrapper cWeapon, EntityWrapper player)
|
||||||
{
|
{
|
||||||
|
// Don't reselect weapon if it's already active
|
||||||
|
if (getActiveWeapon(player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Find the weapon attachments matching the weapon type
|
// Find the weapon attachments matching the weapon type
|
||||||
std::vector<EntityWrapper> weaponAttachments = player.ChildrenWithComponent("WeaponAttachment");
|
std::vector<EntityWrapper> weaponAttachments = player.ChildrenWithComponent("WeaponAttachment");
|
||||||
EntityWrapper firstPersonAttachment;
|
EntityWrapper firstPersonAttachment;
|
||||||
@@ -152,14 +206,6 @@ private:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Purge other weapon entities
|
|
||||||
for (auto& attachment : weaponAttachments) {
|
|
||||||
//if (attachment == firstPersonAttachment || attachment == thirdPersonAttachment) {
|
|
||||||
// continue;
|
|
||||||
//}
|
|
||||||
attachment.DeleteChildren();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spawn the weapon(s)
|
// Spawn the weapon(s)
|
||||||
EntityWrapper firstPersonWeapon;
|
EntityWrapper firstPersonWeapon;
|
||||||
EntityWrapper thirdPersonWeapon;
|
EntityWrapper thirdPersonWeapon;
|
||||||
@@ -170,11 +216,36 @@ private:
|
|||||||
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
|
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ActiveWeapons[player].WeaponComponent = m_ComponentType;
|
WeaponInfo& wi = m_ActiveWeapons[player];
|
||||||
m_ActiveWeapons[player].Player = player;
|
wi.Player = player;
|
||||||
m_ActiveWeapons[player].WeaponEntity = player;
|
wi.WeaponEntity = player;
|
||||||
m_ActiveWeapons[player].FirstPersonEntity = firstPersonWeapon;
|
wi.FirstPersonEntity = firstPersonWeapon;
|
||||||
m_ActiveWeapons[player].ThirdPersonEntity = thirdPersonWeapon;
|
wi.ThirdPersonEntity = thirdPersonWeapon;
|
||||||
|
|
||||||
|
OnEquip(cWeapon, wi);
|
||||||
|
}
|
||||||
|
|
||||||
|
void holsterWeapon(ComponentWrapper cWeapon, EntityWrapper player)
|
||||||
|
{
|
||||||
|
auto activeWeapon = getActiveWeapon(player);
|
||||||
|
if (!activeWeapon) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
WeaponInfo& wi = *activeWeapon;
|
||||||
|
|
||||||
|
// Send holster event
|
||||||
|
OnHolster(cWeapon, wi);
|
||||||
|
|
||||||
|
// Delete weapon entities
|
||||||
|
if (wi.FirstPersonEntity.Valid()) {
|
||||||
|
m_World->DeleteEntity(wi.FirstPersonEntity.ID);
|
||||||
|
}
|
||||||
|
if (wi.ThirdPersonEntity.Valid()) {
|
||||||
|
m_World->DeleteEntity(wi.ThirdPersonEntity.ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make weapon inactive
|
||||||
|
m_ActiveWeapons.erase(player);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
[Gameplay]
|
||||||
|
AutoReload=true
|
||||||
|
|
||||||
[Debug]
|
[Debug]
|
||||||
LogLevel=1
|
LogLevel=1
|
||||||
LoadMap=
|
LoadMap=
|
||||||
|
|||||||
@@ -27,4 +27,5 @@ M=SwitchToClient
|
|||||||
P=SwitchToPlayer
|
P=SwitchToPlayer
|
||||||
K=TakeDamage,1500
|
K=TakeDamage,1500
|
||||||
F2=PerformanceTimingResetAllTimers
|
F2=PerformanceTimingResetAllTimers
|
||||||
F3=PerformanceTimingCreateExcelData
|
F3=PerformanceTimingCreateExcelData
|
||||||
|
F4=SwapToClassPick
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<xs:include schemaLocation="Components/Sprite.xsd"/>
|
<xs:include schemaLocation="Components/Sprite.xsd"/>
|
||||||
<xs:include schemaLocation="Components/Shielded.xsd"/>
|
<xs:include schemaLocation="Components/Shielded.xsd"/>
|
||||||
<xs:include schemaLocation="Components/CapturePointHUD.xsd"/>
|
<xs:include schemaLocation="Components/CapturePointHUD.xsd"/>
|
||||||
<xs:include schemaLocation="Components/AmmunitionHUD.xsd"/>
|
<xs:include schemaLocation="Components/TextFieldReader.xsd"/>
|
||||||
<xs:include schemaLocation="Components/Menu.xsd"/>
|
<xs:include schemaLocation="Components/Menu.xsd"/>
|
||||||
<xs:include schemaLocation="Components/KillFeed.xsd"/>
|
<xs:include schemaLocation="Components/KillFeed.xsd"/>
|
||||||
<xs:include schemaLocation="Components/BlendOverride.xsd"/>
|
<xs:include schemaLocation="Components/BlendOverride.xsd"/>
|
||||||
@@ -57,8 +57,10 @@
|
|||||||
<xs:include schemaLocation="Components/DoubleJump.xsd"/>
|
<xs:include schemaLocation="Components/DoubleJump.xsd"/>
|
||||||
<xs:include schemaLocation="Components/WeaponAttachment.xsd"/>
|
<xs:include schemaLocation="Components/WeaponAttachment.xsd"/>
|
||||||
<xs:include schemaLocation="Components/DefenderWeapon.xsd"/>
|
<xs:include schemaLocation="Components/DefenderWeapon.xsd"/>
|
||||||
|
<xs:include schemaLocation="Components/SidearmWeapon.xsd"/>
|
||||||
<xs:include schemaLocation="Components/CapturePointGameMode.xsd"/>
|
<xs:include schemaLocation="Components/CapturePointGameMode.xsd"/>
|
||||||
<xs:include schemaLocation="Components/CapturePointArrowHUD.xsd"/>
|
<xs:include schemaLocation="Components/CapturePointArrowHUD.xsd"/>
|
||||||
<xs:include schemaLocation="Components/FloatingEffect.xsd"/>
|
<xs:include schemaLocation="Components/FloatingEffect.xsd"/>
|
||||||
<xs:include schemaLocation="Components/BoostIconsHUD.xsd"/>
|
<xs:include schemaLocation="Components/BoostIconsHUD.xsd"/>
|
||||||
|
<xs:include schemaLocation="Components/InputCmdButton.xsd"/>
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
||||||
<AmmunitionHUD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AmmunitionHUD.xsd">
|
|
||||||
</AmmunitionHUD>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
|
||||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
|
||||||
<xs:include schemaLocation="../Types/TeamEnum.xsd"/>
|
|
||||||
<xs:element name="AmmunitionHUD">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Hud element for tracking ammunition from parent with AssaultWeapon component. Child with the name "MagazineAmmo" tracks clip ammunition. Child with the name "Ammo" tracks ammo.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:element>
|
|
||||||
</xs:schema>
|
|
||||||
@@ -1,12 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
<AssaultWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AssaultWeapon.xsd">
|
<AssaultWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AssaultWeapon.xsd">
|
||||||
|
<Slot><Primary/></Slot>
|
||||||
<MagazineAmmo>32</MagazineAmmo>
|
<MagazineAmmo>32</MagazineAmmo>
|
||||||
<MagazineSize>32</MagazineSize>
|
<MagazineSize>32</MagazineSize>
|
||||||
<Ammo>360</Ammo>
|
<Ammo>320</Ammo>
|
||||||
<MaxAmmo>360</MaxAmmo>
|
<MaxAmmo>320</MaxAmmo>
|
||||||
<BaseDamage>5</BaseDamage>
|
<BaseDamage>15</BaseDamage>
|
||||||
<RPM>120</RPM>
|
<SpreadAngle>0.174533</SpreadAngle> <!-- 0.174533 = 10 degrees -->
|
||||||
<ViewPunch>0.01</ViewPunch>
|
<MaxTravelAngle>0.10</MaxTravelAngle> <!-- 0.174533 = 10 degrees -->
|
||||||
|
<RPM>420</RPM>
|
||||||
|
<ViewPunch>0.03</ViewPunch>
|
||||||
|
<ViewReturnSpeed>0.18</ViewReturnSpeed>
|
||||||
<ReloadTime>2</ReloadTime>
|
<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>
|
</AssaultWeapon>
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
<xs:element name="AssaultWeapon">
|
<xs:element name="AssaultWeapon">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:all>
|
<xs:all>
|
||||||
|
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||||
<xs:element name="MagazineAmmo" type="t:int" 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:annotation><xs:documentation>Ammo currently loaded into the magazine</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
@@ -20,16 +21,32 @@
|
|||||||
<xs:annotation><xs:documentation>Maximum ammo able to be carried</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>Maximum ammo able to be carried</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="BaseDamage" type="t:double" minOccurs="0"/>
|
<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:element name="RPM" type="t:double" minOccurs="0">
|
||||||
<xs:annotation><xs:documentation>Rate of fire in rounds per minute</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>Rate of fire in rounds per minute</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="ViewPunch" type="t:float" minOccurs="0">
|
<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>
|
||||||
<xs:element name="ReloadTime" type="t:double" minOccurs="0">
|
<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>
|
||||||
<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:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
<DefenderWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DefenderWeapon.xsd">
|
<DefenderWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DefenderWeapon.xsd">
|
||||||
|
<Slot><Primary/></Slot>
|
||||||
<MagazineAmmo>8</MagazineAmmo>
|
<MagazineAmmo>8</MagazineAmmo>
|
||||||
<MagazineSize>8</MagazineSize>
|
<MagazineSize>8</MagazineSize>
|
||||||
<Ammo>64</Ammo>
|
<Ammo>64</Ammo>
|
||||||
<MaxAmmo>64</MaxAmmo>
|
<MaxAmmo>64</MaxAmmo>
|
||||||
<BaseDamage>90</BaseDamage>
|
<BaseDamage>90</BaseDamage>
|
||||||
<SpreadAngle>0.174533</SpreadAngle> <!-- 0.174533 = 10 degrees -->
|
<SpreadAngle>0.174533</SpreadAngle> <!-- 0.174533 = 10 degrees -->
|
||||||
|
<MaxTravelAngle>0.174533</MaxTravelAngle> <!-- 0.174533 = 10 degrees -->
|
||||||
<NumPellets>10</NumPellets>
|
<NumPellets>10</NumPellets>
|
||||||
<RPM>120</RPM>
|
<RPM>120</RPM>
|
||||||
<ViewPunch>0.01</ViewPunch>
|
<ViewPunch>0.03</ViewPunch>
|
||||||
|
<ViewReturnSpeed>0.2</ViewReturnSpeed>
|
||||||
<ReloadTime>0.5</ReloadTime>
|
<ReloadTime>0.5</ReloadTime>
|
||||||
<Slot><Primary/></Slot>
|
<TriggerHeld>false</TriggerHeld>
|
||||||
<IsFiring>false</IsFiring>
|
<FireCooldown>0</FireCooldown>
|
||||||
<TimeSinceLastFire>0</TimeSinceLastFire>
|
<IsReloading>false</IsReloading>
|
||||||
|
<ReloadTimer>0</ReloadTimer>
|
||||||
|
<CurrentTravel>0</CurrentTravel>
|
||||||
</DefenderWeapon>
|
</DefenderWeapon>
|
||||||
@@ -4,9 +4,22 @@
|
|||||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
<xs:include schemaLocation="../Types/WeaponSlotEnum.xsd"/>
|
<xs:include schemaLocation="../Types/WeaponSlotEnum.xsd"/>
|
||||||
|
|
||||||
|
<xs:complexType name="WeaponStateEnum" mixed="true">
|
||||||
|
<xs:complexContent>
|
||||||
|
<xs:extension base="t:enum">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Idle" type="t:int" fixed="0" minOccurs="0"/>
|
||||||
|
<xs:element name="Firing" type="t:int" fixed="1" minOccurs="0"/>
|
||||||
|
<xs:element name="Reloading" type="t:int" fixed="2" minOccurs="0"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:complexContent>
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:element name="DefenderWeapon">
|
<xs:element name="DefenderWeapon">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:all>
|
<xs:all>
|
||||||
|
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||||
<xs:element name="MagazineAmmo" type="t:int" 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:annotation><xs:documentation>Ammo currently loaded into the magazine</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
@@ -25,6 +38,9 @@
|
|||||||
<xs:element name="SpreadAngle" type="t:float" minOccurs="0">
|
<xs:element name="SpreadAngle" type="t:float" minOccurs="0">
|
||||||
<xs:annotation><xs:documentation>Spread angle in radians</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>Spread angle in radians</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</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="NumPellets" type="t:int" minOccurs="0"/>
|
<xs:element name="NumPellets" type="t:int" minOccurs="0"/>
|
||||||
<xs:element name="RPM" type="t:double" minOccurs="0">
|
<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:annotation><xs:documentation>Rate of fire in rounds per minute</xs:documentation></xs:annotation>
|
||||||
@@ -32,12 +48,17 @@
|
|||||||
<xs:element name="ViewPunch" type="t:float" minOccurs="0">
|
<xs:element name="ViewPunch" type="t:float" minOccurs="0">
|
||||||
<xs:annotation><xs:documentation>View punch in radians for each shell 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>
|
||||||
|
<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: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:annotation><xs:documentation>Time it takes to load ONE SHELL into the weapon in seconds</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
<xs:element name="TriggerHeld" type="t:bool" minOccurs="0"/>
|
||||||
<xs:element name="IsFiring" type="t:bool" minOccurs="0"/>
|
<xs:element name="FireCooldown" type="t:double" minOccurs="0"/>
|
||||||
<xs:element name="TimeSinceLastFire" 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:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<InputCmdButton xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="InputCmdButton.xsd">
|
||||||
|
<Command></Command>
|
||||||
|
<PressValue>0.0</PressValue>
|
||||||
|
</InputCmdButton>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||||
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
|
||||||
|
<xs:element name="InputCmdButton">
|
||||||
|
<xs:annotation><xs:documentation>Used with a Button component, the button will send an inputCommand event instead of ButtonPressed/Released event.</xs:documentation></xs:annotation>
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="Command" type="t:string" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>The command name for the inputCommand.</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="PressValue" type="t:float" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>The value in inputCommand.Value that will be sent on button press.</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
</xs:all>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?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>
|
||||||
|
<RPM>500</RPM>
|
||||||
|
<Automatic>false</Automatic>
|
||||||
|
<ViewPunch>0.01</ViewPunch>
|
||||||
|
<ReloadTime>0.5</ReloadTime>
|
||||||
|
<EquipTime>0.5</EquipTime>
|
||||||
|
<TriggerHeld>false</TriggerHeld>
|
||||||
|
<FireCooldown>0</FireCooldown>
|
||||||
|
<IsReloading>false</IsReloading>
|
||||||
|
<ReloadTimer>0</ReloadTimer>
|
||||||
|
</SidearmWeapon>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||||
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
<xs:include schemaLocation="../Types/WeaponSlotEnum.xsd"/>
|
||||||
|
|
||||||
|
<xs:complexType name="WeaponStateEnum" mixed="true">
|
||||||
|
<xs:complexContent>
|
||||||
|
<xs:extension base="t:enum">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Idle" type="t:int" fixed="0" minOccurs="0"/>
|
||||||
|
<xs:element name="Firing" type="t:int" fixed="1" minOccurs="0"/>
|
||||||
|
<xs:element name="Reloading" type="t:int" fixed="2" minOccurs="0"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:complexContent>
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<xs:element name="MagazineSize" type="t:int" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Max number of rounds in a magazine</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="BaseDamage" type="t:double" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Damage dealt if all shotgun pellets hit</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="Automatic" type="t:bool" minOccurs="0"/>
|
||||||
|
<xs:element name="ViewPunch" type="t:float" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>View punch in radians for each shell fired</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<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="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:all>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
<SprintAbility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SprintAbility.xsd">
|
<SprintAbility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SprintAbility.xsd">
|
||||||
<CoolDownMaxTimer>2.0</CoolDownMaxTimer>
|
<StrengthOfEffect>2.0</StrengthOfEffect>
|
||||||
</SprintAbility>
|
</SprintAbility>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:all>
|
<xs:all>
|
||||||
<xs:element name="CoolDownMaxTimer" type="t:double" minOccurs="0">
|
<xs:element name="StrengthOfEffect" type="t:double" minOccurs="0">
|
||||||
<xs:annotation><xs:documentation>This is the cooldown on sprint</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>This is the strength of the sprint effect</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:all>
|
</xs:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<TextFieldReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="TextFieldReader.xsd">
|
||||||
|
<ParentEntityName></ParentEntityName>
|
||||||
|
<ComponentType></ComponentType>
|
||||||
|
<Field></Field>
|
||||||
|
</TextFieldReader>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||||
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
|
||||||
|
<xs:element name="TextFieldReader">
|
||||||
|
<xs:annotation><xs:documentation>Reads a value from a specific field of a compoent of parent entity and writes it to the Text component on this entity.</xs:documentation></xs:annotation>
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="ParentEntityName" type="t:string" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>The name of the parent entity to read the component field from. Leave empty to read from this entity.</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="ComponentType" type="t:string" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>The component type to read the field value from.</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Field" type="t:string" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>The field name to read the value from.</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
</xs:all>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
@@ -1,17 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?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>
|
<Components>
|
||||||
<c:BoneAttachment>
|
|
||||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
|
||||||
</c:BoneAttachment>
|
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform>
|
<c:Transform/>
|
||||||
<Position X="0.12043038" Y="-0.244988307" Z="-0.181454808"/>
|
|
||||||
<Orientation X="0.010404544" Y="-0.00268173823" Z="0.0428441577"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
</Components>
|
||||||
|
|
||||||
<Children>
|
<Children>
|
||||||
@@ -21,7 +15,8 @@
|
|||||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||||
</c:Spawner>
|
</c:Spawner>
|
||||||
<c:Transform>
|
<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>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -37,9 +32,8 @@
|
|||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="AmmunitionHUD">
|
<Entity name="AmmunitionHUD">
|
||||||
<Components>
|
<Components>
|
||||||
<c:AmmunitionHUD/>
|
|
||||||
<c:Transform>
|
<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"/>
|
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
@@ -70,6 +64,11 @@
|
|||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
||||||
</c:Text>
|
</c:Text>
|
||||||
|
<c:TextFieldReader>
|
||||||
|
<ParentEntityName>Player</ParentEntityName>
|
||||||
|
<ComponentType>AssaultWeapon</ComponentType>
|
||||||
|
<Field>MagazineAmmo</Field>
|
||||||
|
</c:TextFieldReader>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
|
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
@@ -79,10 +78,15 @@
|
|||||||
<Entity name="Ammo">
|
<Entity name="Ammo">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
<Content>360</Content>
|
<Content>320</Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
||||||
</c:Text>
|
</c:Text>
|
||||||
|
<c:TextFieldReader>
|
||||||
|
<ParentEntityName>Player</ParentEntityName>
|
||||||
|
<ComponentType>AssaultWeapon</ComponentType>
|
||||||
|
<Field>Ammo</Field>
|
||||||
|
</c:TextFieldReader>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
|
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
|
||||||
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
|
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?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>
|
<Components>
|
||||||
<c:BoneAttachment>
|
|
||||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
|
||||||
</c:BoneAttachment>
|
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform>
|
<c:Transform/>
|
||||||
<Position X="0.163429111" Y="1.0235405" Z="-0.215489209"/>
|
|
||||||
<Orientation X="-0.0631071255" Y="-0.0576644838" Z="0.118255548"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
</Components>
|
||||||
|
|
||||||
<Children>
|
<Children>
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?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="DefenderWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
<Components>
|
<Components>
|
||||||
<c:BoneAttachment>
|
|
||||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
|
||||||
<PositionOffset X="0" Y="0.0480000004" Z="-0.183000013"/>
|
|
||||||
</c:BoneAttachment>
|
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource>
|
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0.120430306" Y="0.775375426" Z="1.36542225"/>
|
<Position X="0" Y="0.0350000001" Z="-0.295000017"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
|
|
||||||
@@ -37,7 +33,6 @@
|
|||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="AmmunitionHUD">
|
<Entity name="AmmunitionHUD">
|
||||||
<Components>
|
<Components>
|
||||||
<c:AmmunitionHUD/>
|
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="-0.0490000024" Y="0.0520000011" Z="-0.063000001"/>
|
<Position X="-0.0490000024" Y="0.0520000011" Z="-0.063000001"/>
|
||||||
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||||
@@ -65,8 +60,13 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="MagazineAmmo">
|
<Entity name="MagazineAmmo">
|
||||||
<Components>
|
<Components>
|
||||||
|
<c:TextFieldReader>
|
||||||
|
<ParentEntityName>Player</ParentEntityName>
|
||||||
|
<ComponentType>DefenderWeapon</ComponentType>
|
||||||
|
<Field>MagazineAmmo</Field>
|
||||||
|
</c:TextFieldReader>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
<Content>32</Content>
|
<Content>0</Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
||||||
</c:Text>
|
</c:Text>
|
||||||
@@ -78,8 +78,13 @@
|
|||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="Ammo">
|
<Entity name="Ammo">
|
||||||
<Components>
|
<Components>
|
||||||
|
<c:TextFieldReader>
|
||||||
|
<ParentEntityName>Player</ParentEntityName>
|
||||||
|
<ComponentType>DefenderWeapon</ComponentType>
|
||||||
|
<Field>Ammo</Field>
|
||||||
|
</c:TextFieldReader>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
<Content>360</Content>
|
<Content>0</Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
|
||||||
</c:Text>
|
</c:Text>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:SpawnPoint/>
|
<c:SpawnPoint/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
|
<Resource>Models/Characters/Assault/AssaultRed.mesh</Resource>
|
||||||
<Color A="1" B="0" G="0" R="1"/>
|
<Color A="1" B="0" G="0" R="1"/>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:SpawnPoint/>
|
<c:SpawnPoint/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
|
<Resource>Models/Characters/Assault/AssaultRed.mesh</Resource>
|
||||||
<Color A="1" B="0.0117647061" G="0" R="1"/>
|
<Color A="1" B="0.0117647061" G="0" R="1"/>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -94,11 +94,11 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:SpawnPoint/>
|
<c:SpawnPoint/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
|
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
|
||||||
<Color A="1" B="1" G="0.254901975" R="0"/>
|
<Color A="1" B="1" G="0.254901975" R="0"/>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0.800000012" Y="0" Z="0"/>
|
<Position X="-0.600000024" Y="0" Z="0"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -107,11 +107,11 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:SpawnPoint/>
|
<c:SpawnPoint/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
|
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
|
||||||
<Color A="1" B="1" G="0.254901975" R="0"/>
|
<Color A="1" B="1" G="0.254901975" R="0"/>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="-0.600000024" Y="0" Z="0"/>
|
<Position X="0.800000012" Y="0" Z="0"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,308 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Entity name="OverwatchCamera" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:RaptorCopter>
|
||||||
|
<Speed>0.049999997019767761</Speed>
|
||||||
|
<Axis X="0" Y="1" Z="0"/>
|
||||||
|
</c:RaptorCopter>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="-4" Z="0"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="CameraAnchor">
|
||||||
|
<Components>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="66" Y="59.2180023" Z="0"/>
|
||||||
|
<Orientation X="5.89000034" Y="1.57079637" Z="0"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<Entity name="SpectatorCamera">
|
||||||
|
<Components>
|
||||||
|
<c:Camera/>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<Entity name="SpectatorHUD">
|
||||||
|
<Components>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0" Z="-0.5"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<Percentage>0.10332605343919568</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>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="RespawnTimer">
|
||||||
|
<Components>
|
||||||
|
<c:Text>
|
||||||
|
<Content>16</Content>
|
||||||
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
|
<Color A="1" B="0" G="1" R="0.784313738"/>
|
||||||
|
</c:Text>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0.178199276" Z="0"/>
|
||||||
|
<Scale X="0.0250000004" Y="0.0250000004" Z="1"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="PickClassCamera">
|
||||||
|
<Components>
|
||||||
|
<c:Camera/>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<Entity name="PickClassHUD">
|
||||||
|
<Components>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0" Z="-0.5"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<Entity name="DefenderClassPick">
|
||||||
|
<Components>
|
||||||
|
<c:Button/>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
</c:Sprite>
|
||||||
|
<c:InputCmdButton>
|
||||||
|
<Command>PickClass</Command>
|
||||||
|
<PressValue>2</PressValue>
|
||||||
|
</c:InputCmdButton>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.349999994" Y="0.0500000007" Z="0"/>
|
||||||
|
<Scale X="0.0799999982" Y="0.0799999982" Z="1"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="AssaultClassPick">
|
||||||
|
<Components>
|
||||||
|
<c:Button/>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Core/UnitRaptor.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
</c:Sprite>
|
||||||
|
<c:InputCmdButton>
|
||||||
|
<Command>PickClass</Command>
|
||||||
|
<PressValue>1</PressValue>
|
||||||
|
</c:InputCmdButton>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.349999994" Y="0.149504215" Z="0"/>
|
||||||
|
<Scale X="0.0799999982" Y="0.0799999982" Z="1"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="SniperClassPick">
|
||||||
|
<Components>
|
||||||
|
<c:Button/>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Test/aM4ME4GR.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
</c:Sprite>
|
||||||
|
<c:InputCmdButton>
|
||||||
|
<Command>PickClass</Command>
|
||||||
|
<PressValue>3</PressValue>
|
||||||
|
</c:InputCmdButton>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.349999994" Y="-0.0500000007" Z="0"/>
|
||||||
|
<Scale X="0.0799999982" Y="0.0799999982" Z="1"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
@@ -12,9 +12,7 @@
|
|||||||
</Slot>
|
</Slot>
|
||||||
</c:AssaultWeapon>
|
</c:AssaultWeapon>
|
||||||
<c:Collidable/>
|
<c:Collidable/>
|
||||||
<c:DefenderWeapon>
|
<c:DashAbility/>
|
||||||
<TimeSinceLastFire>52.867678870419283</TimeSinceLastFire>
|
|
||||||
</c:DefenderWeapon>
|
|
||||||
<c:DoubleJump/>
|
<c:DoubleJump/>
|
||||||
<c:Health/>
|
<c:Health/>
|
||||||
<c:Physics>
|
<c:Physics>
|
||||||
@@ -30,7 +28,7 @@
|
|||||||
</Team>
|
</Team>
|
||||||
</c:Team>
|
</c:Team>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="-1.42731023" Y="0.0288832653" Z="3.63052702"/>
|
<Position X="0" Y="0.0288832188" Z="2.64144421"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
|
|
||||||
@@ -70,8 +68,8 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
|
||||||
<DepthSort>false</DepthSort>
|
|
||||||
<GlowMap></GlowMap>
|
<GlowMap></GlowMap>
|
||||||
|
<DepthSort>false</DepthSort>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.200000003"/>
|
<Position X="0" Y="0" Z="0.200000003"/>
|
||||||
@@ -94,42 +92,22 @@
|
|||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children>
|
||||||
<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"/>
|
|
||||||
<Scale X="0.0350000001" Y="0.0350000001" Z="0.0350000001"/>
|
|
||||||
<Orientation X="0" Y="0.410000026" Z="0"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
<Entity name="HealthBar">
|
<Entity name="HealthBar">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Fill>
|
<c:Fill>
|
||||||
<Percentage>1</Percentage>
|
<Percentage>1</Percentage>
|
||||||
<Color A="0.301960796" B="1" G="0" R="0"/>
|
<Color A="0.301960796" B="1" G="0" R="0"/>
|
||||||
</c:Fill>
|
</c:Fill>
|
||||||
|
<c:HealthHUD/>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
|
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
|
||||||
<GlowMap></GlowMap>
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.588235319" B="0" G="0" R="0"/>
|
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:HealthHUD/>
|
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="-0.263000011" Y="-0.185000002" Z="0"/>
|
<Position X="-0.263000011" Y="-0.185000002" Z="0"/>
|
||||||
<Scale X="0.106000006" Y="0.333000004" Z="0.150000006"/>
|
|
||||||
<Orientation X="5.87300014" Y="0" Z="4.71200037"/>
|
<Orientation X="5.87300014" Y="0" Z="4.71200037"/>
|
||||||
|
<Scale X="0.106000006" Y="0.333000004" Z="0.150000006"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children>
|
||||||
@@ -146,8 +124,8 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||||
<DepthSort>false</DepthSort>
|
|
||||||
<GlowMap></GlowMap>
|
<GlowMap></GlowMap>
|
||||||
|
<DepthSort>false</DepthSort>
|
||||||
<Color A="0.588235319" B="0.0392156877" G="0.184313729" R="0"/>
|
<Color A="0.588235319" B="0.0392156877" G="0.184313729" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -164,8 +142,8 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||||
<DepthSort>false</DepthSort>
|
|
||||||
<GlowMap></GlowMap>
|
<GlowMap></GlowMap>
|
||||||
|
<DepthSort>false</DepthSort>
|
||||||
<Color A="0.588235319" B="0.34117648" G="0.192156866" R="0"/>
|
<Color A="0.588235319" B="0.34117648" G="0.192156866" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -182,8 +160,8 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||||
<DepthSort>false</DepthSort>
|
|
||||||
<GlowMap></GlowMap>
|
<GlowMap></GlowMap>
|
||||||
|
<DepthSort>false</DepthSort>
|
||||||
<Color A="0.588235319" B="0.121568628" G="0" R="0.443137258"/>
|
<Color A="0.588235319" B="0.121568628" G="0" R="0.443137258"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -197,6 +175,26 @@
|
|||||||
</Entity>
|
</Entity>
|
||||||
</Children>
|
</Children>
|
||||||
</Entity>
|
</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>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="CapturePointHUD">
|
<Entity name="CapturePointHUD">
|
||||||
@@ -233,8 +231,8 @@
|
|||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||||
|
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -267,8 +265,8 @@
|
|||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||||
|
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -302,8 +300,8 @@
|
|||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||||
|
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -336,8 +334,8 @@
|
|||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
<Orientation X="0" Y="0" Z="1.57079637"/>
|
||||||
|
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -369,8 +367,8 @@
|
|||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="4.71238899"/>
|
<Orientation X="0" Y="0" Z="4.71238899"/>
|
||||||
|
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -446,8 +444,8 @@
|
|||||||
</c:Team>
|
</c:Team>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0.714000046" Z="-1.30000007"/>
|
<Position X="0" Y="0.714000046" Z="-1.30000007"/>
|
||||||
<Scale X="0.200000003" Y="0.200000003" Z="0.200000003"/>
|
|
||||||
<Orientation X="0.405680239" Y="0.369605929" Z="0"/>
|
<Orientation X="0.405680239" Y="0.369605929" Z="0"/>
|
||||||
|
<Scale X="0.200000003" Y="0.200000003" Z="0.200000003"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -458,13 +456,13 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
<Time1>1.9408570429715581</Time1>
|
<Time1>1.8348644854054612</Time1>
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
<AnimationName2></AnimationName2>
|
<AnimationName2></AnimationName2>
|
||||||
<AnimationName3></AnimationName3>
|
<AnimationName3></AnimationName3>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
|
<Resource>Models/Characters/Assault/Test/FirstPerson.mesh</Resource>
|
||||||
<Color A="1" B="1" G="0.309803933" R="0"/>
|
<Color A="1" B="1" G="0.309803933" R="0"/>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
@@ -472,25 +470,37 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="PrimaryAttachment">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:WeaponAttachment>
|
<c:BoneAttachment>
|
||||||
<Weapon>DefenderWeapon</Weapon>
|
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||||
</c:WeaponAttachment>
|
</c:BoneAttachment>
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/DefenderWeaponView.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
<Entity name="SecondaryAttachment">
|
|
||||||
<Components>
|
|
||||||
<c:WeaponAttachment>
|
<c:WeaponAttachment>
|
||||||
<Weapon>AssaultWeapon</Weapon>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
</c:WeaponAttachment>
|
</c:WeaponAttachment>
|
||||||
<c:Spawner>
|
<c:Spawner>
|
||||||
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
||||||
</c:Spawner>
|
</c:Spawner>
|
||||||
<c:Transform/>
|
<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>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
@@ -518,8 +528,7 @@
|
|||||||
<Entity name="PlayerModel">
|
<Entity name="PlayerModel">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>IdleF</AnimationName1>
|
||||||
<Time1>1.5631122524686134</Time1>
|
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
<AnimationName2></AnimationName2>
|
<AnimationName2></AnimationName2>
|
||||||
<AnimationName3></AnimationName3>
|
<AnimationName3></AnimationName3>
|
||||||
@@ -531,28 +540,13 @@
|
|||||||
<c:Shielded/>
|
<c:Shielded/>
|
||||||
<c:HiddenForLocalPlayer/>
|
<c:HiddenForLocalPlayer/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
|
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
|
||||||
<Color A="1" B="1" G="0.309803933" R="0"/>
|
<Color A="1" B="1" G="0.952941179" R="1"/>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children>
|
||||||
<Entity name="PrimaryAttachment">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
|
||||||
<c:WeaponAttachment>
|
|
||||||
<Weapon>DefenderWeapon</Weapon>
|
|
||||||
<Person>
|
|
||||||
<ThirdPerson/>
|
|
||||||
</Person>
|
|
||||||
</c:WeaponAttachment>
|
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/DefenderWeaponWorld.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
<Entity name="SecondaryAttachment">
|
|
||||||
<Components>
|
<Components>
|
||||||
<c:WeaponAttachment>
|
<c:WeaponAttachment>
|
||||||
<Weapon>AssaultWeapon</Weapon>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
@@ -567,6 +561,27 @@
|
|||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</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>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="AABBStanding">
|
<Entity name="AABBStanding">
|
||||||
@@ -605,8 +620,8 @@
|
|||||||
</c:Text>
|
</c:Text>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0.100000001" Y="1.50176644" Z="-0.248000011"/>
|
<Position X="0.100000001" Y="1.50176644" Z="-0.248000011"/>
|
||||||
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
|
|
||||||
<Orientation X="0" Y="3.14199996" Z="0"/>
|
<Orientation X="0" Y="3.14199996" Z="0"/>
|
||||||
|
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
@@ -615,8 +630,8 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Icons/Arrow.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Icons/Arrow.png</DiffuseTexture>
|
||||||
<DepthSort>false</DepthSort>
|
|
||||||
<GlowMap></GlowMap>
|
<GlowMap></GlowMap>
|
||||||
|
<DepthSort>false</DepthSort>
|
||||||
<Color A="1" B="1" G="0.309803933" R="0"/>
|
<Color A="1" B="1" G="0.309803933" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:HiddenForLocalPlayer/>
|
<c:HiddenForLocalPlayer/>
|
||||||
|
|||||||
@@ -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,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" ?>
|
<?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>
|
<Components>
|
||||||
<c:Lifetime>
|
<c:Lifetime>
|
||||||
<Lifetime>0.25</Lifetime>
|
<Lifetime>0.10000000149011612</Lifetime>
|
||||||
</c: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>
|
<c:Transform>
|
||||||
<Scale X="0.0690000057" Y="0.0690000057" Z="100"/>
|
<Scale X="0" Y="1" Z="1"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</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>
|
</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>
|
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Entity name="SidearmWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/SecondaryWeapon.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="-0.00200000009" Y="0.0600000024" Z="-0.297000021"/>
|
||||||
|
</c:Transform>
|
||||||
|
</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>
|
||||||
|
<ParentEntityName></ParentEntityName>
|
||||||
|
<ComponentType></ComponentType>
|
||||||
|
<Field></Field>
|
||||||
|
</c:TextFieldReader>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="-0.0300000012" Y="0.077000007" Z="-0.063000001"/>
|
||||||
|
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<Entity name="AmmunitionHUDBackground">
|
||||||
|
<Components>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||||
|
</c:Sprite>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0" Z="-0.00300000003"/>
|
||||||
|
<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: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:Transform>
|
||||||
|
<Position X="0" Y="-0.00600000005" Z="0"/>
|
||||||
|
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="Infinity!">
|
||||||
|
<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:Transform>
|
||||||
|
<Position X="0.0150000006" Y="-0.029000001" Z="0"/>
|
||||||
|
<Orientation X="0" Y="0" Z="1.5710001"/>
|
||||||
|
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Entity name="SidearmWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/SecondaryWeapon.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="-0.0160000008" Y="0.0800000057" Z="-0.275000006"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="WeaponMuzzle">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.0123999491" Y="0.102453232" Z="-0.273824364"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
@@ -1,219 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
||||||
<Entity name="SpectatorCamera" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
|
||||||
|
|
||||||
<Components>
|
|
||||||
<c:Camera/>
|
|
||||||
<c:Transform>
|
|
||||||
<Position X="0" Y="0" Z="0"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
|
||||||
|
|
||||||
<Children>
|
|
||||||
<Entity name="SpectatorHUD">
|
|
||||||
<Components>
|
|
||||||
<c:Transform>
|
|
||||||
<Position X="0" Y="0" Z="-0.5"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
|
||||||
<Children>
|
|
||||||
<Entity name="RespawnTimer">
|
|
||||||
<Components>
|
|
||||||
<c:Text>
|
|
||||||
<Content>Time to respawn: 0</Content>
|
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
|
||||||
<Color A="1" B="0" G="1" R="0.784313738"/>
|
|
||||||
<Alignment>
|
|
||||||
<Left/>
|
|
||||||
</Alignment>
|
|
||||||
</c:Text>
|
|
||||||
<c:Transform>
|
|
||||||
<Position X="-0.115000000" Y="0.15304254" Z="0"/>
|
|
||||||
<Scale X="0.0250000004" Y="0.0250000004" Z="1"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
|
||||||
<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"/>
|
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
|
||||||
</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"/>
|
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
|
||||||
</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>
|
|
||||||
<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"/>
|
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
|
||||||
</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>
|
|
||||||
<Percentage>0.59265931447347009</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"/>
|
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="4.71238899"/>
|
|
||||||
</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>
|
|
||||||
<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"/>
|
|
||||||
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
|
|
||||||
<Orientation X="0" Y="0" Z="1.57079637"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
|
|
||||||
</Entity>
|
|
||||||
@@ -44,9 +44,9 @@
|
|||||||
<xs:element ref="c:Shielded" minOccurs="0"/>
|
<xs:element ref="c:Shielded" minOccurs="0"/>
|
||||||
<xs:element ref="c:CapturePointHUD" minOccurs="0"/>
|
<xs:element ref="c:CapturePointHUD" minOccurs="0"/>
|
||||||
<xs:element ref="c:BlendOverride" minOccurs="0"/>
|
<xs:element ref="c:BlendOverride" minOccurs="0"/>
|
||||||
|
<xs:element ref="c:TextFieldReader" minOccurs="0"/>
|
||||||
<xs:element ref="c:Blend" minOccurs="0"/>
|
<xs:element ref="c:Blend" minOccurs="0"/>
|
||||||
<xs:element ref="c:BlendAdditive" minOccurs="0"/>
|
<xs:element ref="c:BlendAdditive" minOccurs="0"/>
|
||||||
<xs:element ref="c:AmmunitionHUD" minOccurs="0"/>
|
|
||||||
<xs:element ref="c:KillFeed" minOccurs="0"/>
|
<xs:element ref="c:KillFeed" minOccurs="0"/>
|
||||||
<xs:element ref="c:Sprite" minOccurs="0"/>
|
<xs:element ref="c:Sprite" minOccurs="0"/>
|
||||||
<xs:element ref="c:Menu" minOccurs="0"/>
|
<xs:element ref="c:Menu" minOccurs="0"/>
|
||||||
@@ -55,6 +55,7 @@
|
|||||||
<xs:element ref="c:WeaponAttachment" minOccurs="0"/>
|
<xs:element ref="c:WeaponAttachment" minOccurs="0"/>
|
||||||
<xs:element ref="c:AbilityCooldownHUD" minOccurs="0"/>
|
<xs:element ref="c:AbilityCooldownHUD" minOccurs="0"/>
|
||||||
<xs:element ref="c:DefenderWeapon" minOccurs="0"/>
|
<xs:element ref="c:DefenderWeapon" minOccurs="0"/>
|
||||||
|
<xs:element ref="c:SidearmWeapon" minOccurs="0"/>
|
||||||
<xs:element ref="c:CapturePointArrowHUD" minOccurs="0"/>
|
<xs:element ref="c:CapturePointArrowHUD" minOccurs="0"/>
|
||||||
<xs:element ref="c:BoostIconsHUD" minOccurs="0"/>
|
<xs:element ref="c:BoostIconsHUD" minOccurs="0"/>
|
||||||
<xs:element ref="c:FloatingEffect" minOccurs="0"/>
|
<xs:element ref="c:FloatingEffect" minOccurs="0"/>
|
||||||
@@ -64,6 +65,7 @@
|
|||||||
<xs:element ref="c:DoubleJump" minOccurs="0"/>
|
<xs:element ref="c:DoubleJump" minOccurs="0"/>
|
||||||
<xs:element ref="c:HealthHUD" minOccurs="0"/>
|
<xs:element ref="c:HealthHUD" minOccurs="0"/>
|
||||||
<xs:element ref="c:SpriteIndicator" minOccurs="0"/>
|
<xs:element ref="c:SpriteIndicator" minOccurs="0"/>
|
||||||
|
<xs:element ref="c:InputCmdButton" minOccurs="0"/>
|
||||||
</xs:all>
|
</xs:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|||||||
@@ -17,105 +17,107 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
|
|||||||
EntityAABB& boxA = *boundingBox;
|
EntityAABB& boxA = *boundingBox;
|
||||||
bool everHitTheGround = false;
|
bool everHitTheGround = false;
|
||||||
|
|
||||||
auto prevPosIt = m_PrevPositions.find(entity);
|
if (entity == LocalPlayer) {
|
||||||
if (prevPosIt != m_PrevPositions.end()) {
|
auto prevPosIt = m_PrevPositions.find(entity);
|
||||||
glm::vec3 size = boxA.Size();
|
if (prevPosIt != m_PrevPositions.end()) {
|
||||||
float diameter = std::min(size.x, size.z);
|
glm::vec3 size = boxA.Size();
|
||||||
glm::vec3 prevOrigin = prevPosIt->second;
|
float diameter = std::min(size.x, size.z);
|
||||||
glm::vec3 toCurrentPos = boxA.Origin() - prevOrigin;
|
glm::vec3 prevOrigin = prevPosIt->second;
|
||||||
float rayLength = glm::length(toCurrentPos) + 0.5f*diameter;
|
glm::vec3 toCurrentPos = boxA.Origin() - prevOrigin;
|
||||||
//If the entity has moved farther than the size of its box, we need to handle it specially.
|
float rayLength = glm::length(toCurrentPos) + 0.5f*diameter;
|
||||||
if (rayLength > diameter) {
|
//If the entity has moved farther than the size of its box, we need to handle it specially.
|
||||||
Ray ray(prevOrigin, toCurrentPos);
|
if (rayLength > diameter) {
|
||||||
m_OctreeResult.clear();
|
Ray ray(prevOrigin, toCurrentPos);
|
||||||
m_Octree->ObjectsPossiblyHitByRay(ray, m_OctreeResult);
|
m_OctreeResult.clear();
|
||||||
for (auto& boxB : m_OctreeResult) {
|
m_Octree->ObjectsPossiblyHitByRay(ray, m_OctreeResult);
|
||||||
if (boxA.Entity == boxB.Entity) {
|
for (auto& boxB : m_OctreeResult) {
|
||||||
continue;
|
if (boxA.Entity == boxB.Entity) {
|
||||||
}
|
|
||||||
bool hit;
|
|
||||||
float dist;
|
|
||||||
if (boxB.Entity.HasComponent("Model")) {
|
|
||||||
RawModel* model;
|
|
||||||
std::string res = (std::string)boxB.Entity["Model"]["Resource"];
|
|
||||||
try {
|
|
||||||
model = ResourceManager::Load<RawModel, true>(res);
|
|
||||||
} catch (const std::exception&) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
float u, v;
|
bool hit;
|
||||||
hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, Transform::ModelMatrix(boxB.Entity), dist, u, v);
|
float dist;
|
||||||
} else {
|
if (boxB.Entity.HasComponent("Model")) {
|
||||||
hit = Collision::RayVsAABB(ray, boxB, dist);
|
RawModel* model;
|
||||||
}
|
std::string res = (std::string)boxB.Entity["Model"]["Resource"];
|
||||||
if (hit && dist < rayLength) {
|
try {
|
||||||
//Set the entity to where it was colliding, minus the maximum box size.
|
model = ResourceManager::Load<RawModel, true>(res);
|
||||||
//TODO: Perhaps this should be done slightly more properly.
|
} catch (const std::exception&) {
|
||||||
glm::vec3 newOriginPos = ray.Origin() + (dist - 0.707107f*diameter) * ray.Direction();
|
continue;
|
||||||
glm::vec3 resolve = newOriginPos - boxA.Origin();
|
}
|
||||||
(glm::vec3&)cTransform["Position"] += resolve;
|
float u, v;
|
||||||
boxA = *Collision::EntityAbsoluteAABB(entity);
|
hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, Transform::ModelMatrix(boxB.Entity), dist, u, v);
|
||||||
if (resolve.y > 0) {
|
} else {
|
||||||
everHitTheGround = true;
|
hit = Collision::RayVsAABB(ray, boxB, dist);
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
}
|
||||||
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
if (hit && dist < rayLength) {
|
||||||
|
//Set the entity to where it was colliding, minus the maximum box size.
|
||||||
|
//TODO: Perhaps this should be done slightly more properly.
|
||||||
|
glm::vec3 newOriginPos = ray.Origin() + (dist - 0.707107f*diameter) * ray.Direction();
|
||||||
|
glm::vec3 resolve = newOriginPos - boxA.Origin();
|
||||||
|
(glm::vec3&)cTransform["Position"] += resolve;
|
||||||
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
|
if (resolve.y > 0) {
|
||||||
|
everHitTheGround = true;
|
||||||
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
|
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Collide against octree items
|
// Collide against octree items
|
||||||
m_OctreeResult.clear();
|
m_OctreeResult.clear();
|
||||||
m_Octree->ObjectsInSameRegion(*boundingBox, m_OctreeResult);
|
m_Octree->ObjectsInSameRegion(*boundingBox, m_OctreeResult);
|
||||||
for (auto& boxB : m_OctreeResult) {
|
for (auto& boxB : m_OctreeResult) {
|
||||||
glm::vec3 resolutionVector;
|
glm::vec3 resolutionVector;
|
||||||
if (boxA.Entity == boxB.Entity) {
|
if (boxA.Entity == boxB.Entity) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (boxB.Entity.HasComponent("Model") && Collision::AABBVsAABB(boxA, boxB)) {
|
|
||||||
//Here we know boxB is a entity with Collideable, AABB, and Model.
|
|
||||||
RawModel* model;
|
|
||||||
try {
|
|
||||||
model = ResourceManager::Load<RawModel, true>(boxB.Entity["Model"]["Resource"]);
|
|
||||||
} catch (const std::exception&) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::mat4 modelMatrix = Transform::ModelMatrix(boxB.Entity);
|
if (boxB.Entity.HasComponent("Model") && Collision::AABBVsAABB(boxA, boxB)) {
|
||||||
|
//Here we know boxB is a entity with Collideable, AABB, and Model.
|
||||||
|
RawModel* model;
|
||||||
|
try {
|
||||||
|
model = ResourceManager::Load<RawModel, true>(boxB.Entity["Model"]["Resource"]);
|
||||||
|
} catch (const std::exception&) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
glm::vec3 inOutVelocity = (glm::vec3)cPhysics["Velocity"];
|
glm::mat4 modelMatrix = Transform::ModelMatrix(boxB.Entity);
|
||||||
bool notMovingxz = glm::all(glm::lessThan(glm::abs(glm::vec2(inOutVelocity.x, inOutVelocity.z)), glm::vec2(0.01f))) && prevPosIt != m_PrevPositions.end();
|
|
||||||
bool isOnGround = (bool)cPhysics["IsOnGround"];
|
glm::vec3 inOutVelocity = (glm::vec3)cPhysics["Velocity"];
|
||||||
float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"];
|
bool notMovingxz = glm::all(glm::lessThan(glm::abs(glm::vec2(inOutVelocity.x, inOutVelocity.z)), glm::vec2(0.01f))) && prevPosIt != m_PrevPositions.end();
|
||||||
if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) {
|
bool isOnGround = (bool)cPhysics["IsOnGround"];
|
||||||
//Move the position to previous position if it is not moving in the xz-plane, else resolve with the resolution vector.
|
float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"];
|
||||||
(glm::vec3&)cTransform["Position"] += notMovingxz ? prevPosIt->second - boxA.Origin() : resolutionVector;
|
if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) {
|
||||||
|
//Move the position to previous position if it is not moving in the xz-plane, else resolve with the resolution vector.
|
||||||
|
(glm::vec3&)cTransform["Position"] += notMovingxz ? prevPosIt->second - boxA.Origin() : resolutionVector;
|
||||||
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
|
cPhysics["Velocity"] = inOutVelocity;
|
||||||
|
if (isOnGround) {
|
||||||
|
everHitTheGround = true;
|
||||||
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (Collision::AABBVsAABB(boxA, boxB, resolutionVector)) {
|
||||||
|
//Enter here if boxB has no Model.
|
||||||
|
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
||||||
boxA = *Collision::EntityAbsoluteAABB(entity);
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
cPhysics["Velocity"] = inOutVelocity;
|
if (resolutionVector.y > 0) {
|
||||||
if (isOnGround) {
|
|
||||||
everHitTheGround = true;
|
everHitTheGround = true;
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
|
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (Collision::AABBVsAABB(boxA, boxB, resolutionVector)) {
|
|
||||||
//Enter here if boxB has no Model.
|
|
||||||
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
|
||||||
boxA = *Collision::EntityAbsoluteAABB(entity);
|
|
||||||
if (resolutionVector.y > 0) {
|
|
||||||
everHitTheGround = true;
|
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
|
||||||
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//This should apply air friction and such, iff zero models were hit.
|
//This should apply air friction and such, iff zero models were hit.
|
||||||
if (!everHitTheGround) {
|
if (!everHitTheGround) {
|
||||||
(bool)cPhysics["IsOnGround"] = false;
|
(bool)cPhysics["IsOnGround"] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_PrevPositions[entity] = boxA.Origin();
|
m_PrevPositions[entity] = boxA.Origin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,18 @@ EntityWrapper EntityWrapper::Parent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EntityWrapper EntityWrapper::FirstParentByName(const std::string& parentEntityName)
|
||||||
|
{
|
||||||
|
EntityWrapper entity = *this;
|
||||||
|
while (entity.Parent().Valid()) {
|
||||||
|
entity = entity.Parent();
|
||||||
|
if (entity.Name() == parentEntityName) {
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return EntityWrapper::Invalid;
|
||||||
|
}
|
||||||
|
|
||||||
EntityWrapper EntityWrapper::FirstChildByName(const std::string& name)
|
EntityWrapper EntityWrapper::FirstChildByName(const std::string& name)
|
||||||
{
|
{
|
||||||
return firstChildByNameRecursive(name, this->ID);
|
return firstChildByNameRecursive(name, this->ID);
|
||||||
|
|||||||
@@ -338,6 +338,15 @@ bool EditorGUI::drawComponentNode(EntityWrapper entity, const ComponentInfo& ci)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ci.Name == "Spawner") {
|
||||||
|
if (ImGui::Button("Activate")) {
|
||||||
|
Events::SpawnerSpawn e;
|
||||||
|
e.Spawner = entity;
|
||||||
|
e.Parent = entity;
|
||||||
|
m_EventBroker->Publish(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,14 +390,52 @@ bool EditorGUI::drawComponentField_Vector(ComponentWrapper &c, const ComponentIn
|
|||||||
// Limit scale values to a minimum of 0
|
// Limit scale values to a minimum of 0
|
||||||
return ImGui::DragFloat3("", glm::value_ptr(val), 0.1f, 0.f, std::numeric_limits<float>::max());
|
return ImGui::DragFloat3("", glm::value_ptr(val), 0.1f, 0.f, std::numeric_limits<float>::max());
|
||||||
} else if (field.Name == "Orientation") {
|
} else if (field.Name == "Orientation") {
|
||||||
// Make orentations have a period of 2*Pi
|
//glm::vec3 tempVal = val;
|
||||||
glm::vec3 tempVal = glm::fmod(val, glm::vec3(glm::two_pi<float>()));
|
glm::vec3 originalVal = val;
|
||||||
if (ImGui::SliderFloat3("", glm::value_ptr(tempVal), 0.f, glm::two_pi<float>())) {
|
|
||||||
val = tempVal;
|
ImVec2 cursorPos = ImGui::GetCursorScreenPos();
|
||||||
return true;
|
glm::tvec3<bool> isSnapping(false, false, false);
|
||||||
} else {
|
bool changed = ImGui::DragFloat3("", glm::value_ptr(val), 0.066666f);
|
||||||
return false;
|
if (changed) {
|
||||||
|
// Make orentations have a period of 2*Pi
|
||||||
|
val = glm::fmod(val, glm::vec3(glm::two_pi<float>()));
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
if (val[i] < 0) {
|
||||||
|
val[i] += glm::two_pi<float>();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Snap to angle
|
||||||
|
//float snapRange = glm::pi<float>() / 15.f;
|
||||||
|
//float snapAngle = glm::quarter_pi<float>();
|
||||||
|
//glm::vec3 snap = glm::fmod(val, glm::vec3(snapAngle));
|
||||||
|
//for (int i = 0; i < 3; i++) {
|
||||||
|
// isSnapping[i] = glm::abs(snap[i] - (snapRange / 2.f)) < snapRange;
|
||||||
|
//}
|
||||||
|
//if (changed && ImGui::IsMouseDown(0)) {
|
||||||
|
// glm::vec3 change = val - originalVal;
|
||||||
|
// for (int i = 0; i < 3; i++) {
|
||||||
|
// if (isSnapping[i] && glm::abs(change[i]) < snapRange) {
|
||||||
|
// val[i] -= snap[i] - snapRange;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
// Draw snapping outline
|
||||||
|
float width = ImGui::CalcItemWidth() / 3.f;;
|
||||||
|
float spacing = GImGui->Style.ItemInnerSpacing.x;
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
if (isSnapping[i]) {
|
||||||
|
ImVec2 pos = cursorPos + ImVec2(i * (width + spacing), 0.f);
|
||||||
|
ImRect bb(pos - ImVec2(1, 1), pos + ImVec2(width, 17));
|
||||||
|
auto window = ImGui::GetCurrentWindow();
|
||||||
|
const ImU32 col = window->Color(ImGuiCol_HeaderActive);
|
||||||
|
window->DrawList->AddRect(bb.Min, bb.Max, col, 3.f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed;
|
||||||
} else {
|
} else {
|
||||||
return ImGui::DragFloat3("", glm::value_ptr(val), 0.1f, std::numeric_limits<float>::lowest(), std::numeric_limits<float>::max());
|
return ImGui::DragFloat3("", glm::value_ptr(val), 0.1f, std::numeric_limits<float>::lowest(), std::numeric_limits<float>::max());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "GUI/ButtonSystem.h"
|
#include "GUI/ButtonSystem.h"
|
||||||
|
#include "Input/EInputCommand.h"
|
||||||
|
|
||||||
ButtonSystem::ButtonSystem(SystemParams params, IRenderer* renderer)
|
ButtonSystem::ButtonSystem(SystemParams params, IRenderer* renderer)
|
||||||
: System(params)
|
: System(params)
|
||||||
@@ -37,10 +38,20 @@ bool ButtonSystem::OnMousePress(const Events::MousePress& e)
|
|||||||
m_PickEntity = EntityWrapper(m_World, m_PickData.Entity);
|
m_PickEntity = EntityWrapper(m_World, m_PickData.Entity);
|
||||||
|
|
||||||
//You have clicked on a button entity, send pressed event.
|
//You have clicked on a button entity, send pressed event.
|
||||||
Events::ButtonPressed ePressed;
|
if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) {
|
||||||
ePressed.Entity = m_PickEntity;
|
Events::InputCommand eInputCmd;
|
||||||
ePressed.EntityName = m_PickEntity.Name();
|
eInputCmd.PlayerID = LocalPlayer.ID;
|
||||||
m_EventBroker->Publish(ePressed);
|
eInputCmd.Player = LocalPlayer;
|
||||||
|
EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity);
|
||||||
|
eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"];
|
||||||
|
eInputCmd.Value = (float)button["InputCmdButton"]["PressValue"];
|
||||||
|
m_EventBroker->Publish(eInputCmd);
|
||||||
|
} else {
|
||||||
|
Events::ButtonPressed ePressed;
|
||||||
|
ePressed.Entity = m_PickEntity;
|
||||||
|
ePressed.EntityName = m_PickEntity.Name();
|
||||||
|
m_EventBroker->Publish(ePressed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,10 +66,20 @@ bool ButtonSystem::OnMouseRelease(const Events::MouseRelease& e)
|
|||||||
if(m_PickData.Entity != EntityID_Invalid && m_PickData.World == m_World) {
|
if(m_PickData.Entity != EntityID_Invalid && m_PickData.World == m_World) {
|
||||||
EntityWrapper ent = EntityWrapper(m_World, m_PickData.Entity);
|
EntityWrapper ent = EntityWrapper(m_World, m_PickData.Entity);
|
||||||
|
|
||||||
Events::ButtonReleased eReleased;
|
if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) {
|
||||||
eReleased.EntityName = m_PickEntity.Name();
|
Events::InputCommand eInputCmd;
|
||||||
eReleased.Entity = m_PickEntity;
|
eInputCmd.PlayerID = LocalPlayer.ID;
|
||||||
m_EventBroker->Publish(eReleased);
|
eInputCmd.Player = LocalPlayer;
|
||||||
|
EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity);
|
||||||
|
eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"];
|
||||||
|
eInputCmd.Value = 0;
|
||||||
|
m_EventBroker->Publish(eInputCmd);
|
||||||
|
} else {
|
||||||
|
Events::ButtonReleased eReleased;
|
||||||
|
eReleased.EntityName = m_PickEntity.Name();
|
||||||
|
eReleased.Entity = m_PickEntity;
|
||||||
|
m_EventBroker->Publish(eReleased);
|
||||||
|
}
|
||||||
|
|
||||||
if(m_World->HasComponent(m_PickData.Entity, "Button")) {
|
if(m_World->HasComponent(m_PickData.Entity, "Button")) {
|
||||||
if (ent == m_PickEntity) {
|
if (ent == m_PickEntity) {
|
||||||
|
|||||||
@@ -49,18 +49,24 @@ void Packet::WriteString(const std::string& str)
|
|||||||
// Message, add one extra byte for null terminator
|
// Message, add one extra byte for null terminator
|
||||||
size_t sizeOfString = str.size() + 1;
|
size_t sizeOfString = str.size() + 1;
|
||||||
if (m_Offset + sizeOfString > m_MaxPacketSize) {
|
if (m_Offset + sizeOfString > m_MaxPacketSize) {
|
||||||
//LOG_WARNING("Package::WriteString(): Data size in packet exceeded maximum package size. New size is %i bytes\n", m_MaxPacketSize*2);
|
if (m_MaxPacketSize >= 32000) {
|
||||||
|
LOG_WARNING("Package::WriteString(): New size is huge %i bytes\n", m_MaxPacketSize*2);
|
||||||
|
}
|
||||||
resizeData();
|
resizeData();
|
||||||
}
|
}
|
||||||
memcpy(m_Data + m_Offset, str.data(), sizeOfString * sizeof(char));
|
memcpy(m_Data + m_Offset, str.data(), str.size() * sizeof(char));
|
||||||
m_Offset += sizeOfString * sizeof(char);
|
m_Offset += str.size() * sizeof(char);
|
||||||
|
m_Data[m_Offset] = '\0';
|
||||||
|
m_Offset += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Packet::WriteData(char * data, int sizeOfData)
|
void Packet::WriteData(char * data, int sizeOfData)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_Offset + sizeOfData > m_MaxPacketSize) {
|
if (m_Offset + sizeOfData > m_MaxPacketSize) {
|
||||||
//LOG_WARNING("Packet::WriteData(): Data size in packet exceeded maximum packet size. New size is %i bytes\n", m_MaxPacketSize*2);
|
if (m_MaxPacketSize >= 32000) {
|
||||||
|
LOG_WARNING("Package::WriteData(): New size is huge %i bytes\n", m_MaxPacketSize*2);
|
||||||
|
}
|
||||||
while (m_Offset + sizeOfData > m_MaxPacketSize) {
|
while (m_Offset + sizeOfData > m_MaxPacketSize) {
|
||||||
resizeData();
|
resizeData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,10 @@ size_t TCPClient::readBuffer()
|
|||||||
boost::asio::ip::tcp::socket::message_peek, error);
|
boost::asio::ip::tcp::socket::message_peek, error);
|
||||||
unsigned int sizeOfPacket = 0;
|
unsigned int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
if (sizeOfPacket > m_Socket->available()) {
|
||||||
|
LOG_WARNING("TCPClient::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
// TODO if message is huge 1 time the buffer will not decrease.
|
// TODO if message is huge 1 time the buffer will not decrease.
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
|
|||||||
@@ -106,7 +106,10 @@ int TCPServer::readBuffer(PlayerDefinition & playerDefinition)
|
|||||||
boost::asio::ip::tcp::socket::message_peek, error);
|
boost::asio::ip::tcp::socket::message_peek, error);
|
||||||
unsigned int sizeOfPacket = 0;
|
unsigned int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
if (sizeOfPacket > playerDefinition.TCPSocket->available()) {
|
||||||
|
LOG_WARNING("TCPServer::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
delete[] m_ReadBuffer;
|
delete[] m_ReadBuffer;
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ int UDPClient::readBuffer()
|
|||||||
boost::asio::ip::udp::socket::message_peek, error);
|
boost::asio::ip::udp::socket::message_peek, error);
|
||||||
int sizeOfPacket = 0;
|
int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
if (sizeOfPacket > m_Socket->available()) {
|
||||||
|
LOG_WARNING("UDPClient::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
//return 0;
|
||||||
|
}
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
delete[] m_ReadBuffer;
|
delete[] m_ReadBuffer;
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ int UDPServer::readBuffer()
|
|||||||
unsigned int sizeOfPacket = 0;
|
unsigned int sizeOfPacket = 0;
|
||||||
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
|
||||||
|
|
||||||
|
if (sizeOfPacket > m_Socket->available()) {
|
||||||
|
LOG_WARNING("UDPServer::readBuffer(): We haven't got the whole packet yet.");
|
||||||
|
//return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// if the buffer is to small increase the size of it
|
// if the buffer is to small increase the size of it
|
||||||
if (sizeOfPacket > m_BufferSize) {
|
if (sizeOfPacket > m_BufferSize) {
|
||||||
delete[] m_ReadBuffer;
|
delete[] m_ReadBuffer;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ void Renderer::Initialize()
|
|||||||
m_TextPass->Initialize();
|
m_TextPass->Initialize();
|
||||||
|
|
||||||
/* m_ScreenQuad = ResourceManager::Load<Model>("Models/Core/ScreenQuad.obj");
|
/* m_ScreenQuad = ResourceManager::Load<Model>("Models/Core/ScreenQuad.obj");
|
||||||
m_UnitQuad = ResourceManager::Load<Model>("Models/Core/UnitQuad.obj");
|
m_UnitQuad = ResourceManager::Load<Model>(sModels/Core/UnitQuad.obj");
|
||||||
m_UnitSphere = ResourceManager::Load<Model>("Models/Core/UnitSphere.obj");*/
|
m_UnitSphere = ResourceManager::Load<Model>("Models/Core/UnitSphere.obj");*/
|
||||||
|
|
||||||
m_ImGuiRenderPass = new ImGuiRenderPass(this, m_EventBroker);
|
m_ImGuiRenderPass = new ImGuiRenderPass(this, m_EventBroker);
|
||||||
|
|||||||
+7
-3
@@ -18,7 +18,9 @@
|
|||||||
#include "Game/Systems/PickupSpawnSystem.h"
|
#include "Game/Systems/PickupSpawnSystem.h"
|
||||||
#include "Game/Systems/AmmoPickupSystem.h"
|
#include "Game/Systems/AmmoPickupSystem.h"
|
||||||
#include "Game/Systems/DamageIndicatorSystem.h"
|
#include "Game/Systems/DamageIndicatorSystem.h"
|
||||||
|
#include "Game/Systems/Weapon/AssaultWeaponBehaviour.h"
|
||||||
#include "Game/Systems/Weapon/DefenderWeaponBehaviour.h"
|
#include "Game/Systems/Weapon/DefenderWeaponBehaviour.h"
|
||||||
|
#include "Game/Systems/Weapon/SidearmWeaponBehaviour.h"
|
||||||
#include "Rendering/AnimationSystem.h"
|
#include "Rendering/AnimationSystem.h"
|
||||||
#include "Game/Systems/HealthHUDSystem.h"
|
#include "Game/Systems/HealthHUDSystem.h"
|
||||||
#include "Rendering/BoneAttachmentSystem.h"
|
#include "Rendering/BoneAttachmentSystem.h"
|
||||||
@@ -26,7 +28,7 @@
|
|||||||
#include "../Engine/Core/UniformScaleSystem.h"
|
#include "../Engine/Core/UniformScaleSystem.h"
|
||||||
#include "Rendering/AnimationSystem.h"
|
#include "Rendering/AnimationSystem.h"
|
||||||
#include "Network/MultiplayerSnapshotFilter.h"
|
#include "Network/MultiplayerSnapshotFilter.h"
|
||||||
#include "Game/Systems/AmmunitionHUDSystem.h"
|
#include "Game/Systems/TextFieldReader.h"
|
||||||
#include "Game/Systems/AbilityCooldownHUDSystem.h"
|
#include "Game/Systems/AbilityCooldownHUDSystem.h"
|
||||||
#include "Game/Systems/CapturePointArrowHUDSystem.h"
|
#include "Game/Systems/CapturePointArrowHUDSystem.h"
|
||||||
#include "Game/Systems/KillFeedSystem.h"
|
#include "Game/Systems/KillFeedSystem.h"
|
||||||
@@ -128,14 +130,16 @@ Game::Game(int argc, char* argv[])
|
|||||||
m_SystemPipeline->AddSystem<PlayerMovementSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<PlayerMovementSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<SpawnerSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<SpawnerSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<PlayerSpawnSystem>(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<DefenderWeaponBehaviour>(updateOrderLevel, m_Renderer, m_OctreeCollision);
|
||||||
|
m_SystemPipeline->AddSystem<SidearmWeaponBehaviour>(updateOrderLevel, m_Renderer, m_OctreeCollision);
|
||||||
m_SystemPipeline->AddSystem<LifetimeSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<LifetimeSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<CapturePointSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<CapturePointSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<CapturePointHUDSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<CapturePointHUDSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<PickupSpawnSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<PickupSpawnSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<AmmoPickupSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<AmmoPickupSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<DamageIndicatorSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<DamageIndicatorSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<AmmunitionHUDSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<TextFieldReader>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<AbilityCooldownHUDSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<AbilityCooldownHUDSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<CapturePointArrowHUDSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<CapturePointArrowHUDSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<KillFeedSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<KillFeedSystem>(updateOrderLevel);
|
||||||
@@ -145,7 +149,7 @@ Game::Game(int argc, char* argv[])
|
|||||||
m_SystemPipeline->AddSystem<PickupSpawnSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<PickupSpawnSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<AmmoPickupSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<AmmoPickupSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<DamageIndicatorSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<DamageIndicatorSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<AmmunitionHUDSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<TextFieldReader>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<KillFeedSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<KillFeedSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<BoostSystem>(updateOrderLevel);
|
m_SystemPipeline->AddSystem<BoostSystem>(updateOrderLevel);
|
||||||
m_SystemPipeline->AddSystem<ButtonSystem>(updateOrderLevel, m_Renderer);
|
m_SystemPipeline->AddSystem<ButtonSystem>(updateOrderLevel, m_Renderer);
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
#include "Game/Systems/AmmunitionHUDSystem.h"
|
|
||||||
|
|
||||||
void AmmunitionHUDSystem::Update(double dt)
|
|
||||||
{
|
|
||||||
//Hud element for tracking ammunition from parent with AssaultWeapon component.Child with the name "MagazineAmmo" tracks clip ammunition.Child with the name "Ammo" tracks ammo.</xs:documentation>
|
|
||||||
|
|
||||||
auto ammunitionHUDs = m_World->GetComponents("AmmunitionHUD");
|
|
||||||
if (ammunitionHUDs == nullptr) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto& ammunitionHUDComponent : *ammunitionHUDs) {
|
|
||||||
EntityWrapper entity = EntityWrapper(m_World, ammunitionHUDComponent.EntityID);
|
|
||||||
|
|
||||||
EntityWrapper playerEntity = entity.FirstParentWithComponent("AssaultWeapon");
|
|
||||||
|
|
||||||
if (!playerEntity.Valid()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
EntityWrapper magazineAmmo = entity.FirstChildByName("MagazineAmmo");
|
|
||||||
if(magazineAmmo.Valid()) {
|
|
||||||
if(magazineAmmo.HasComponent("Text")) {
|
|
||||||
(std::string&)magazineAmmo["Text"]["Content"] = std::to_string((int)playerEntity["AssaultWeapon"]["MagazineAmmo"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EntityWrapper ammo = entity.FirstChildByName("Ammo");
|
|
||||||
if (ammo.Valid()) {
|
|
||||||
if (ammo.HasComponent("Text")) {
|
|
||||||
(std::string&)ammo["Text"]["Content"] = std::to_string((int)playerEntity["AssaultWeapon"]["Ammo"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -18,14 +18,9 @@ PlayerMovementSystem::~PlayerMovementSystem()
|
|||||||
void PlayerMovementSystem::Update(double dt)
|
void PlayerMovementSystem::Update(double dt)
|
||||||
{
|
{
|
||||||
updateMovementControllers(dt);
|
updateMovementControllers(dt);
|
||||||
if (IsServer) {
|
// Only do physics calculations on client and only for themselves.
|
||||||
for (auto& kv : m_PlayerInputControllers) {
|
if (IsClient && LocalPlayer.Valid()) {
|
||||||
updateVelocity(kv.first, dt);
|
updateVelocity(LocalPlayer, dt);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (LocalPlayer.Valid()) {
|
|
||||||
updateVelocity(LocalPlayer, dt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +62,14 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
|
|||||||
playerMovementSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
|
playerMovementSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
|
||||||
playerCrouchSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
|
playerCrouchSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
|
||||||
}
|
}
|
||||||
|
bool sniperSprinting = false;
|
||||||
|
if (player.HasComponent("SprintAbility")) {
|
||||||
|
if (controller->SpecialAbilityKeyDown()) {
|
||||||
|
playerMovementSpeed *= (double)player["SprintAbility"]["StrengthOfEffect"];
|
||||||
|
playerCrouchSpeed *= (double)player["SprintAbility"]["StrengthOfEffect"];
|
||||||
|
sniperSprinting = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (player.HasComponent("Physics")) {
|
if (player.HasComponent("Physics")) {
|
||||||
ComponentWrapper cPhysics = player["Physics"];
|
ComponentWrapper cPhysics = player["Physics"];
|
||||||
@@ -123,6 +125,9 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
|
|||||||
if (playerBoostAssaultEntity.Valid()) {
|
if (playerBoostAssaultEntity.Valid()) {
|
||||||
accelerationSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
|
accelerationSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
|
||||||
}
|
}
|
||||||
|
if (sniperSprinting) {
|
||||||
|
accelerationSpeed *= (double)player["SprintAbility"]["StrengthOfEffect"];
|
||||||
|
}
|
||||||
velocity += accelerationSpeed * wishDirection;
|
velocity += accelerationSpeed * wishDirection;
|
||||||
ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
|
ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ void PlayerSpawnSystem::Update(double dt)
|
|||||||
|
|
||||||
bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e)
|
bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e)
|
||||||
{
|
{
|
||||||
if (e.Command != "PickTeam") {
|
if (e.Command != "PickTeam" && e.Command != "SwapToClassPick") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,11 +113,12 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// A dead client should be able to swap to the spectator camera.
|
// A dead client should be able to swap to the overwatch camera.
|
||||||
if (IsClient && !LocalPlayer.Valid()) {
|
if (IsClient && !LocalPlayer.Valid()) {
|
||||||
// Set the spectator camera as active, if it exists.
|
// Set the camera as active, if it exists.
|
||||||
// Find the camera.
|
// Find the respawn camera or class pick camera.
|
||||||
EntityWrapper spectatorCam = m_World->GetFirstEntityByName("SpectatorCamera");
|
std::string camName = e.Command == "SwapToClassPick" ? "PickClassCamera" : "SpectatorCamera";
|
||||||
|
EntityWrapper spectatorCam = m_World->GetFirstEntityByName(camName);
|
||||||
if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) {
|
if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) {
|
||||||
Events::SetCamera eSetCamera;
|
Events::SetCamera eSetCamera;
|
||||||
eSetCamera.CameraEntity = spectatorCam;
|
eSetCamera.CameraEntity = spectatorCam;
|
||||||
@@ -135,10 +136,18 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e)
|
|||||||
auto iter = m_SpawnRequests.begin();
|
auto iter = m_SpawnRequests.begin();
|
||||||
for (; iter != m_SpawnRequests.end(); ++iter) {
|
for (; iter != m_SpawnRequests.end(); ++iter) {
|
||||||
if (iter->PlayerID == e.PlayerID) {
|
if (iter->PlayerID == e.PlayerID) {
|
||||||
|
// If player wants to switch class, remove their spawn request.
|
||||||
|
if (e.Command == "SwapToClassPick") {
|
||||||
|
m_SpawnRequests.erase(iter);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.Command == "SwapToClassPick") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (iter != m_SpawnRequests.end()) {
|
if (iter != m_SpawnRequests.end()) {
|
||||||
// If player is in queue to spawn, then change their team affiliation in the request.
|
// If player is in queue to spawn, then change their team affiliation in the request.
|
||||||
iter->Team = (ComponentInfo::EnumType)e.Value;
|
iter->Team = (ComponentInfo::EnumType)e.Value;
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#include "Game/Systems/TextFieldReader.h"
|
||||||
|
|
||||||
|
void TextFieldReader::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cAmmunitionHUD, double dt)
|
||||||
|
{
|
||||||
|
if (!entity.HasComponent("Text")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the entity to read from
|
||||||
|
const std::string& parentEntityName = cAmmunitionHUD["ParentEntityName"];
|
||||||
|
EntityWrapper readEntity = entity;
|
||||||
|
if (!parentEntityName.empty()) {
|
||||||
|
readEntity = entity.FirstParentByName(parentEntityName);
|
||||||
|
if (!readEntity.Valid()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the component to read from
|
||||||
|
const std::string& componentType = cAmmunitionHUD["ComponentType"];
|
||||||
|
if (componentType.empty() || !readEntity.HasComponent(componentType)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ComponentWrapper component = readEntity[componentType];
|
||||||
|
|
||||||
|
// Find the field to read from
|
||||||
|
const std::string& fieldName = cAmmunitionHUD["Field"];
|
||||||
|
if (fieldName.empty() || component.Info.Fields.count(fieldName) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const ComponentInfo::Field_t& field = component.Info.Fields.at(fieldName);
|
||||||
|
|
||||||
|
std::string& text = entity["Text"]["Content"];
|
||||||
|
|
||||||
|
if (field.Type == "int") {
|
||||||
|
text = boost::lexical_cast<std::string>((const int&)component[fieldName]);
|
||||||
|
} else if (field.Type == "float") {
|
||||||
|
text = boost::lexical_cast<std::string>((const float&)component[fieldName]);
|
||||||
|
} else if (field.Type == "double") {
|
||||||
|
text = boost::lexical_cast<std::string>((const double&)component[fieldName]);
|
||||||
|
} else if (field.Type == "bool") {
|
||||||
|
text = boost::lexical_cast<std::string>((const bool&)component[fieldName]);
|
||||||
|
} else if (field.Type == "string") {
|
||||||
|
text = (const std::string&)component[fieldName];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -2,40 +2,113 @@
|
|||||||
|
|
||||||
void DefenderWeaponBehaviour::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt)
|
void DefenderWeaponBehaviour::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt)
|
||||||
{
|
{
|
||||||
(double&)cWeapon["TimeSinceLastFire"] += dt;
|
double& fireCooldown = cWeapon["FireCooldown"];
|
||||||
|
fireCooldown = glm::max(0.0, fireCooldown - dt);
|
||||||
|
|
||||||
WeaponBehaviour::UpdateComponent(entity, cWeapon, dt);
|
WeaponBehaviour::UpdateComponent(entity, cWeapon, dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefenderWeaponBehaviour::UpdateWeapon(WeaponInfo& wi, double dt)
|
void DefenderWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt)
|
||||||
{
|
{
|
||||||
ComponentWrapper cWeapon = wi.GetComponent();
|
// Decrement reload timer
|
||||||
|
double& reloadTimer = cWeapon["ReloadTimer"];
|
||||||
|
reloadTimer = glm::max(0.0, reloadTimer - dt);
|
||||||
|
|
||||||
bool isFiring = cWeapon["IsFiring"];
|
// Start reloading automatically if at 0 mag ammo
|
||||||
bool cooldownPassed = (double)cWeapon["TimeSinceLastFire"] >= (60.0 / (double)cWeapon["RPM"]);
|
int& magAmmo = cWeapon["MagazineAmmo"];
|
||||||
bool isNotShielding = wi.Player.ChildrenWithComponent("Shield").size() == 0;
|
if (m_ConfigAutoReload && magAmmo <= 0) {
|
||||||
if (isFiring && cooldownPassed && isNotShielding) {
|
OnReload(cWeapon, wi);
|
||||||
fireShell(wi);
|
}
|
||||||
|
|
||||||
|
// Handle reloading
|
||||||
|
bool& isReloading = cWeapon["IsReloading"];
|
||||||
|
if (isReloading && reloadTimer <= 0.0) {
|
||||||
|
double reloadTime = cWeapon["ReloadTime"];
|
||||||
|
int& magSize = cWeapon["MagazineSize"];
|
||||||
|
int& ammo = cWeapon["Ammo"];
|
||||||
|
if (magAmmo < magSize && ammo > 0) {
|
||||||
|
ammo -= 1;
|
||||||
|
magAmmo += 1;
|
||||||
|
reloadTimer = reloadTime;
|
||||||
|
Events::PlaySoundOnEntity e;
|
||||||
|
e.EmitterID = wi.Player.ID;
|
||||||
|
e.FilePath = "Audio/weapon/Zoom.wav";
|
||||||
|
m_EventBroker->Publish(e);
|
||||||
|
} else {
|
||||||
|
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)) {
|
||||||
|
fireShell(cWeapon, wi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefenderWeaponBehaviour::OnPrimaryFire(WeaponInfo& wi)
|
void DefenderWeaponBehaviour::OnPrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
{
|
{
|
||||||
ComponentWrapper cWeapon = wi.GetComponent();
|
cWeapon["TriggerHeld"] = true;
|
||||||
cWeapon["IsFiring"] = true;
|
if (canFire(cWeapon, wi)) {
|
||||||
bool cooldownPassed = (double)cWeapon["TimeSinceLastFire"] >= (60.0 / (double)cWeapon["RPM"]);
|
fireShell(cWeapon, wi);
|
||||||
bool isNotShielding = wi.Player.ChildrenWithComponent("Shield").size() == 0;
|
|
||||||
if (cooldownPassed && isNotShielding) {
|
|
||||||
fireShell(wi);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefenderWeaponBehaviour::OnCeasePrimaryFire(WeaponInfo& wi)
|
void DefenderWeaponBehaviour::OnCeasePrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
{
|
{
|
||||||
ComponentWrapper cWeapon = wi.GetComponent();
|
cWeapon["TriggerHeld"] = false;
|
||||||
cWeapon["IsFiring"] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefenderWeaponBehaviour::OnInputCommand(WeaponInfo& wi, const Events::InputCommand& e)
|
void DefenderWeaponBehaviour::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 DefenderWeaponBehaviour::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;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInfo& wi, const Events::InputCommand& e)
|
||||||
{
|
{
|
||||||
if (e.Command == "SpecialAbility" && IsServer) {
|
if (e.Command == "SpecialAbility" && IsServer) {
|
||||||
EntityWrapper attachment = wi.Player.FirstChildByName("ShieldAttachment");
|
EntityWrapper attachment = wi.Player.FirstChildByName("ShieldAttachment");
|
||||||
@@ -51,17 +124,22 @@ bool DefenderWeaponBehaviour::OnInputCommand(WeaponInfo& wi, const Events::Input
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefenderWeaponBehaviour::OnSetCamera(const Events::SetCamera& e)
|
void DefenderWeaponBehaviour::fireShell(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
{
|
{
|
||||||
m_CurrentCamera = e.CameraEntity;
|
cWeapon["FireCooldown"] = 60.0 / (double)cWeapon["RPM"];
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefenderWeaponBehaviour::fireShell(WeaponInfo& wi)
|
// Stop reloading
|
||||||
{
|
bool& isReloading = cWeapon["IsReloading"];
|
||||||
ComponentWrapper cWeapon = wi.GetComponent();
|
isReloading = false;
|
||||||
|
|
||||||
|
// Ammo
|
||||||
|
int& magAmmo = cWeapon["MagazineAmmo"];
|
||||||
|
if (magAmmo <= 0) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
magAmmo -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
cWeapon["TimeSinceLastFire"] = 0.0;
|
|
||||||
int numPellets = cWeapon["NumPellets"];
|
int numPellets = cWeapon["NumPellets"];
|
||||||
float spreadAngle = cWeapon["SpreadAngle"];
|
float spreadAngle = cWeapon["SpreadAngle"];
|
||||||
std::uniform_real_distribution<float> randomSpreadAngle(-spreadAngle, spreadAngle);
|
std::uniform_real_distribution<float> randomSpreadAngle(-spreadAngle, spreadAngle);
|
||||||
@@ -72,11 +150,29 @@ void DefenderWeaponBehaviour::fireShell(WeaponInfo& wi)
|
|||||||
std::vector<glm::vec2> pelletAngles;
|
std::vector<glm::vec2> pelletAngles;
|
||||||
for (int i = 0; i < numPellets; i++) {
|
for (int i = 0; i < numPellets; i++) {
|
||||||
pelletAngles.push_back(glm::vec2(randomSpreadAngle(m_RandomEngine), randomSpreadAngle(m_RandomEngine)));
|
pelletAngles.push_back(glm::vec2(randomSpreadAngle(m_RandomEngine), randomSpreadAngle(m_RandomEngine)));
|
||||||
LOG_DEBUG("%f %f", pelletAngles[i].x, pelletAngles[i].y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double pelletDamage = (double)cWeapon["BaseDamage"] / numPellets;
|
double pelletDamage = (double)cWeapon["BaseDamage"] / numPellets;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Tracers
|
// Tracers
|
||||||
EntityWrapper weaponModelEntity;
|
EntityWrapper weaponModelEntity;
|
||||||
if (wi.Player == LocalPlayer) {
|
if (wi.Player == LocalPlayer) {
|
||||||
@@ -95,13 +191,18 @@ void DefenderWeaponBehaviour::fireShell(WeaponInfo& wi)
|
|||||||
orientation.x += angles.x;
|
orientation.x += angles.x;
|
||||||
orientation.y += angles.y;
|
orientation.y += angles.y;
|
||||||
glm::vec3 trajectory = direction * distance;
|
glm::vec3 trajectory = direction * distance;
|
||||||
dealDamage(wi, direction, pelletDamage);
|
dealDamage(cWeapon, wi, direction, pelletDamage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sound
|
||||||
|
Events::PlaySoundOnEntity e;
|
||||||
|
e.EmitterID = wi.Player.ID;
|
||||||
|
e.FilePath = "Audio/weapon/Blast.wav";
|
||||||
|
m_EventBroker->Publish(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefenderWeaponBehaviour::dealDamage(WeaponInfo& wi, glm::vec3 direction, double damage)
|
void DefenderWeaponBehaviour::dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi, glm::vec3 direction, double damage)
|
||||||
{
|
{
|
||||||
// Only deal damage client side
|
// Only deal damage client side
|
||||||
if (!IsClient) {
|
if (!IsClient) {
|
||||||
@@ -160,16 +261,12 @@ void DefenderWeaponBehaviour::dealDamage(WeaponInfo& wi, glm::vec3 direction, do
|
|||||||
LOG_DEBUG("Damage: %f", damage);
|
LOG_DEBUG("Damage: %f", damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
float DefenderWeaponBehaviour::traceRayDistance(glm::vec3 origin, glm::vec3 direction)
|
bool DefenderWeaponBehaviour::canFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
{
|
{
|
||||||
float distance;
|
bool triggerHeld = cWeapon["TriggerHeld"];
|
||||||
glm::vec3 pos;
|
bool cooldownPassed = (double)cWeapon["FireCooldown"] <= 0.0;
|
||||||
auto entity = Collision::EntityFirstHitByRay(Ray(origin, direction), m_CollisionOctree, distance, pos);
|
bool isNotShielding = wi.Player.ChildrenWithComponent("Shield").size() == 0;
|
||||||
if (entity) {
|
return triggerHeld && cooldownPassed && isNotShielding;
|
||||||
return distance;
|
|
||||||
} else {
|
|
||||||
return 100.f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera DefenderWeaponBehaviour::cameraFromEntity(EntityWrapper camera)
|
Camera DefenderWeaponBehaviour::cameraFromEntity(EntityWrapper camera)
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
#include "Systems/Weapon/SidearmWeaponBehaviour.h"
|
||||||
|
|
||||||
|
void SidearmWeaponBehaviour::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt)
|
||||||
|
{
|
||||||
|
double& cooldown = cWeapon["FireCooldown"];
|
||||||
|
if (cooldown > 0) {
|
||||||
|
cooldown -= dt;
|
||||||
|
if (cooldown < 0) {
|
||||||
|
cooldown = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
WeaponBehaviour::UpdateComponent(entity, cWeapon, dt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SidearmWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt)
|
||||||
|
{
|
||||||
|
if ((bool)cWeapon["Automatic"] && canFire(cWeapon)) {
|
||||||
|
fireBullet(cWeapon, wi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SidearmWeaponBehaviour::OnPrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
|
{
|
||||||
|
cWeapon["TriggerHeld"] = true;
|
||||||
|
if (canFire(cWeapon)) {
|
||||||
|
fireBullet(cWeapon, wi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SidearmWeaponBehaviour::OnCeasePrimaryFire(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
|
{
|
||||||
|
cWeapon["TriggerHeld"] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SidearmWeaponBehaviour::OnEquip(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
|
{
|
||||||
|
cWeapon["FireCooldown"] = (double)cWeapon["EquipTime"];
|
||||||
|
}
|
||||||
|
|
||||||
|
void SidearmWeaponBehaviour::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 SidearmWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi)
|
||||||
|
{
|
||||||
|
cWeapon["FireCooldown"] = 60.0 / (double)cWeapon["RPM"];
|
||||||
|
|
||||||
|
// 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 = Transform::AbsoluteOrientation(tracerSpawner) * glm::vec3(0, 0, -1);
|
||||||
|
float distance = traceRayDistance(origin, direction);
|
||||||
|
EntityWrapper ray = SpawnerSystem::Spawn(tracerSpawner);
|
||||||
|
((glm::vec3&)ray["Transform"]["Scale"]).z = (distance / 100.f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SidearmWeaponBehaviour::canFire(ComponentWrapper cWeapon)
|
||||||
|
{
|
||||||
|
bool triggerHeld = cWeapon["TriggerHeld"];
|
||||||
|
double& cooldown = cWeapon["FireCooldown"];
|
||||||
|
// TODO: Ammo checks
|
||||||
|
return triggerHeld && cooldown <= 0.0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user