This commit is contained in:
antc13
2016-03-09 18:46:43 +01:00
112 changed files with 12662 additions and 12091 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ struct EntityWrapper
static const EntityWrapper Invalid; static const EntityWrapper Invalid;
const std::string Name(); const std::string Name() const;
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();
@@ -7,6 +7,7 @@
#include "../Game/Events/EDashAbility.h" #include "../Game/Events/EDashAbility.h"
#include "InputHandler.h" #include "InputHandler.h"
#include "Rendering/EAutoAnimationBlend.h" #include "Rendering/EAutoAnimationBlend.h"
#include "Rendering/ESetBlendWeight.h"
template <typename EventContext> template <typename EventContext>
class FirstPersonInputController : public InputController<EventContext> class FirstPersonInputController : public InputController<EventContext>
@@ -45,7 +46,6 @@ protected:
bool m_Crouching = false; bool m_Crouching = false;
//assault dash membervariables - needed to calculate the doubletap- and dashlogic //assault dash membervariables - needed to calculate the doubletap- and dashlogic
double m_AssaultDashDoubleTapDeltaTime = 0.0; double m_AssaultDashDoubleTapDeltaTime = 0.0;
double m_DashEffectResetTimer = 0.0;
//i will let m_AssaultDashDoubleTapSensitivityTimer stay hardcoded, its not really a gamevariable (more an inputvariable), //i will let m_AssaultDashDoubleTapSensitivityTimer stay hardcoded, its not really a gamevariable (more an inputvariable),
//and its very unlikely that someone wants to change that value //and its very unlikely that someone wants to change that value
const float m_AssaultDashDoubleTapSensitivityTimer = 0.25f; const float m_AssaultDashDoubleTapSensitivityTimer = 0.25f;
@@ -110,7 +110,6 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
if (e.Command == "Pitch") { if (e.Command == "Pitch") {
float val = glm::radians(e.Value); float val = glm::radians(e.Value);
m_Rotation.x += -val; m_Rotation.x += -val;
//m_Rotation.x = glm::clamp(m_Rotation.x, -glm::half_pi<float>(), glm::half_pi<float>());
} }
if (e.Command == "Yaw") { if (e.Command == "Yaw") {
@@ -123,13 +122,13 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
float val = glm::clamp(e.Value, -1.f, 1.f); float val = glm::clamp(e.Value, -1.f, 1.f);
m_Movement.z = -val; m_Movement.z = -val;
//Animation
if (m_PlayerEntity.Valid()) { if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) { if (playerModel.Valid()) {
if (val > 0) { if (val > 0) { // Walk/Run
Events::AutoAnimationBlend aeb; Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1; aeb.Duration = 0.1;
if (m_Crouching) { if (m_Crouching) {
aeb.NodeName = "Walk"; aeb.NodeName = "Walk";
} else { } else {
@@ -137,8 +136,9 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
} }
aeb.RootNode = playerModel; aeb.RootNode = playerModel;
aeb.Start = true; aeb.Start = true;
aeb.SingleLevelBlend = true;
m_EventBroker->Publish(aeb); m_EventBroker->Publish(aeb);
} else if (val < 0) { } else if (val < 0) { // Walk/run Backwards
Events::AutoAnimationBlend aeb; Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1; aeb.Duration = 0.1;
if (m_Crouching) { if (m_Crouching) {
@@ -148,10 +148,34 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
} }
aeb.RootNode = playerModel; aeb.RootNode = playerModel;
aeb.Start = true; aeb.Start = true;
aeb.SingleLevelBlend = true;
aeb.Reverse = true;
m_EventBroker->Publish(aeb);
}
}
EntityWrapper firstPersonModel = m_PlayerEntity.FirstChildByName("Hands");
if (firstPersonModel.Valid()) {
if (val > 0) { // Walk/Run
if (!m_Crouching) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Run";
aeb.RootNode = firstPersonModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
} else if (val < 0) { // Walk/run Backwards
if (!m_Crouching) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Run";
aeb.RootNode = firstPersonModel;
aeb.Start = true;
aeb.Reverse = true; aeb.Reverse = true;
m_EventBroker->Publish(aeb); m_EventBroker->Publish(aeb);
} else { }
} }
} }
} }
@@ -160,48 +184,91 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
float val = glm::clamp(e.Value, -1.f, 1.f); float val = glm::clamp(e.Value, -1.f, 1.f);
m_Movement.x = val; m_Movement.x = val;
//Animation
if (m_PlayerEntity.Valid()) { if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) { //Right Strafe
if (playerModel.Valid()) {
if (val > 0) { if (val > 0) {
Events::AutoAnimationBlend aeb; Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1; aeb.Duration = 0.1;
aeb.NodeName = "Right"; aeb.NodeName = "Right";
aeb.RootNode = playerModel; aeb.RootNode = playerModel;
aeb.SingleLevelBlend = true;
aeb.Start = true; aeb.Start = true;
m_EventBroker->Publish(aeb); m_EventBroker->Publish(aeb);
} else if (val < 0) { } else if (val < 0) { //LeftStrafe
Events::AutoAnimationBlend aeb; Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1; aeb.Duration = 0.1;
aeb.NodeName = "Left"; aeb.NodeName = "Left";
aeb.RootNode = playerModel; aeb.RootNode = playerModel;
aeb.SingleLevelBlend = true;
aeb.Start = true; aeb.Start = true;
m_EventBroker->Publish(aeb); m_EventBroker->Publish(aeb);
} else { }
}
} }
} }
} }
} //Animation
if (glm::length2(m_Movement) > 0) { if (glm::length2(m_Movement) < 0.25f) {
m_Movement = glm::normalize(m_Movement); //Blend to Idle
} else {
if (m_PlayerEntity.Valid()) { if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) { if (playerModel.Valid()) {
Events::AutoAnimationBlend aeb; Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1; aeb.Duration = 0.1;
aeb.NodeName = "Idle"; aeb.NodeName = "Idle";
aeb.RootNode = playerModel; aeb.RootNode = playerModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
EntityWrapper firstPersonModel = m_PlayerEntity.FirstChildByName("Hands");
if (firstPersonModel.Valid()) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Idle";
aeb.RootNode = firstPersonModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
}
} else {
//Blend to movement
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "DirectionBlend";
aeb.RootNode = playerModel;
m_EventBroker->Publish(aeb); m_EventBroker->Publish(aeb);
} }
} }
} }
if (glm::length2(m_Movement) > 0) {
m_Movement = glm::normalize(m_Movement);
//Animation
// movement direction blend
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z));
double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction));
Events::SetBlendWeight sbw;
sbw.NodeName = "DirectionBlend";
sbw.Weight = weight;
sbw.RootNode = playerModel;
m_EventBroker->Publish(sbw);
} }
}
}
if (e.Command == "Forward" || e.Command == "Right") { if (e.Command == "Forward" || e.Command == "Right") {
if (e.Value != 0) { if (e.Value != 0) {
@@ -235,6 +302,8 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
if (e.Command == "Crouch") { if (e.Command == "Crouch") {
m_Crouching = e.Value > 0; m_Crouching = e.Value > 0;
//Animation
if (m_PlayerEntity.Valid()) { if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) { if (playerModel.Valid()) {
@@ -288,17 +357,10 @@ bool FirstPersonInputController<EventContext>::OnLockMouse(const Events::LockMou
template <typename EventContext> template <typename EventContext>
void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID) { void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID) {
m_AssaultDashDoubleTapDeltaTime += dt; m_AssaultDashDoubleTapDeltaTime += dt;
m_DashEffectResetTimer += dt;
assaultDashCoolDownTimer -= dt; assaultDashCoolDownTimer -= dt;
//cooldown = assaultDashCoolDownMaxTimer sec, pretend the dash lasts 0.25 sec (for friction to do its work) //cooldown = assaultDashCoolDownMaxTimer sec, pretend the dash lasts 0.25 sec (for friction to do its work)
if (assaultDashCoolDownTimer > (assaultDashCoolDownMaxTimer - 0.25f)) { if (assaultDashCoolDownTimer > (assaultDashCoolDownMaxTimer - 0.25f)) {
m_PlayerIsDashing = true; m_PlayerIsDashing = true;
if (m_DashEffectResetTimer > 0.05) {
Events::DashAbility e;
e.Player = playerID;
m_EventBroker->Publish(e);
m_DashEffectResetTimer = 0.0;
}
} else { } else {
m_PlayerIsDashing = false; m_PlayerIsDashing = false;
} }
@@ -310,6 +372,7 @@ void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool
assaultDashCoolDownTimer = assaultDashCoolDownMaxTimer; assaultDashCoolDownTimer = assaultDashCoolDownMaxTimer;
m_AssaultDashDoubleTapped = true; m_AssaultDashDoubleTapped = true;
m_AssaultDashDoubleTapDeltaTime = 0.f; m_AssaultDashDoubleTapDeltaTime = 0.f;
Events::DashAbility e; Events::DashAbility e;
e.Player = playerID; e.Player = playerID;
m_EventBroker->Publish(e); m_EventBroker->Publish(e);
+1 -1
View File
@@ -18,7 +18,7 @@ public:
void LoadBindings(std::string file); void LoadBindings(std::string file);
void Update(double dt); void Update(double dt);
void Process(); void Process(bool suppressNewEvents = false);
template <typename T> template <typename T>
void AddHandler(); void AddHandler();
void Publish(const Events::InputCommand& e); void Publish(const Events::InputCommand& e);
+6 -1
View File
@@ -17,6 +17,7 @@
#include "Network/TCPClient.h" #include "Network/TCPClient.h"
#include "Network/SnapshotDefinitions.h" #include "Network/SnapshotDefinitions.h"
#include "Core/World.h" #include "Core/World.h"
#include "Core/EntityFile.h"
#include "Core/EventBroker.h" #include "Core/EventBroker.h"
#include "Core/ConfigFile.h" #include "Core/ConfigFile.h"
#include "Core/EPlayerDeath.h" #include "Core/EPlayerDeath.h"
@@ -30,7 +31,7 @@
#include "Network/ESearchForServers.h" #include "Network/ESearchForServers.h"
#include "../Game/Events/EDashAbility.h" #include "../Game/Events/EDashAbility.h"
#include "Network/EDisplayServerlist.h" #include "Network/EDisplayServerlist.h"
#include "Network/EConnectRequest.h"
class Client : public Network class Client : public Network
{ {
public: public:
@@ -108,6 +109,8 @@ private:
void sendLocalPlayerTransform(); void sendLocalPlayerTransform();
void becomePlayer(); void becomePlayer();
void displayServerlist(); void displayServerlist();
void removeWorld();
void createMainMenu();
// Mapping Logic // Mapping Logic
// Returns if local EntityID exist in map // Returns if local EntityID exist in map
bool clientServerMapsHasEntity(EntityID clientEntityID); bool clientServerMapsHasEntity(EntityID clientEntityID);
@@ -128,6 +131,8 @@ private:
bool OnDoubleJump(Events::DoubleJump & e); bool OnDoubleJump(Events::DoubleJump & e);
EventRelay<Client, Events::DashAbility> m_EDashAbility; EventRelay<Client, Events::DashAbility> m_EDashAbility;
bool OnDashAbility(const Events::DashAbility& e); bool OnDashAbility(const Events::DashAbility& e);
EventRelay<Client, Events::ConnectRequest> m_EConnectRequest;
bool OnConnectRequest(const Events::ConnectRequest& e);
bool OnSearchForServers(const Events::SearchForServers& e); bool OnSearchForServers(const Events::SearchForServers& e);
UDPClient m_ServerlistRequest; UDPClient m_ServerlistRequest;
+1 -1
View File
@@ -11,7 +11,7 @@ class NetworkClient
public: public:
NetworkClient(); NetworkClient();
virtual ~NetworkClient(); virtual ~NetworkClient();
virtual void Connect(std::string playerName, std::string address, int port) = 0; virtual bool Connect(std::string playerName, std::string address, int port) = 0;
virtual void Disconnect() = 0; virtual void Disconnect() = 0;
virtual void Receive(Packet& packet) = 0; virtual void Receive(Packet& packet) = 0;
virtual void Send(Packet & packet) = 0; virtual void Send(Packet & packet) = 0;
+1
View File
@@ -60,6 +60,7 @@ private:
std::vector<Events::InputCommand> m_InputCommandsToBroadcast; std::vector<Events::InputCommand> m_InputCommandsToBroadcast;
//Timers //Timers
std::clock_t m_StartPingTime; std::clock_t m_StartPingTime;
std::string m_ServerName = "";
// Packet loss logic // Packet loss logic
PacketID m_PacketID = 0; PacketID m_PacketID = 0;
+1 -1
View File
@@ -10,7 +10,7 @@ public:
TCPClient(); TCPClient();
~TCPClient(); ~TCPClient();
void Connect(std::string playerName, std::string address, int port); bool Connect(std::string playerName, std::string address, int port);
void Disconnect(); void Disconnect();
void Receive(Packet& packet); void Receive(Packet& packet);
void Send(Packet & packet); void Send(Packet & packet);
+1 -1
View File
@@ -10,7 +10,7 @@ public:
UDPClient(); UDPClient();
~UDPClient(); ~UDPClient();
void Connect(std::string playerName, std::string address, int port); bool Connect(std::string playerName, std::string address, int port);
void Disconnect(); void Disconnect();
void Receive(Packet& packet); void Receive(Packet& packet);
void Send(Packet & packet); void Send(Packet & packet);
@@ -13,6 +13,8 @@
#include "../Core/EntityWrapper.h" #include "../Core/EntityWrapper.h"
#include "Rendering/AutoBlendQueue.h" #include "Rendering/AutoBlendQueue.h"
#include "../Input/EInputCommand.h" #include "../Input/EInputCommand.h"
#include "../Core/EEntityDeleted.h"
#include "Rendering/ESetBlendWeight.h"
#include "imgui/imgui.h" #include "imgui/imgui.h"
class AnimationSystem : public ImpureSystem class AnimationSystem : public ImpureSystem
@@ -28,6 +30,13 @@ private:
EventRelay<AnimationSystem, Events::AutoAnimationBlend> m_EAutoAnimationBlend; EventRelay<AnimationSystem, Events::AutoAnimationBlend> m_EAutoAnimationBlend;
bool OnAutoAnimationBlend(Events::AutoAnimationBlend& e); bool OnAutoAnimationBlend(Events::AutoAnimationBlend& e);
EventRelay<AnimationSystem, Events::EntityDeleted> m_EEntityDeleted;
bool OnEntityDeleted(Events::EntityDeleted& e);
EventRelay<AnimationSystem, Events::SetBlendWeight> m_ESetBlendWeight;
bool OnSetBlendWeight(Events::SetBlendWeight& e);
std::unordered_map<EntityWrapper, AutoBlendQueue> m_AutoBlendQueues; std::unordered_map<EntityWrapper, AutoBlendQueue> m_AutoBlendQueues;
}; };
@@ -37,6 +37,8 @@ public:
std::shared_ptr<BlendTree> GetBlendTree(); std::shared_ptr<BlendTree> GetBlendTree();
AutoBlendQueue::AutoBlendJob& GetActiveBlendJob(); AutoBlendQueue::AutoBlendJob& GetActiveBlendJob();
bool Empty() { return m_BlendQueue.empty(); }
private: private:
std::list<AutoblendNode> m_BlendQueue; std::list<AutoblendNode> m_BlendQueue;
+6 -3
View File
@@ -75,7 +75,6 @@ public:
std::vector<glm::mat4> GetFinalPose() { return m_FinalPose; } std::vector<glm::mat4> GetFinalPose() { return m_FinalPose; }
glm::mat4 GetBoneTransform(int boneID); glm::mat4 GetBoneTransform(int boneID);
bool IsValid() { return (m_Root == nullptr ? false : true); } bool IsValid() { return (m_Root == nullptr ? false : true); }
void PrintTree(); void PrintTree();
BlendTree::AutoBlendInfo AutoBlendStep(AutoBlendInfo blendInfo); BlendTree::AutoBlendInfo AutoBlendStep(AutoBlendInfo blendInfo);
@@ -84,16 +83,20 @@ public:
EntityWrapper GetSubTreeRoot(std::string nodeName); EntityWrapper GetSubTreeRoot(std::string nodeName);
std::vector<EntityWrapper> GetSingleLevelRoots(std::string name);
std::vector<EntityWrapper> GetEntitesByName(std::string name);
void SetWeightByName(std::string name, double weight);
private: private:
Skeleton* m_Skeleton = nullptr; Skeleton* m_Skeleton = nullptr;
Node* m_Root = nullptr; Node* m_Root = nullptr;
std::vector<glm::mat4> m_FinalPose; std::vector<glm::mat4> m_FinalPose;
std::map<int, glm::mat4> m_FinalBoneTransforms; std::map<int, glm::mat4> m_FinalBoneTransforms;
std::vector<BlendTree::Node*> FindNodesByName(std::string name);
std::vector<glm::mat4> AccumulateFinalPose(); std::vector<glm::mat4> AccumulateFinalPose();
BlendTree::Node* FillTreeByName(Node* parentNode, std::string name, EntityWrapper parentEntity); BlendTree::Node* FillTreeByName(Node* parentNode, std::string name, EntityWrapper parentEntity);
std::vector<BlendTree::Node*> FindNodesByName(std::string name);
void Blend(std::map<int, Skeleton::PoseData>& pose); void Blend(std::map<int, Skeleton::PoseData>& pose);
}; };
+1 -1
View File
@@ -48,7 +48,7 @@ private:
//const LightCullingPass* m_LightCullingPass //const LightCullingPass* m_LightCullingPass
int m_Iterations = 3; int m_Iterations = 3;
int m_Quality = 0; int m_Quality = 0;
float m_BlurQuality = 2.f; float m_BlurQuality = 4.f;
GLuint m_GaussianTexture_horiz = 0; GLuint m_GaussianTexture_horiz = 0;
GLuint m_GaussianTexture_vert = 0; GLuint m_GaussianTexture_vert = 0;
+1 -1
View File
@@ -15,7 +15,7 @@ public:
void GenerateCubeMapTexture(); void GenerateCubeMapTexture();
//GLuint CubeMapTexture() const { return m_CubeMapTexture; } //GLuint CubeMapTexture() const { return m_CubeMapTexture; }
GLuint m_CubeMapTexture = -1; GLuint m_CubeMapTexture = 0;
private: private:
IRenderer* m_Renderer; IRenderer* m_Renderer;
+1 -1
View File
@@ -13,7 +13,7 @@ class DrawBloomPass
{ {
public: public:
DrawBloomPass(IRenderer* renderer, ConfigFile* config); DrawBloomPass(IRenderer* renderer, ConfigFile* config);
~DrawBloomPass() { } ~DrawBloomPass();
void InitializeTextures(); void InitializeTextures();
void InitializeFrameBuffers(); void InitializeFrameBuffers();
void InitializeShaderPrograms(); void InitializeShaderPrograms();
+6 -6
View File
@@ -17,7 +17,7 @@ class DrawFinalPass
{ {
public: public:
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass); DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass);
~DrawFinalPass() { } ~DrawFinalPass();
void InitializeTextures(); void InitializeTextures();
void InitializeFrameBuffers(); void InitializeFrameBuffers();
void InitializeShaderPrograms(); void InitializeShaderPrograms();
@@ -57,11 +57,11 @@ private:
FrameBuffer m_FinalPassFrameBuffer; FrameBuffer m_FinalPassFrameBuffer;
FrameBuffer m_ShieldDepthFrameBuffer; FrameBuffer m_ShieldDepthFrameBuffer;
GLuint m_BloomTexture; GLuint m_BloomTexture = 0;
GLuint m_SceneTexture; GLuint m_SceneTexture = 0;
GLuint m_DepthBuffer; GLuint m_DepthBuffer = 0;
GLuint m_ShieldBuffer; GLuint m_ShieldBuffer = 0;
GLuint m_CubeMapTexture; GLuint m_CubeMapTexture = 0;
GLuint m_FullBlurredTexture; GLuint m_FullBlurredTexture;
GLuint m_CombinedTexture; //This can be removed for less memory usage, just set m_sceneTexture to the return from m_BlurHUDPass.CombineTextures GLuint m_CombinedTexture; //This can be removed for less memory usage, just set m_sceneTexture to the return from m_BlurHUDPass.CombineTextures
@@ -18,7 +18,6 @@ struct AutoAnimationBlend : Event
bool Reverse = false; bool Reverse = false;
bool Restart = false; bool Restart = false;
bool SingleLevelBlend = false; bool SingleLevelBlend = false;
double Weight = -1.0; double Weight = -1.0;
EntityWrapper AnimationEntity = EntityWrapper::Invalid; EntityWrapper AnimationEntity = EntityWrapper::Invalid;
@@ -0,0 +1,20 @@
#ifndef Events_SetBlendWeight_h__
#define Events_SetBlendWeight_h__
#include "../Core/EventBroker.h"
#include "../Core/EntityWrapper.h"
namespace Events
{
//Sets the blend weight for all nodes with "NodeName"
struct SetBlendWeight : Event
{
EntityWrapper RootNode = EntityWrapper::Invalid;
std::string NodeName;
double Weight;
};
}
#endif
+4 -2
View File
@@ -111,7 +111,7 @@ struct ModelJob : RenderJob
Color = modelComponent["Color"]; Color = modelComponent["Color"];
GlowIntensity = ((double)modelComponent["GlowIntensity"]); GlowIntensity = ((double)modelComponent["GlowIntensity"]);
Entity = modelComponent.EntityID; Entity = modelComponent.EntityID;
glm::vec3 abspos = Transform::AbsolutePosition(world, modelComponent.EntityID); glm::vec3 abspos = glm::vec3(matrix[3][0], matrix[3][1], matrix[3][2]);
glm::vec3 worldpos = glm::vec3(camera->ViewMatrix() * glm::vec4(abspos, 1)); glm::vec3 worldpos = glm::vec3(camera->ViewMatrix() * glm::vec4(abspos, 1));
Depth = worldpos.z; Depth = worldpos.z;
World = world; World = world;
@@ -164,7 +164,9 @@ struct ModelJob : RenderJob
bool IsShielded; bool IsShielded;
void CalculateHash() override void CalculateHash() override
{ {
Hash = ShaderID << 20 + ModelID << 10 + TextureID; Hash = TextureID;
Hash += ModelID << 10;
Hash += ShaderID << 20;
} }
}; };
+2 -2
View File
@@ -52,8 +52,8 @@ private:
std::unordered_map<glm::ivec2, PickingInfo> m_PickingColorsToEntity; std::unordered_map<glm::ivec2, PickingInfo> m_PickingColorsToEntity;
GLuint m_PickingTexture; GLuint m_PickingTexture = 0;
GLuint m_DepthBuffer; GLuint m_DepthBuffer = 0;
FrameBuffer m_PickingBuffer; FrameBuffer m_PickingBuffer;
+4 -5
View File
@@ -16,16 +16,15 @@ struct RenderJob
public: public:
float Depth; float Depth;
protected:
uint64_t Hash;
virtual void CalculateHash() = 0;
bool operator<(const RenderJob& rhs) bool operator<(const RenderJob& rhs)
{ {
return this->Hash < rhs.Hash; return this->Hash < rhs.Hash;
} }
protected:
uint64_t Hash;
virtual void CalculateHash() = 0;
}; };
#endif #endif
+1
View File
@@ -37,6 +37,7 @@ public:
: m_EventBroker(eventBroker) : m_EventBroker(eventBroker)
, m_Config(config) , m_Config(config)
{ } { }
~Renderer();
virtual void Initialize() override; virtual void Initialize() override;
virtual void Update(double dt) override; virtual void Update(double dt) override;
+1 -1
View File
@@ -14,7 +14,7 @@ class SSAOPass
{ {
public: public:
SSAOPass(IRenderer* renderer, ConfigFile* config); SSAOPass(IRenderer* renderer, ConfigFile* config);
~SSAOPass() { }; ~SSAOPass();
void ChangeQuality(int quality); void ChangeQuality(int quality);
+2
View File
@@ -21,6 +21,8 @@ public:
std::string GetFileName() const; std::string GetFileName() const;
GLuint GetHandle() const; GLuint GetHandle() const;
bool IsCompiled() const; bool IsCompiled() const;
static std::string ReadFile(std::string fileName);
private:
protected: protected:
GLenum m_ShaderType; GLenum m_ShaderType;
std::string m_FileName; std::string m_FileName;
+3 -2
View File
@@ -7,6 +7,7 @@
#include "../GLM.h" #include "../GLM.h"
#include "../Core/ComponentWrapper.h" #include "../Core/ComponentWrapper.h"
#include "Texture.h" #include "Texture.h"
#include "TextureSprite.h"
#include "Model.h" #include "Model.h"
#include "RenderJob.h" #include "RenderJob.h"
#include "../Core/ResourceManager.h" #include "../Core/ResourceManager.h"
@@ -24,9 +25,9 @@ struct SpriteJob : RenderJob
::RawModel::MaterialProperties matProp = Model->MaterialGroups().front(); ::RawModel::MaterialProperties matProp = Model->MaterialGroups().front();
TextureID = 0; TextureID = 0;
DiffuseTexture = CommonFunctions::LoadTexture(cSprite["DiffuseTexture"], true); DiffuseTexture = CommonFunctions::TryLoadResource<TextureSprite, true>(cSprite["DiffuseTexture"]);
IncandescenceTexture = CommonFunctions::LoadTexture(cSprite["GlowMap"], true); IncandescenceTexture = CommonFunctions::TryLoadResource<TextureSprite, true>(cSprite["GlowMap"]);
StartIndex = matProp.material->StartIndex; StartIndex = matProp.material->StartIndex;
EndIndex = matProp.material->EndIndex; EndIndex = matProp.material->EndIndex;
+1 -1
View File
@@ -9,7 +9,7 @@ class Texture : public BaseTexture
{ {
friend class ResourceManager; friend class ResourceManager;
private: protected:
Texture(std::string path); Texture(std::string path);
public: public:
+26
View File
@@ -0,0 +1,26 @@
#ifndef TextureSprite_h__
#define TextureSprite_h__
#include "../OpenGL.h"
#include "BaseTexture.h"
#include "Texture.h"
#include "PNG.h"
class TextureSprite : public Texture
{
friend class ResourceManager;
protected:
TextureSprite(std::string path);
public:
~TextureSprite();
void Bind(GLenum textureUnit = GL_TEXTURE0);
GLuint m_Texture = 0;
unsigned char* Data = nullptr;
};
#endif
@@ -8,7 +8,23 @@
namespace CommonFunctions namespace CommonFunctions
{ {
Texture* LoadTexture(std::string path, bool threaded);
//Loads Texture/SpriteTexture and return null if it fails
template <typename T, bool threaded>
Texture* TryLoadResource(std::string path)
{
Texture* img;
try {
img = ResourceManager::Load<T, threaded>(path);
} catch (const Resource::StillLoadingException&) {
img = ResourceManager::Load<T>("Textures/Core/ErrorTexture.png");
} catch (const std::exception&) {
img = nullptr;
}
return img;
}
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type); void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type);
void GenerateMultiSampleTexture(GLuint* texture, int numSamples, glm::vec2 dimensions, GLint internalFormat); void GenerateMultiSampleTexture(GLuint* texture, int numSamples, glm::vec2 dimensions, GLint internalFormat);
void GenerateMipMapTexture(GLuint* texture, GLenum wrapping, glm::vec2 dimensions, GLint format, GLenum type, GLint numMipMaps); void GenerateMipMapTexture(GLuint* texture, GLenum wrapping, glm::vec2 dimensions, GLint format, GLenum type, GLint numMipMaps);
+23
View File
@@ -0,0 +1,23 @@
#ifndef StartSystem_h__
#define StartSystem_h__
#include "Core/System.h"
#include "Core/ResourceManager.h"
#include "Core/Event.h"
#include "Core/EventBroker.h"
#include "Rendering/ESetCamera.h"
class StartSystem : public ImpureSystem
{
public:
StartSystem(SystemParams params);
virtual void Update(double dt) override;
private:
EntityWrapper m_ActiveCamera = EntityWrapper::Invalid;
EventRelay<StartSystem, Events::SetCamera> m_ECameraActivated;
bool OnCameraActivated(const Events::SetCamera& e);
};
#endif
+13 -10
View File
@@ -32,11 +32,10 @@ public:
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override
{ {
EntityWrapper firstPersonWeapon = entity.FirstChildByName("Hands").FirstChildByName("AssaultWeapon"); /* EntityWrapper firstPersonWeapon = entity.FirstChildByName("Hands").FirstChildByName("AssaultWeapon");
EntityWrapper thirdPersonWeapon = entity.FirstChildByName("PlayerModel").FirstChildByName("AssaultWeapon"); EntityWrapper thirdPersonWeapon = entity.FirstChildByName("PlayerModel").FirstChildByName("AssaultWeapon");
if (IsClient && (firstPersonWeapon.Valid() || thirdPersonWeapon.Valid())) { if (IsClient && (firstPersonWeapon.Valid() || thirdPersonWeapon.Valid())) {
if (m_ActiveWeapons.count(entity) == 0) { if (m_ActiveWeapons.count(entity) == 0) {
WeaponInfo& wi = m_ActiveWeapons[entity]; WeaponInfo& wi = m_ActiveWeapons[entity];
wi.Player = entity; wi.Player = entity;
wi.WeaponEntity = entity; wi.WeaponEntity = entity;
@@ -45,7 +44,7 @@ public:
OnEquip(cWeapon, wi); OnEquip(cWeapon, wi);
} }
} }*/
auto weapon = getActiveWeapon(entity); auto weapon = getActiveWeapon(entity);
if (!weapon) { if (!weapon) {
@@ -61,7 +60,9 @@ protected:
EntityWrapper Player; EntityWrapper Player;
EntityWrapper WeaponEntity; EntityWrapper WeaponEntity;
EntityWrapper FirstPersonEntity; EntityWrapper FirstPersonEntity;
EntityWrapper FirstPersonPlayerModel;
EntityWrapper ThirdPersonEntity; EntityWrapper ThirdPersonEntity;
EntityWrapper ThirdPersonPlayerModel;
}; };
IRenderer* m_Renderer; IRenderer* m_Renderer;
@@ -89,7 +90,7 @@ protected:
// Returns wi.FirstPersonEntity or wi.ThirdPersonEntity depending on // Returns wi.FirstPersonEntity or wi.ThirdPersonEntity depending on
// if the player is in first person mode or not. // if the player is in first person mode or not.
EntityWrapper getRelevantWeaponModelEntity(WeaponInfo& wi) EntityWrapper getRelevantWeaponEntity(WeaponInfo& wi)
{ {
if (isPlayerInFirstPerson(wi.Player)) { if (isPlayerInFirstPerson(wi.Player)) {
return wi.FirstPersonEntity; return wi.FirstPersonEntity;
@@ -137,7 +138,7 @@ protected:
void playAnimationAndReturn(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName) void playAnimationAndReturn(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName)
{ {
EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model"); EntityWrapper root = weaponModelEntity;
if (!root.Valid()) { if (!root.Valid()) {
return; return;
} }
@@ -254,9 +255,9 @@ private:
void selectWeapon(ComponentWrapper cWeapon, EntityWrapper player) void selectWeapon(ComponentWrapper cWeapon, EntityWrapper player)
{ {
if (!IsServer) { //if (!IsServer) {
return; // return;
} //}
// Don't reselect weapon if it's already active // Don't reselect weapon if it's already active
if (getActiveWeapon(player)) { if (getActiveWeapon(player)) {
@@ -287,11 +288,11 @@ private:
// Spawn the weapon(s) // Spawn the weapon(s)
EntityWrapper firstPersonWeapon; EntityWrapper firstPersonWeapon;
EntityWrapper thirdPersonWeapon; EntityWrapper thirdPersonWeapon;
//if (IsClient) { if (IsClient) {
if (firstPersonAttachment.Valid()) { if (firstPersonAttachment.Valid()) {
firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment); firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment);
} }
//} }
if (thirdPersonAttachment.Valid()) { if (thirdPersonAttachment.Valid()) {
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment); thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
} }
@@ -300,7 +301,9 @@ private:
wi.Player = player; wi.Player = player;
wi.WeaponEntity = player; wi.WeaponEntity = player;
wi.FirstPersonEntity = firstPersonWeapon; wi.FirstPersonEntity = firstPersonWeapon;
wi.FirstPersonPlayerModel = firstPersonWeapon;
wi.ThirdPersonEntity = thirdPersonWeapon; wi.ThirdPersonEntity = thirdPersonWeapon;
wi.ThirdPersonPlayerModel = thirdPersonWeapon.FirstParentWithComponent("Model");
OnEquip(cWeapon, wi); OnEquip(cWeapon, wi);
} }
+1 -1
View File
@@ -4,7 +4,7 @@
<Time>0</Time> <Time>0</Time>
<Play>false</Play> <Play>false</Play>
<Reverse>false</Reverse> <Reverse>false</Reverse>
<Speed>0</Speed> <Speed>1</Speed>
<Loop>true</Loop> <Loop>true</Loop>
<Additive>false</Additive> <Additive>false</Additive>
</Animation> </Animation>
@@ -3,6 +3,8 @@
<ExplosionOrigin X="0" Y="0" Z="0"/> <ExplosionOrigin X="0" Y="0" Z="0"/>
<TimeSinceDeath>0</TimeSinceDeath> <TimeSinceDeath>0</TimeSinceDeath>
<ExplosionDuration>2</ExplosionDuration> <ExplosionDuration>2</ExplosionDuration>
<Speed>1</Speed>
<Delay>0</Delay>
<!--<Gravity>1</Gravity>--> <!--<Gravity>1</Gravity>-->
<!--<GravityForce>1</GravityForce>--> <!--<GravityForce>1</GravityForce>-->
<!--<ObjectRadius>2</ObjectRadius>--> <!--<ObjectRadius>2</ObjectRadius>-->
@@ -18,6 +18,8 @@
<xs:element name="ExplosionDuration" type="t:double" minOccurs="0"> <xs:element name="ExplosionDuration" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>How many seconds the death animation should be</xs:documentation></xs:annotation> <xs:annotation><xs:documentation>How many seconds the death animation should be</xs:documentation></xs:annotation>
</xs:element> </xs:element>
<xs:element name="Speed" type="t:double" minOccurs="0"/>
<xs:element name="Delay" type="t:double" minOccurs="0"/>
<!--<xs:element name="Gravity" type="t:bool" minOccurs="0"> <!--<xs:element name="Gravity" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Enable/disable gravity</xs:documentation></xs:annotation> <xs:annotation><xs:documentation>Enable/disable gravity</xs:documentation></xs:annotation>
</xs:element>--> </xs:element>-->
-98
View File
@@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AmmunitionHUD" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:AmmunitionHUD/>
<c:Transform>
<Position X="-0.0430000015" Y="0.131501317" Z="-0.0670000017"/>
<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>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity>
<Components>
<c:Transform>
<Position X="-0.00200000009" Y="0.00400000019" Z="-0.00100000005"/>
</c:Transform>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -1,46 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="PrimaryBlendTree" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="FinalBlend">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>Idle</Pose1> <Pose1>BlendTreeAssaultWeapon</Pose1>
<Pose2>WeaponAction</Pose2> <Pose2>BlendTreeSecondaryWeapon</Pose2>
<Weight>0</Weight> <Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot> <SubTreeRoot>true</SubTreeRoot>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="WeaponAction"> <Entity name="BlendTreeAssaultWeapon">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>Fire</Pose1> <Pose1>Fire</Pose1>
<Pose2>Reload</Pose2> <Pose2>Reload</Pose2>
<Weight>1</Weight> <Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="Fire"> <Entity name="Reload">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ShootShotgunF</AnimationName> <AnimationName>ReloadSwitchF</AnimationName>
<Speed>1</Speed> <Speed>0.5</Speed>
<Play>true</Play>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="Reload"> <Entity name="Fire">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ReloadSwitchF</AnimationName> <AnimationName>ShootRifleF</AnimationName>
<Time>0.58991607886241582</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -48,18 +59,162 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="BlendTreeSecondaryWeapon">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle"> <Entity name="Idle">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleF</AnimationName> <AnimationName>IdleF</AnimationName>
<Time>0.14837891922093149</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
<Additive>true</Additive>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
</Children> </Children>
</Entity>
<Entity name="ViewModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00800000038" Y="0.0920000076" Z="-0.416000009"/>
<Orientation X="6.2760005" Y="0.00500000035" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="AmmoHUD">
<Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
<ScaleOffset X="0.5" Y="0.5" Z="1"/>
<InheritScale>true</InheritScale>
</c:BoneAttachment>
<c:Transform>
<Position X="0.0540266186" Y="-0.0954354703" Z="-0.255526125"/>
<Orientation X="0.000684258412" Y="0.077423811" Z="0.00118651299"/>
<Scale X="0.50000006" Y="0.500000477" Z="1.00000083"/>
</c:Transform>
</Components>
<Children>
<Entity name="Background">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Text">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>PlayerAssault</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>320</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>PlayerAssault</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity> </Entity>
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="FinalBlend">
<Components>
<c:Blend>
<Pose1>BlendTreeDefenderWeapon</Pose1>
<Pose2>BlendTreeSecondaryWeapon</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="BlendTreeDefenderWeapon">
<Components>
<c:Blend>
<Pose1>ActionBlend</Pose1>
<Pose2>Shield</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Shield">
<Components>
<c:Animation>
<AnimationName>ActivateDeactiveShieldF</AnimationName>
<Time>1</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>ActionBlend2</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ActionBlend2">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<Time>0.5</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadTwoF</AnimationName>
<Time>0.23333333432674408</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeSecondaryWeapon">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.93061516164344571</Time>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.11396167157691739</Time>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
-19
View File
@@ -1,19 +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:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.136586398" Y="0.92942369" Z="-0.139760047"/>
<Orientation X="-0.601206124" Y="0.132410824" Z="-0.129014626"/>
</c:Transform>
</Components>
<Children/>
</Entity>
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="R_Leg_Top" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BoneAttachment>
<BoneName>R_Leg_Top</BoneName>
<ScaleOffset X="0.200000003" Y="0.200000003" Z="0.200000003"/>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="1" B="1" G="19.6078434" R="1"/>
</c:Model>
<c:Transform>
<Position X="0.0664939061" Y="0.714353919" Z="0.0475388765"/>
<Scale X="0.100000001" Y="0.100000001" Z="0.100000001"/>
<Orientation X="-0.783109188" Y="-0.0050998251" Z="3.14151597"/>
</c:Transform>
</Components>
<Children/>
</Entity>
+3 -8
View File
@@ -2,17 +2,12 @@
<Entity name="DashEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="DashEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:Animation/>
<c:Lifetime> <c:Lifetime>
<Lifetime>0.5</Lifetime> <Lifetime>0.5</Lifetime>
</c:Lifetime> </c:Lifetime>
<c:ExplosionEffect>
<Velocity X="0" Y="0" Z="0"/>
<TimeSinceDeath>0</TimeSinceDeath>
<ExplosionDuration>0.5</ExplosionDuration>
<EndColor A="0" B="0" G="0" R="0"/>
</c:ExplosionEffect>
<c:Model/>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/>
</Entity> </Entity>
-255
View File
@@ -1,255 +0,0 @@
<?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>
<RPM>600</RPM>
</c:AssaultWeapon>
<c:Collidable/>
<c:DashAbility/>
<c:Health/>
<c:Physics>
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
</c:Physics>
<c:Player>
<MovementSpeed>5</MovementSpeed>
</c:Player>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="0.0288832653" Z="2.64837074"/>
</c:Transform>
</Components>
<Children>
<Entity name="Camera">
<Components>
<c:Camera/>
<c:Transform>
<Position X="0" Y="1.27700007" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="PlayerName">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.100000001" Y="0.248000011" Z="-0.248000011"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
<Orientation X="0" Y="3.14199996" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<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="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Model>
<Resource>Models/Core/UnitHexagon.mesh</Resource>
<Color A="1" B="0.70588237" G="0.70588237" R="0.70588237"/>
</c:Model>
<c:Transform>
<Position X="-0.383000016" Y="-0.185000002" Z="0"/>
<Scale X="0.150000006" Y="0.150000006" Z="0.150000006"/>
<Orientation X="0" Y="0.594000041" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Crosshair">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
<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>
</Children>
</Entity>
<Entity name="Hands">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>0.28963486380924053</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:Model>
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.120430455" Y="-0.231800437" Z="-0.181454748"/>
<Orientation X="0.0104047749" Y="-0.00268166233" Z="0.042844031"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00325386273" Y="0.0970000029" Z="-0.843000054"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponReloadEffect.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ThirdPersonCamera">
<Components>
<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>Idle</AnimationName1>
<Time1>0.42156525436696768</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:AnimationOffset>
<AnimationName>AimRifle</AnimationName>
<Time>0.5</Time>
</c:AnimationOffset>
<c:HiddenForLocalPlayer/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ThirdPersonWeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0.160716802" Y="1.02800739" Z="-0.215931982"/>
<Orientation X="-0.0627654716" Y="-0.0450839326" Z="0.119217664"/>
</c:Transform>
</Components>
<Children>
<Entity name="ThirdPersonWeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</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>
</Children>
</Entity>
-57
View File
@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Wave" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Animation>
<AnimationName1>Run</AnimationName1>
<Weight1>0.5</Weight1>
<Time1>0.97312056690160276</Time1>
<Speed1>1</Speed1>
<Speed2>1</Speed2>
<AnimationName2>ReloadSwitch</AnimationName2>
<Time2>0.91310356788604263</Time2>
<AnimationName3>LeftRight</AnimationName3>
<Weight3>0</Weight3>
<Time3>0.040207288496060478</Time3>
<Speed3>1</Speed3>
</c:Animation>
<c:AnimationOffset>
<AnimationName>DownUp</AnimationName>
<Time>0.77999961376190186</Time>
</c:AnimationOffset>
<c:Model>
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
<Color A="0.627451003" B="19.6078434" G="1" R="3.92156863"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="-0.690088332" Y="1.00491476" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeapon.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.120778561" Y="-0.223796993" Z="-0.15143311"/>
<Orientation X="0.0957378224" Y="0.0132024018" Z="0.0284451656"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Camera/>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
+191 -55
View File
@@ -12,52 +12,11 @@
<Entity name="Side_Origin"> <Entity name="Side_Origin">
<Components> <Components>
<c:Transform> <c:Transform>
<Position X="-0.377000004" Y="0.0400000028" Z="0"/> <Position X="-0.443000019" Y="0.0400000028" Z="0"/>
<Orientation X="0" Y="0.797000051" Z="0"/> <Orientation X="0" Y="0.867000043" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="ButtonPos_3">
<Components>
<c:Transform>
<Position X="0" Y="-0.140000001" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="Button_3">
<Components>
<c:Button/>
<c:Sprite>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground>
<GlowMap></GlowMap>
<Color A="0.588235319" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Scale X="0.200000003" Y="0.0500000007" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Text">
<Components>
<c:Text>
<Content>Credits</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="-0.075000003" Y="-0.0150000006" Z="0.00100000005"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ButtonPos_1"> <Entity name="ButtonPos_1">
<Components> <Components>
<c:Transform/> <c:Transform/>
@@ -70,7 +29,8 @@
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture> <DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground> <BlurBackground>true</BlurBackground>
<GlowMap></GlowMap> <GlowMap></GlowMap>
<Color A="0.588235319" B="1" G="1" R="1"/> <DepthSort>false</DepthSort>
<Color A="0.392156869" B="0" G="0" R="0"/>
</c:Sprite> </c:Sprite>
<c:InputCmdButton> <c:InputCmdButton>
<Command>Play</Command> <Command>Play</Command>
@@ -87,18 +47,126 @@
<c:Text> <c:Text>
<Content>Play</Content> <Content>Play</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource> <Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
<Alignment> <Alignment>
<Left/> <Right/>
</Alignment> </Alignment>
</c:Text> </c:Text>
<c:Transform> <c:Transform>
<Position X="-0.075000003" Y="-0.0150000006" Z="0.00100000005"/> <Position X="0.0920000002" Y="-0.0150000006" Z="0.00499999989"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="1"/> <Scale X="0.0199999996" Y="0.0199999996" Z="1"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="ButtonCorner_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="TopRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BottomRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
<Orientation X="0" Y="0" Z="4.71199989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ButtonPos_3">
<Components>
<c:Transform>
<Position X="0" Y="-0.140000001" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="Button_3">
<Components>
<c:Button/>
<c:Sprite>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
<Color A="0.392156869" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Scale X="0.200000003" Y="0.0500000007" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Text">
<Components>
<c:Text>
<Content>Credits</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="0.0920000002" Y="-0.0150000006" Z="0.00499999989"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ButtonCorner_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="TopRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BottomRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
<Orientation X="0" Y="0" Z="4.71199989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="ButtonPos_2"> <Entity name="ButtonPos_2">
@@ -115,7 +183,8 @@
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture> <DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground> <BlurBackground>true</BlurBackground>
<GlowMap></GlowMap> <GlowMap></GlowMap>
<Color A="0.588235319" B="1" G="1" R="1"/> <DepthSort>false</DepthSort>
<Color A="0.392156869" B="0" G="0" R="0"/>
</c:Sprite> </c:Sprite>
<c:Transform> <c:Transform>
<Scale X="0.200000003" Y="0.0500000007" Z="1"/> <Scale X="0.200000003" Y="0.0500000007" Z="1"/>
@@ -128,18 +197,51 @@
<c:Text> <c:Text>
<Content>Option</Content> <Content>Option</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource> <Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
<Alignment> <Alignment>
<Left/> <Right/>
</Alignment> </Alignment>
</c:Text> </c:Text>
<c:Transform> <c:Transform>
<Position X="-0.075000003" Y="-0.0150000006" Z="0.00100000005"/> <Position X="0.0920000076" Y="-0.0150000006" Z="0.00499999989"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="1"/> <Scale X="0.0199999996" Y="0.0199999996" Z="1"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="ButtonCorner_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="TopRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BottomRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
<Orientation X="0" Y="0" Z="4.71199989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="ButtonPos_4"> <Entity name="ButtonPos_4">
@@ -156,7 +258,8 @@
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture> <DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground> <BlurBackground>true</BlurBackground>
<GlowMap></GlowMap> <GlowMap></GlowMap>
<Color A="0.588235319" B="1" G="1" R="1"/> <DepthSort>false</DepthSort>
<Color A="0.392156869" B="0" G="0" R="0"/>
</c:Sprite> </c:Sprite>
<c:Transform> <c:Transform>
<Scale X="0.200000003" Y="0.0500000007" Z="1"/> <Scale X="0.200000003" Y="0.0500000007" Z="1"/>
@@ -169,18 +272,51 @@
<c:Text> <c:Text>
<Content>Quit</Content> <Content>Quit</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource> <Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
<Alignment> <Alignment>
<Left/> <Right/>
</Alignment> </Alignment>
</c:Text> </c:Text>
<c:Transform> <c:Transform>
<Position X="-0.075000003" Y="-0.0150000006" Z="0.00100000005"/> <Position X="0.0920000002" Y="-0.0150000006" Z="0.00499999989"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="1"/> <Scale X="0.0199999996" Y="0.0199999996" Z="1"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="ButtonCorner_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="TopRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BottomRight">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
<Orientation X="0" Y="0" Z="4.71199989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
</Children> </Children>
+134 -30
View File
@@ -2,64 +2,168 @@
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:Transform> <c:Transform/>
<Position X="0" Y="0" Z="-0.313012958"/>
</c:Transform>
</Components> </Components>
<Children> <Children>
<Entity> <Entity name="RedSpawn">
<Components> <Components>
<c:Camera/> <c:Team>
<c:Listener/> <Team>
<Red/>
</Team>
</c:Team>
<c:PlayerSpawn/>
<c:Spawner>
<EntityFile>Schema/Entities/PlayerAssaultFallbackRed.xml</EntityFile>
</c:Spawner>
<c:Transform> <c:Transform>
<Position X="2.56531811" Y="0.637967348" Z="0.202344239"/> <Position X="0.300000012" Y="0.0270000007" Z="0"/>
<Orientation X="2.68780756" Y="1.36143553" Z="3.14159179"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>../assets/Models/Core/Tri.obj</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="2" Y="2" Z="0.200000003"/>
<Orientation X="2.70100021" Y="2.37000012" Z="0.266000003"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity> <Entity>
<Components> <Components>
<c:SpawnPoint/>
<c:Model> <c:Model>
<Resource>../assets/Models/Core/Tri.obj</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>
<Orientation X="0" Y="3.14159274" Z="4.71238899"/> <Position X="0.800000012" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultRed.mesh</Resource>
<Color A="1" B="0.0117647061" G="0" R="1"/>
</c:Model>
<c:Transform>
<Position X="-0.600000024" Y="0" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity> <Entity name="DirectionalLight">
<Components> <Components>
<c:AABB/> <c:SceneLight>
<c:Collidable/> <Gamma>0.5</Gamma>
<Exposure>4</Exposure>
</c:SceneLight>
<c:DirectionalLight/>
<c:Model> <c:Model>
<Resource>../assets/Models/Core/UnitCube.obj</Resource> <Resource>sModels/Widgets/Lights/DirectionalLightWidget.mesh</Resource>
</c:Model> </c:Model>
<c:Physics/>
<c:Transform> <c:Transform>
<Position X="-1.95333278" Y="0.296304941" Z="2.56487775"/> <Position X="-6.00145912" Y="1.42697716" Z="3.04144025"/>
<Orientation X="5.69400024" Y="841.179565" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="ObstacleCourse">
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Test/ObstacleCourse.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="BlueSpawn">
<Components>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:PlayerSpawn/>
<c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.300000012" Y="0.0270000007" Z="6.67400026"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
<Color A="1" B="1" G="0.254901975" R="0"/>
</c:Model>
<c:Transform>
<Position X="-0.600000024" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
<Color A="1" B="1" G="0.254901975" R="0"/>
</c:Model>
<c:Transform>
<Position X="0.800000012" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Arms">
<Components>
<c:Blend>
<Pose1>ActivateDeactive</Pose1>
<Pose2></Pose2>
</c:Blend>
<c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="1.30585015" Z="2.01450038"/>
</c:Transform>
</Components>
<Children>
<Entity name="ActivateDeactive">
<Components>
<c:Animation>
<AnimationName>ActivateDeactiveShieldF</AnimationName>
<Time>0.68323420867830964</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Weapon">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-0.0621522591" Y="-0.169021279" Z="-0.219918266"/>
<Orientation X="-0.709758997" Y="1.22785306" Z="-0.154755235"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
+49 -2
View File
@@ -2,7 +2,9 @@
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:Transform/> <c:Transform>
<Position X="0" Y="-0.872543275" Z="-2.49763942"/>
</c:Transform>
</Components> </Components>
<Children> <Children>
@@ -52,7 +54,10 @@
</Entity> </Entity>
<Entity name="DirectionalLight"> <Entity name="DirectionalLight">
<Components> <Components>
<c:SceneLight/> <c:SceneLight>
<Gamma>0.49999982118606567</Gamma>
<Exposure>2.5599997043609619</Exposure>
</c:SceneLight>
<c:DirectionalLight/> <c:DirectionalLight/>
<c:Model> <c:Model>
<Resource>sModels/Widgets/Lights/DirectionalLightWidget.mesh</Resource> <Resource>sModels/Widgets/Lights/DirectionalLightWidget.mesh</Resource>
@@ -118,6 +123,48 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="Arms">
<Components>
<c:Blend>
<Pose1>ActivateDeactive</Pose1>
<Pose2></Pose2>
</c:Blend>
<c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="1.30585015" Z="2.01450038"/>
</c:Transform>
</Components>
<Children>
<Entity name="ActivateDeactive">
<Components>
<c:Animation>
<AnimationName>ActivateDeactiveShieldF</AnimationName>
<Time>0.44649605185380015</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Weapon">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.00681143999" Y="-0.204994932" Z="-0.209244296"/>
<Orientation X="-0.581807375" Y="0.562133908" Z="-0.0719003305"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
File diff suppressed because it is too large Load Diff
+183 -439
View File
@@ -2,14 +2,11 @@
<Entity name="PlayerAssault" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="PlayerAssault" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:NetworkComponent/>
<c:AABB> <c:AABB>
<Origin X="0" Y="0.772000015" Z="0"/> <Origin X="0" Y="0.772000015" Z="0"/>
<Size X="1" Y="1.60000002" Z="1"/> <Size X="1" Y="1.60000002" Z="1"/>
</c:AABB> </c:AABB>
<c:AssaultWeapon> <c:AssaultWeapon/>
<FireCooldown>0.5</FireCooldown>
</c:AssaultWeapon>
<c:Team> <c:Team>
<Team> <Team>
<Blue/> <Blue/>
@@ -17,8 +14,14 @@
</c:Team> </c:Team>
<c:Collidable/> <c:Collidable/>
<c:DashAbility/> <c:DashAbility/>
<c:DefenderWeapon>
<Slot>
<Secondary/>
</Slot>
</c:DefenderWeapon>
<c:DoubleJump/> <c:DoubleJump/>
<c:Health/> <c:Health/>
<c:NetworkComponent/>
<c:Physics> <c:Physics>
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/> <Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
</c:Physics> </c:Physics>
@@ -460,7 +463,7 @@
<Color A="1" B="0.392156869" G="0.392156869" R="0.392156869"/> <Color A="1" B="0.392156869" G="0.392156869" R="0.392156869"/>
</c:Fill> </c:Fill>
<c:Sprite> <c:Sprite>
<DiffuseTexture>Textures/Icons/Abilities/Superman-01.png</DiffuseTexture> <DiffuseTexture>Textures\Icons\Abilities\Superman-01.png</DiffuseTexture>
<GlowMap></GlowMap> <GlowMap></GlowMap>
<DepthSort>false</DepthSort> <DepthSort>false</DepthSort>
<Color A="1" B="0.206628323" G="0.78039217" R="0.192802757"/> <Color A="1" B="0.206628323" G="0.78039217" R="0.192802757"/>
@@ -494,251 +497,35 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="Hands"> <Entity name="Weapons">
<Components> <Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
</c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="PrimaryAttachment"> <Entity name="PrimaryAttachment">
<Components> <Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon>
</c:WeaponAttachment>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultBlueView.xml</EntityFile> <EntityFile>Schema/Entities/WeaponAssaultBlueView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform>
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/>
</c:Transform>
</Components>
<Children>
<Entity name="AssaultWeapon">
<Components>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadEffect">
<Components>
<c:Transform/> <c:Transform/>
<c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon>
</c:WeaponAttachment>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00800000038" Y="0.0920000076" Z="-0.416000009"/>
<Orientation X="6.2760005" Y="0.00500000035" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:Transform>
<Position X="-0.0440000035" Y="0.136000007" Z="-0.119000003"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionText">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>PlayerAssault</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>320</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>PlayerAssault</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="SecondaryAttachment"> <Entity name="SecondaryAttachment">
<Components> <Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:WeaponAttachment>
<Weapon>SidearmWeapon</Weapon>
</c:WeaponAttachment>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile> <EntityFile>Schema/Entities/WeaponDefenderBlueView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform/>
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/> <c:WeaponAttachment>
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/> <Weapon>DefenderWeapon</Weapon>
</c:Transform> </c:WeaponAttachment>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="FinalBlend">
<Components>
<c:Blend>
<Pose1>BlendTreeAssaultWeapon</Pose1>
<Pose2>BlendTreeSecondaryWeapon</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="BlendTreeAssaultWeapon">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootRifleF</AnimationName>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeSecondaryWeapon">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
</Children> </Children>
@@ -762,16 +549,14 @@
</Entity> </Entity>
<Entity name="PlayerModel"> <Entity name="PlayerModel">
<Components> <Components>
<c:BlendAdditive> <c:BlendOverride>
<Adder>BlendTreeAim</Adder> <Master>BlendTreeUpper</Master>
<Receiver>BlendTreeAssault</Receiver> <Slave>BlendTreeLower</Slave>
</c:BlendAdditive> </c:BlendOverride>
<c:Shielded/> <c:Shielded/>
<c:HiddenForLocalPlayer/> <c:HiddenForLocalPlayer/>
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource> <Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
<Color A="1" B="1" G="1" R="1"/>
<Visible>true</Visible>
</c:Model> </c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -781,19 +566,19 @@
<c:BoneAttachment> <c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName> <BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment> </c:BoneAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.17052114" Y="1.03320956" Z="-0.224843055"/>
<Orientation X="-0.035638921" Y="-0.0872893855" Z="0.133119702"/>
</c:Transform>
<c:WeaponAttachment> <c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon> <Weapon>AssaultWeapon</Weapon>
<Person> <Person>
<ThirdPerson/> <ThirdPerson/>
</Person> </Person>
</c:WeaponAttachment> </c:WeaponAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.165396646" Y="1.14537966" Z="-0.206537575"/>
<Orientation X="0.484640986" Y="-0.00695174001" Z="0.0685098693"/>
</c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
@@ -802,72 +587,26 @@
<c:BoneAttachment> <c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName> <BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment> </c:BoneAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.17052114" Y="1.03320956" Z="-0.224843055"/>
<Orientation X="-0.035638921" Y="-0.0872893855" Z="0.133119702"/>
</c:Transform>
<c:WeaponAttachment> <c:WeaponAttachment>
<Weapon>SidearmWeapon</Weapon> <Weapon>SidearmWeapon</Weapon>
<Person> <Person>
<ThirdPerson/> <ThirdPerson/>
</Person> </Person>
</c:WeaponAttachment> </c:WeaponAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.165396646" Y="1.14537966" Z="-0.206537575"/>
<Orientation X="0.484640986" Y="-0.00695174001" Z="0.0685098693"/>
</c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="BlendTreeAim"> <Entity name="BlendTreeLower">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>AimPrimary</Pose1> <Pose1>MovementBlend</Pose1>
<Pose2>AimSecondary</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="AimSecondary">
<Components>
<c:Animation>
<AnimationName>AimSecWepA</AnimationName>
<Time>0.71143966913223267</Time>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AimPrimary">
<Components>
<c:Animation>
<AnimationName>AimRifleA</AnimationName>
<Time>0.71143966913223267</Time>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeAssault">
<Components>
<c:BlendOverride>
<Master>ReloadSwitchBlend</Master>
<Slave>FinalMovementBlend</Slave>
</c:BlendOverride>
<c:Transform/>
</Components>
<Children>
<Entity name="FinalMovementBlend">
<Components>
<c:Blend>
<Pose1>StandCrouchBlend</Pose1>
<Pose2>JumpDashBlend</Pose2> <Pose2>JumpDashBlend</Pose2>
<Weight>2.5146881298480398e-63</Weight> <Weight>2.5146881298480398e-63</Weight>
<SubTreeRoot>true</SubTreeRoot> <SubTreeRoot>true</SubTreeRoot>
@@ -875,7 +614,7 @@
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="StandCrouchBlend"> <Entity name="MovementBlend">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>StandMovement</Pose1> <Pose1>StandMovement</Pose1>
@@ -889,14 +628,14 @@
<Entity name="CrouchMovement"> <Entity name="CrouchMovement">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>MovementBlend</Pose1> <Pose1>DirectionBlend</Pose1>
<Pose2>Idle</Pose2> <Pose2>Idle</Pose2>
<Weight>1</Weight> <Weight>1</Weight>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="MovementBlend"> <Entity name="DirectionBlend">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>Walk</Pose1> <Pose1>Walk</Pose1>
@@ -920,8 +659,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeLeftF</AnimationName> <AnimationName>CrouchStrafeLeftF</AnimationName>
<Time>0.93215091236880454</Time> <Time>0.79179726223533642</Time>
<Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -932,8 +670,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeRightF</AnimationName> <AnimationName>CrouchStrafeRightF</AnimationName>
<Time>0.85947237431958712</Time> <Time>0.719118724186119</Time>
<Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -946,8 +683,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchWalkF</AnimationName> <AnimationName>CrouchWalkF</AnimationName>
<Time>0.63784635949699009</Time> <Time>0.49749270936352197</Time>
<Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -960,8 +696,8 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchF</AnimationName> <AnimationName>CrouchF</AnimationName>
<Time>0.99862473341677438</Time> <Time>1.1707202063102131</Time>
<Speed>1</Speed> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -972,14 +708,14 @@
<Entity name="StandMovement"> <Entity name="StandMovement">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>MovementBlend</Pose1> <Pose1>DirectionBlend</Pose1>
<Pose2>Idle</Pose2> <Pose2>Idle</Pose2>
<Weight>1</Weight> <Weight>1</Weight>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="MovementBlend"> <Entity name="DirectionBlend">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>RunWalkBlend</Pose1> <Pose1>RunWalkBlend</Pose1>
@@ -989,42 +725,6 @@
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="StrafeLRBlend">
<Components>
<c:Blend>
<Pose1>Left</Pose1>
<Pose2>Right</Pose2>
<Weight>0.033793529385008014</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Left">
<Components>
<c:Animation>
<AnimationName>StrafeLeftF</AnimationName>
<Time>0.32459360994030106</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Right">
<Components>
<c:Animation>
<AnimationName>StrafeRightF</AnimationName>
<Time>0.34810913982041569</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="RunWalkBlend"> <Entity name="RunWalkBlend">
<Components> <Components>
<c:Blend> <c:Blend>
@@ -1039,8 +739,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>WalkF</AnimationName> <AnimationName>WalkF</AnimationName>
<Time>0.14300098890676338</Time> <Time>0.0026473387732952602</Time>
<Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1051,8 +750,44 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>RunF</AnimationName> <AnimationName>RunF</AnimationName>
<Time>0.41501449293066628</Time> <Time>0.60179430680919843</Time>
<Speed>1</Speed> <Speed>2</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="StrafeLRBlend">
<Components>
<c:Blend>
<Pose1>Left</Pose1>
<Pose2>Right</Pose2>
<Weight>0.033793529385008014</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Left">
<Components>
<c:Animation>
<AnimationName>StrafeLeftF</AnimationName>
<Time>0.20450294221067544</Time>
<Speed>2</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Right">
<Components>
<c:Animation>
<AnimationName>StrafeRightF</AnimationName>
<Time>0.28191395104664174</Time>
<Speed>2</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1067,8 +802,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleF</AnimationName> <AnimationName>IdleF</AnimationName>
<Time>1.2585556863362655</Time> <Time>0.96819454985941356</Time>
<Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1095,7 +829,6 @@
<c:Animation> <c:Animation>
<AnimationName>JumpF</AnimationName> <AnimationName>JumpF</AnimationName>
<Time>0.5</Time> <Time>0.5</Time>
<Speed>1</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1127,7 +860,7 @@
<c:Animation> <c:Animation>
<AnimationName>DashForwardF</AnimationName> <AnimationName>DashForwardF</AnimationName>
<Time>1</Time> <Time>1</Time>
<Speed>2</Speed> <Speed>1.7999999523162842</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1139,7 +872,7 @@
<c:Animation> <c:Animation>
<AnimationName>DashBackwardF</AnimationName> <AnimationName>DashBackwardF</AnimationName>
<Time>1</Time> <Time>1</Time>
<Speed>2</Speed> <Speed>1.7999999523162842</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1158,24 +891,24 @@
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="DashLeft">
<Components>
<c:Animation>
<AnimationName>DashLeftF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashRight"> <Entity name="DashRight">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>DashRightF</AnimationName> <AnimationName>DashRightF</AnimationName>
<Time>1</Time> <Time>1</Time>
<Speed>2</Speed> <Speed>1.7999999523162842</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashLeft">
<Components>
<c:Animation>
<AnimationName>DashLeftF</AnimationName>
<Time>1</Time>
<Speed>1.7999999523162842</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1190,99 +923,97 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="ReloadSwitchBlend"> <Entity name="BlendTreeUpper">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>ReloadSwitch</Pose1> <Pose1>AssaultWeaponBlend</Pose1>
<Pose2>WeaponActionBlend</Pose2> <Pose2>SidearmWeapon</Pose2>
<Weight>1</Weight> <Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot> <SubTreeRoot>true</SubTreeRoot>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="ReloadSwitch"> <Entity name="AssaultWeaponBlend">
<Components>
<c:BlendAdditive>
<Adder>Aim</Adder>
<Receiver>WeaponBlend</Receiver>
</c:BlendAdditive>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponBlend">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>ActionBlend</Receiver>
</c:BlendAdditive>
<c:Transform/>
</Components>
<Children>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Reload">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ReloadSwitchU</AnimationName> <AnimationName>ReloadSwitchU</AnimationName>
<Time>0.00030848838797092881</Time> <Speed>0.5</Speed>
<Speed>1</Speed> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="WeaponActionBlend"> <Entity name="Fire">
<Components>
<c:Blend>
<Pose1>IdleBlend</Pose1>
<Pose2>ShootBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="IdleBlend">
<Components>
<c:Blend>
<Pose1>IdlePrimary</Pose1>
<Pose2>IdleSecondary</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="IdlePrimary">
<Components>
<c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName>
<Time>0.56722367394927176</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="IdleSecondary">
<Components>
<c:Animation>
<AnimationName>IdleSecWepU</AnimationName>
<Time>0.57074871423905904</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ShootBlend">
<Components>
<c:Blend>
<Pose1>ShootPrimary</Pose1>
<Pose2>ShootSecondary</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ShootPrimary">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ShootFastRifleU</AnimationName> <AnimationName>ShootFastRifleU</AnimationName>
<Time>0.12914212153428517</Time> <Loop>false</Loop>
<Speed>1</Speed>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="ShootSecondary"> </Children>
</Entity>
<Entity name="MovementBlend2">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ShootSecWepFastU</AnimationName> <AnimationName>IdleAssaultRifleU</AnimationName>
<Time>1.6337870249215687</Time>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName>
<Time>1.6337870249215687</Time>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -1292,6 +1023,19 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="Aim">
<Components>
<c:Animation>
<AnimationName>AimRifleA</AnimationName>
<Time>0.5</Time>
<Speed>0.10000000149011612</Speed>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children> </Children>
</Entity> </Entity>
</Children> </Children>
@@ -1328,12 +1072,12 @@
<Entity name="PlayerName"> <Entity name="PlayerName">
<Components> <Components>
<c:Text> <c:Text>
<Content>Insert name here</Content> <Content></Content>
<Resource>Fonts/DroidSans.ttf,100</Resource> <Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/> <Color A="1" B="0" G="1" R="0"/>
</c:Text> </c:Text>
<c:Transform> <c:Transform>
<Position X="0.100000001" Y="1.50176644" Z="-0.248000011"/> <Position X="0" Y="1.64533126" Z="-0.0171071123"/>
<Orientation X="0" Y="3.14199996" Z="0"/> <Orientation X="0" Y="3.14199996" Z="0"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/> <Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
</c:Transform> </c:Transform>
@@ -1,699 +0,0 @@
<?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:NetworkComponent/>
<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>
<Entity name="ShiftAbility">
<Components>
<c:AbilityCooldownHUD/>
<c:Fill>
<Color A="1" B="0.392156869" G="0.392156869" R="0.392156869"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0.224999994" Y="0.00400000019" Z="0"/>
<Scale X="0.27700001" Y="0.190000013" Z="1"/>
</c:Transform>
</Components>
<Children>
<Entity name="Cooldown">
<Components>
<c:Text>
<Content>0.0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.146000013" Y="0.00900000054" Z="0.0560000017"/>
<Orientation X="0" Y="0" Z="1.57099998"/>
<Scale X="0.515000045" Y="0.704000056" Z="0.431000024"/>
</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.294117659" 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/WeaponAssaultBlueView.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/WeaponAssaultBlueWorld.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>
<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,699 +0,0 @@
<?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:NetworkComponent/>
<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>
<Red/>
</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>
<Entity name="ShiftAbility">
<Components>
<c:AbilityCooldownHUD/>
<c:Fill>
<Color A="1" B="0.392156869" G="0.392156869" R="0.392156869"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0.224999994" Y="0.00400000019" Z="0"/>
<Scale X="0.27700001" Y="0.190000013" Z="1"/>
</c:Transform>
</Components>
<Children>
<Entity name="Cooldown">
<Components>
<c:Text>
<Content>0.0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.146000013" Y="0.00900000054" Z="0.0560000017"/>
<Orientation X="0" Y="0" Z="1.57099998"/>
<Scale X="0.515000045" Y="0.704000056" Z="0.431000024"/>
</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>
<Red/>
</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="0.0431372561" G="0.0509803928" R="0.87843138"/>
</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/WeaponAssaultRedView.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/AssaultRed.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/WeaponAssaultRedWorld.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>
<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>
File diff suppressed because it is too large Load Diff
@@ -1,20 +1,20 @@
<?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="ReloadEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:Lifetime> <c:Lifetime>
<Lifetime>2</Lifetime> <Lifetime>1</Lifetime>
</c:Lifetime> </c:Lifetime>
<c:ExplosionEffect> <c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance> <Velocity X="0" Y="1" Z="0"/>
<Velocity X="3.33300018" Y="0.0320000015" Z="0"/> <ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
<ExplosionOrigin X="0" Y="0.0790000036" Z="-0.329000026"/> <ExplosionDuration>1</ExplosionDuration>
<ExponentialAccelaration>true</ExponentialAccelaration> <EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<EndColor A="0" B="19.6078434" G="19.6078434" R="1"/>
<Randomness>true</Randomness> <Randomness>true</Randomness>
</c:ExplosionEffect> </c:ExplosionEffect>
<c:Model> <c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource> <Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model> </c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
+1 -1
View File
@@ -36,7 +36,7 @@
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture> <DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground> <BlurBackground>true</BlurBackground>
<GlowMap></GlowMap> <GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/> <Color A="0.196078435" B="0" G="0" R="0"/>
</c:Sprite> </c:Sprite>
<c:Transform> <c:Transform>
<Scale X="0.300000012" Y="0.5" Z="1"/> <Scale X="0.300000012" Y="0.5" Z="1"/>
+273
View File
@@ -0,0 +1,273 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="ShootingRange" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform>
<Position X="0" Y="0.736272275" Z="-10.0567217"/>
</c:Transform>
</Components>
<Children>
<Entity name="TargetBoard">
<Components>
<c:Transform>
<Position X="-2" Y="0" Z="0"/>
<Orientation X="1.5" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="1" Y="0.100000001" Z="1"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.850000024" Y="1.10000002" Z="0.850000024"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="0.800000012" Y="1.10000002" Z="0.800000012"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.699999988" Y="1.10000002" Z="0.699999988"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="0.600000024" Y="1.10000002" Z="0.600000024"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0.00392156886" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.200000003" Y="1.10000002" Z="0.200000003"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="TargetBoard">
<Components>
<c:Transform>
<Orientation X="1.5" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="1" Y="0.100000001" Z="1"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.850000024" Y="1.10000002" Z="0.850000024"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="0.800000012" Y="1.10000002" Z="0.800000012"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.699999988" Y="1.10000002" Z="0.699999988"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="0.600000024" Y="1.10000002" Z="0.600000024"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0.00392156886" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.200000003" Y="1.10000002" Z="0.200000003"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="TargetBoard">
<Components>
<c:Transform>
<Position X="2" Y="0" Z="0"/>
<Orientation X="1.5" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="1" Y="0.100000001" Z="1"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.850000024" Y="1.10000002" Z="0.850000024"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="0.800000012" Y="1.10000002" Z="0.800000012"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.699999988" Y="1.10000002" Z="0.699999988"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
</c:Model>
<c:Transform>
<Scale X="0.600000024" Y="1.10000002" Z="0.600000024"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
<Color A="1" B="0" G="0.00392156886" R="1"/>
</c:Model>
<c:Transform>
<Scale X="0.200000003" Y="1.10000002" Z="0.200000003"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,528 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="PlayerModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>BlendTreeAim</Adder>
<Receiver>BlendTreeAssault</Receiver>
</c:BlendAdditive>
<c:Shielded/>
<c:HiddenForLocalPlayer/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
<Color A="1" B="1" G="0.25" 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>
<Person>
<ThirdPerson/>
</Person>
</c:WeaponAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.158476353" Y="1.07276821" Z="-0.235679001"/>
<Orientation X="0.150311232" Y="-0.0436343439" Z="0.10047026"/>
</c:Transform>
</Components>
<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.158476353" Y="1.07276821" Z="-0.235679001"/>
<Orientation X="0.150311232" Y="-0.0436343439" Z="0.10047026"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BlendTreeAim">
<Components>
<c:Blend>
<Pose1>AimPrimary</Pose1>
<Pose2>AimSecondary</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="AimSecondary">
<Components>
<c:Animation>
<AnimationName>AimSecWepA</AnimationName>
<Time>0.57222229242324829</Time>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AimPrimary">
<Components>
<c:Animation>
<AnimationName>AimRifleA</AnimationName>
<Time>0.57222229242324829</Time>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeAssault">
<Components>
<c:BlendOverride>
<Master>ReloadSwitchBlend</Master>
<Slave>FinalMovementBlend</Slave>
</c:BlendOverride>
<c:Transform/>
</Components>
<Children>
<Entity name="FinalMovementBlend">
<Components>
<c:Blend>
<Pose1>StandCrouchBlend</Pose1>
<Pose2>JumpDashBlend</Pose2>
<Weight>2.5146881298480398e-63</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="StandCrouchBlend">
<Components>
<c:Blend>
<Pose1>StandMovement</Pose1>
<Pose2>CrouchMovement</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="CrouchMovement">
<Components>
<c:Blend>
<Pose1>MovementBlend</Pose1>
<Pose2>Idle</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Walk</Pose1>
<Pose2>StrafeLRBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="StrafeLRBlend">
<Components>
<c:Blend>
<Pose1>Left</Pose1>
<Pose2>Right</Pose2>
<Weight>0.033793529385008014</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Left">
<Components>
<c:Animation>
<AnimationName>CrouchStrafeLeftF</AnimationName>
<Time>0.37873000664436773</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Right">
<Components>
<c:Animation>
<AnimationName>CrouchStrafeRightF</AnimationName>
<Time>0.30605146859515031</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Walk">
<Components>
<c:Animation>
<AnimationName>CrouchWalkF</AnimationName>
<Time>0.084425453772553283</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>CrouchF</AnimationName>
<Time>0.99862473341677438</Time>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="StandMovement">
<Components>
<c:Blend>
<Pose1>MovementBlend</Pose1>
<Pose2>Idle</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>RunWalkBlend</Pose1>
<Pose2>StrafeLRBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="RunWalkBlend">
<Components>
<c:Blend>
<Pose1>Walk</Pose1>
<Pose2>Run</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Walk">
<Components>
<c:Animation>
<AnimationName>WalkF</AnimationName>
<Time>0.58958008318232658</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.45938030142915665</Time>
<Play>true</Play>
<Reverse>true</Reverse>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="StrafeLRBlend">
<Components>
<c:Blend>
<Pose1>Left</Pose1>
<Pose2>Right</Pose2>
<Weight>0.033793529385008014</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Left">
<Components>
<c:Animation>
<AnimationName>StrafeLeftF</AnimationName>
<Time>0.77117270421586426</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Right">
<Components>
<c:Animation>
<AnimationName>StrafeRightF</AnimationName>
<Time>0.79468823409597888</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>1.8384679867885865</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="JumpDashBlend">
<Components>
<c:Blend>
<Pose1>Jump</Pose1>
<Pose2>DashBlend</Pose2>
<Weight>1</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Jump">
<Components>
<c:Animation>
<AnimationName>JumpF</AnimationName>
<Time>0.5</Time>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashBlend">
<Components>
<c:Blend>
<Pose1>DashFBBlend</Pose1>
<Pose2>DashLRBlend</Pose2>
<Weight>0.014621149736541383</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="DashFBBlend">
<Components>
<c:Blend>
<Pose1>DashForward</Pose1>
<Pose2>DashBackward</Pose2>
<Weight>0.014363533804961248</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="DashForward">
<Components>
<c:Animation>
<AnimationName>DashForwardF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashBackward">
<Components>
<c:Animation>
<AnimationName>DashBackwardF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="DashLRBlend">
<Components>
<c:Blend>
<Pose1>DashLeft</Pose1>
<Pose2>DashRight</Pose2>
<Weight>4.3244885367500671e-16</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="DashLeft">
<Components>
<c:Animation>
<AnimationName>DashLeftF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashRight">
<Components>
<c:Animation>
<AnimationName>DashRightF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ReloadSwitchBlend">
<Components>
<c:Blend>
<Pose1>ReloadSwitch</Pose1>
<Pose2>WeaponActionBlend</Pose2>
<Weight>1</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadSwitch">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchU</AnimationName>
<Time>0.00030848838797092881</Time>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="WeaponActionBlend">
<Components>
<c:Blend>
<Pose1>IdleBlend</Pose1>
<Pose2>ShootBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="IdleBlend">
<Components>
<c:Blend>
<Pose1>IdlePrimary</Pose1>
<Pose2>IdleSecondary</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="IdlePrimary">
<Components>
<c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName>
<Time>1.0138027682248349</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="IdleSecondary">
<Components>
<c:Animation>
<AnimationName>IdleSecWepU</AnimationName>
<Time>1.0173278085146222</Time>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ShootBlend">
<Components>
<c:Blend>
<Pose1>ShootPrimary</Pose1>
<Pose2>ShootSecondary</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ShootPrimary">
<Components>
<c:Animation>
<AnimationName>ShootFastRifleU</AnimationName>
<Time>0.12914212153428517</Time>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ShootSecondary">
<Components>
<c:Animation>
<AnimationName>ShootSecWepFastU</AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -1,13 +1,100 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>ActionBlend</Receiver>
</c:BlendAdditive>
<c:Model> <c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource> <Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
</c:Model> </c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Speed>0.5</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootRifleF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdelF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ViewModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
<Orientation X="0.0102804415" Y="-0.00312523148" Z="0.0428143665"/>
</c:Transform>
</Components>
<Children> <Children>
<Entity name="WeaponMuzzle"> <Entity name="WeaponMuzzle">
<Components> <Components>
@@ -21,24 +108,32 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="FirstPersonReloadSpawner"> <Entity name="ReloadSpawner">
<Components> <Components>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile> <EntityFile>Schema/Entities/WeaponAssaultReloadEffectView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="AmmunitionHUD"> </Children>
</Entity>
<Entity name="AmmoHUD">
<Components> <Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
<ScaleOffset X="0.5" Y="0.5" Z="1"/>
<InheritScale>true</InheritScale>
</c:BoneAttachment>
<c:Transform> <c:Transform>
<Position X="-0.0440000035" Y="0.136000007" Z="-0.119000003"/> <Position X="0.0540266186" Y="-0.0954354703" Z="-0.255526125"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/> <Orientation X="0.000778362213" Y="0.0774229616" Z="0.00124316185"/>
<Scale X="0.25000003" Y="0.250000238" Z="0.500000417"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="AmmunitionHUDBackground"> <Entity name="Background">
<Components> <Components>
<c:Sprite> <c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture> <DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
@@ -52,7 +147,7 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="AmmunitionText"> <Entity name="Text">
<Components> <Components>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -65,7 +160,7 @@
<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> <c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName> <ParentEntityName></ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType> <ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field> <Field>MagazineAmmo</Field>
</c:TextFieldReader> </c:TextFieldReader>
@@ -83,7 +178,7 @@
<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> <c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName> <ParentEntityName></ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType> <ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field> <Field>Ammo</Field>
</c:TextFieldReader> </c:TextFieldReader>
@@ -98,12 +193,6 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="ReloadEffect">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children> </Children>
</Entity> </Entity>
@@ -20,7 +20,7 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="ThirdPersonReloadSpawner"> <Entity name="ReloadSpawner">
<Components> <Components>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile> <EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00800000038" Y="0.0920000076" Z="-0.416000009"/>
<Orientation X="6.2760005" Y="0.00500000035" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:Transform>
<Position X="-0.0440000035" Y="0.136000007" Z="-0.119000003"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionText">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>320</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ReloadEffect">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ThirdPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="ReloadEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>2</Lifetime>
</c:Lifetime>
<c:Transform/>
</Components>
<Children>
<Entity name="Out">
<Components>
<c:ExplosionEffect>
<Velocity X="0" Y="1" Z="0"/>
<ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
<TimeSinceDeath>1</TimeSinceDeath>
<Delay>1</Delay>
<Speed>-1</Speed>
<ExplosionDuration>1</ExplosionDuration>
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="In">
<Components>
<c:Lifetime>
<Lifetime>1</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<Velocity X="0" Y="1" Z="0"/>
<ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
<ExplosionDuration>1</ExplosionDuration>
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -1,13 +1,164 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="DefenderWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model> <c:Model>
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource> <Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model> </c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children>
<Entity name="FinalBlend">
<Components>
<c:Blend>
<Pose1>ActionBlend</Pose1>
<Pose2>Shield</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Shield">
<Components>
<c:Animation>
<AnimationName>ActivateDeactivateShieldF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>ReloadBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ReloadBlend">
<Components>
<c:Blend>
<Pose1>ReloadLoop</Pose1>
<Pose2>ReloadTransitionBlend</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadLoop">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadTwoF</AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ReloadTransitionBlend">
<Components>
<c:Blend>
<Pose1>ReloadStart</Pose1>
<Pose2>ReloadEnd</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadStart">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadOneF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ReloadEnd">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadThreeF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ViewModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.120748043" Y="-0.228436321" Z="-0.151475549"/>
<Orientation X="0.0104044285" Y="-0.00268185162" Z="0.0428444184"/>
</c:Transform>
</Components>
<Children> <Children>
<Entity name="WeaponMuzzle"> <Entity name="WeaponMuzzle">
<Components> <Components>
@@ -20,7 +171,7 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="FirstPersonReloadSpawner"> <Entity name="ReloadSpawner">
<Components> <Components>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile> <EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
@@ -29,15 +180,22 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="AmmunitionHUD"> </Children>
</Entity>
<Entity name="AmmoHUD">
<Components> <Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
<InheritScale>true</InheritScale>
</c:BoneAttachment>
<c:Transform> <c:Transform>
<Position X="-0.0460000038" Y="0.119000003" Z="-0.162"/> <Position X="0.0540262833" Y="-0.0954347998" Z="-0.225546911"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/> <Orientation X="0.000683821447" Y="0.0774240941" Z="-1.56960988"/>
<Scale X="0.500000179" Y="0.500000179" Z="0.499999911"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="AmmunitionHUDBackground"> <Entity name="Background">
<Components> <Components>
<c:Sprite> <c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture> <DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
@@ -51,38 +209,20 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="AmmunitionText"> <Entity name="Text">
<Components> <Components>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>8</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>DefenderWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo"> <Entity name="Ammo">
<Components> <Components>
<c:Text> <c:Text>
<Content>64</Content> <Content>38</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> <c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName> <ParentEntityName></ParentEntityName>
<ComponentType>DefenderWeapon</ComponentType> <ComponentType>DefenderWeapon</ComponentType>
<Field>Ammo</Field> <Field>Ammo</Field>
</c:TextFieldReader> </c:TextFieldReader>
@@ -93,6 +233,24 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>5</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName></ParentEntityName>
<ComponentType>DefenderWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children> </Children>
</Entity> </Entity>
</Children> </Children>
File diff suppressed because it is too large Load Diff
-265
View File
@@ -1,265 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:AABB/>
<c:Collidable/>
<c:Model>
<Resource>models/core/unitcube.mesh</Resource>
<Color A="1" B="0.980392158" G="1" R="1"/>
</c:Model>
<c:Transform>
<Position X="-0.100000001" Y="0" Z="0"/>
<Scale X="50" Y="1" Z="51.1000023"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:Collidable/>
<c:Model>
<Resource>models/core/unitcube.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Position X="-14.500001" Y="1.50000012" Z="16.9222012"/>
<Scale X="14.4000006" Y="5.30000019" Z="4.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:DirectionalLight/>
<c:Transform>
<Orientation X="4.38500023" Y="0" Z="0.458000034"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:Collidable/>
<c:Model>
<Resource>models/core/unitcube.mesh</Resource>
<Color A="1" B="1" G="0" R="0"/>
</c:Model>
<c:Transform>
<Position X="-14.500001" Y="1.50000012" Z="-17.6888409"/>
<Scale X="14.4000006" Y="5.30000019" Z="4.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:Collidable/>
<c:Model>
<Resource>models/core/unitcube.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform>
<Position X="12.1000004" Y="1.50000012" Z="16.9222012"/>
<Scale X="14.4000006" Y="5.30000019" Z="4.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:Collidable/>
<c:Model>
<Resource>models/core/unitcube.mesh</Resource>
<Color A="1" B="1" G="0" R="0"/>
</c:Model>
<c:Transform>
<Position X="12.1228638" Y="1.50000012" Z="-17.9642811"/>
<Scale X="14.4000006" Y="5.30000019" Z="4.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:PlayerSpawn/>
<c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform>
<Position X="-20.6000004" Y="1" Z="21.7150002"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:PlayerSpawn/>
<c:Transform>
<Position X="-12.2000008" Y="1" Z="21.5000019"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Transform>
<Position X="15.4000006" Y="1" Z="21.6000004"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform>
<Position X="10.500001" Y="0" Z="21.9000015"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity>
<Components>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:PlayerSpawn/>
<c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform>
<Position X="-9.70000076" Y="1" Z="-23.4000015"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform>
<Position X="-18.8000011" Y="1" Z="-22.3000011"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform>
<Position X="8.10000038" Y="1" Z="-23.2000008"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:SpawnPoint/>
<c:Transform>
<Position X="16.2000008" Y="1" Z="-23.2000008"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity>
<Components>
<c:Model>
<Resource>models/core/unitcube.mesh</Resource>
<Color A="1" B="39.2156868" G="0" R="3.13725495"/>
</c:Model>
<c:Transform>
<Scale X="-70" Y="-70" Z="-70"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:CapturePoint>
<CaptureTimer>-15</CaptureTimer>
<HomePointForTeam>
<Blue/>
</HomePointForTeam>
</c:CapturePoint>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:Trigger/>
<c:Model>
<Resource>Models\Core\UnitCube.mesh</Resource>
<Color A="0.300000012" B="1" G="0" R="0"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0" Y="0.773066521" Z="-18.975975"/>
<Scale X="4.9000001" Y="0.600000024" Z="3.50000024"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AABB/>
<c:CapturePoint>
<CaptureTimer>15</CaptureTimer>
<HomePointForTeam>
<Red/>
</HomePointForTeam>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePoint>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:Trigger/>
<c:Model>
<Resource>Models\Core\UnitCube.mesh</Resource>
<Color A="0.300000012" B="0" G="0" R="1"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0" Y="0.452868998" Z="18.5607414"/>
<Scale X="4.60000038" Y="0.900000036" Z="4.10000038"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
-23
View File
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Test" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BoneAttachment>
<ScaleOffset X="0.200000003" Y="0.200000003" Z="0.200000003"/>
<Name>L_Foot</Name>
<InheritScale>true</InheritScale>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="1" B="1" G="19.6078434" R="1"/>
</c:Model>
<c:Transform>
<Position X="-0.0863945931" Y="0.221357167" Z="-0.0781617165"/>
<Scale X="0.199999973" Y="0.199999973" Z="0.199999973"/>
<Orientation X="-2.80262542" Y="0.0150706368" Z="-3.13294244"/>
</c:Transform>
</Components>
<Children/>
</Entity>
-145
View File
@@ -1,145 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AnimationTests" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:SceneLight>
<Gamma>0.30000001192092896</Gamma>
<Exposure>3</Exposure>
</c:SceneLight>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:Transform>
<Position X="0.100000001" Y="-1.5150001" Z="-3.70500016"/>
<Orientation X="0" Y="2.41300011" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:DirectionalLight>
<Intensity>0</Intensity>
</c:DirectionalLight>
<c:Model>
<Resource>Models/Widgets/Lights/DirectionalLightWidget.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="2.42800021" Z="-2.80000019"/>
<Orientation X="5.60000038" Y="3.14159203" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light">
<Components>
<c:PointLight>
<Color A="1" B="0.70588237" G="0.70588237" R="1"/>
<Radius>8</Radius>
<Intensity>0.60000002384185791</Intensity>
</c:PointLight>
<c:Transform>
<Position X="1.32209361" Y="1.37392569" Z="-0.0505663045"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Assault">
<Components>
<c:BlendAdditive>
<Adder></Adder>
<Receiver></Receiver>
</c:BlendAdditive>
<c:Model>
<GlowIntensity>5</GlowIntensity>
<Resource>Models/Characters/Defender/DefenderBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponAttachment">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Scale X="1.00000012" Y="1" Z="1.00000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AimBlend">
<Components>
<c:Blend>
<Pose1>AimPrimary</Pose1>
<Pose2>AimSecondary</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="AimPrimary">
<Components>
<c:Animation>
<AnimationName></AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AimSecondary">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="Plane">
<Components>
<c:Model>
<Resource>Models/Core/UnitPlane.mesh</Resource>
</c:Model>
<c:Transform>
<Scale X="5" Y="1" Z="5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light">
<Components>
<c:PointLight>
<Color A="1" B="0.956862748" G="0.960784316" R="0.819607854"/>
<Radius>8</Radius>
<Intensity>0.60000002384185791</Intensity>
</c:PointLight>
<c:Transform>
<Position X="-1.36898434" Y="1.37392569" Z="0.620898128"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light">
<Components>
<c:PointLight>
<Radius>8</Radius>
<Intensity>0.80000001192092896</Intensity>
</c:PointLight>
<c:Transform>
<Position X="-0.127636135" Y="1.37392569" Z="-1.52101767"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
+2 -4
View File
@@ -1,8 +1,6 @@
#version 430 #version 430
uniform mat4 M; uniform mat4 PVM;
uniform mat4 V;
uniform mat4 P;
layout(location = 0) in vec3 Position; layout(location = 0) in vec3 Position;
layout(location = 5) in vec4 BoneIndices; layout(location = 5) in vec4 BoneIndices;
@@ -15,7 +13,7 @@ out VertexData{
void main() void main()
{ {
gl_Position = P * V * M * vec4(Position, 1.0); gl_Position = PVM * vec4(Position, 1.0);
Output.Position = Position; Output.Position = Position;
} }
@@ -1,8 +1,6 @@
#version 430 #version 430
uniform mat4 M; uniform mat4 PVM;
uniform mat4 V;
uniform mat4 P;
uniform mat4 Bones[100]; uniform mat4 Bones[100];
@@ -27,7 +25,7 @@ void main()
+ BoneWeights[3] * Bones[int(BoneIndices[3])]; + BoneWeights[3] * Bones[int(BoneIndices[3])];
} }
gl_Position = P*V*M*boneTransform * vec4(Position, 1.0); gl_Position = PVM*boneTransform * vec4(Position, 1.0);
Output.Position = vec3(0.0); Output.Position = vec3(0.0);
} }
+4 -2
View File
@@ -2,6 +2,7 @@
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
uniform mat4 VM;
uniform mat4 M; uniform mat4 M;
uniform mat4 V; uniform mat4 V;
uniform mat4 P; uniform mat4 P;
@@ -11,7 +12,7 @@ uniform vec2 ScreenDimensions;
uniform vec4 FillColor; uniform vec4 FillColor;
uniform vec4 AmbientColor; uniform vec4 AmbientColor;
uniform float FillPercentage; uniform float FillPercentage;
uniform float GlowIntensity = 10; uniform float GlowIntensity;
uniform vec3 CameraPosition; uniform vec3 CameraPosition;
uniform int SSAOQuality; uniform int SSAOQuality;
@@ -131,7 +132,7 @@ void main()
vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat); vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat);
vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat); vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat);
vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat); vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat);
vec4 position = V * M * vec4(Input.Position, 1.0); vec4 position = VM * vec4(Input.Position, 1.0);
vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture); vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture);
normal = normalize(normal); normal = normalize(normal);
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0)); //vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
@@ -182,6 +183,7 @@ void main()
color_result += FillColor; color_result += FillColor;
} }
sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1)); sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1));
//sceneColor = CommonUniforms.testColour;
//sceneColor = vec4(reflectionColor.xyz, 1); //sceneColor = vec4(reflectionColor.xyz, 1);
color_result.xyz += glowTexel.xyz*GlowIntensity; color_result.xyz += glowTexel.xyz*GlowIntensity;
+4 -3
View File
@@ -1,5 +1,6 @@
#version 430 #version 430
uniform mat4 PVM;
uniform mat4 TIM;
uniform mat4 M; uniform mat4 M;
uniform mat4 V; uniform mat4 V;
uniform mat4 P; uniform mat4 P;
@@ -22,8 +23,8 @@ out VertexData{
void main() void main()
{ {
gl_Position = P*V*M * vec4(Position, 1.0); gl_Position = PVM * vec4(Position, 1.0);
mat4 TIM = transpose(inverse(M)); //mat4 TIM = transpose(inverse(M));
Output.Position = Position; Output.Position = Position;
Output.TextureCoordinate = TextureCoords; Output.TextureCoordinate = TextureCoords;
Output.Normal = vec3(TIM * vec4(Normal, 0.0)); Output.Normal = vec3(TIM * vec4(Normal, 0.0));
@@ -2,6 +2,7 @@
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
uniform mat4 VM;
uniform mat4 M; uniform mat4 M;
uniform mat4 V; uniform mat4 V;
uniform mat4 P; uniform mat4 P;
@@ -11,7 +12,7 @@ uniform vec2 ScreenDimensions;
uniform vec4 FillColor; uniform vec4 FillColor;
uniform vec4 AmbientColor; uniform vec4 AmbientColor;
uniform float FillPercentage; uniform float FillPercentage;
uniform float GlowIntensity = 10; uniform float GlowIntensity;
uniform vec3 CameraPosition; uniform vec3 CameraPosition;
uniform int SSAOQuality; uniform int SSAOQuality;
@@ -138,7 +139,7 @@ void main()
vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat); vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat);
vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat); vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat);
vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat); vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat);
vec4 position = V * M * vec4(Input.Position, 1.0); vec4 position = VM * vec4(Input.Position, 1.0);
vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture); vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture);
normal = normalize(normal); normal = normalize(normal);
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0)); //vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
@@ -1,5 +1,7 @@
#version 430 #version 430
uniform mat4 PVM;
uniform mat4 TIM;
uniform mat4 M; uniform mat4 M;
uniform mat4 V; uniform mat4 V;
uniform mat4 P; uniform mat4 P;
@@ -34,7 +36,7 @@ void main()
+ BoneWeights[3] * Bones[int(BoneIndices[3])]; + BoneWeights[3] * Bones[int(BoneIndices[3])];
} }
gl_Position = P*V*M*boneTransform * vec4(Position, 1.0); gl_Position = PVM*boneTransform * vec4(Position, 1.0);
Output.Position = (boneTransform * vec4(Position, 1.0)).xyz; Output.Position = (boneTransform * vec4(Position, 1.0)).xyz;
Output.TextureCoordinate = TextureCoords; Output.TextureCoordinate = TextureCoords;
@@ -2,6 +2,7 @@
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
uniform mat4 VM;
uniform mat4 M; uniform mat4 M;
uniform mat4 V; uniform mat4 V;
uniform mat4 P; uniform mat4 P;
@@ -189,7 +190,7 @@ void main()
GlowUVRepeat1, GlowUVRepeat2, GlowUVRepeat3); GlowUVRepeat1, GlowUVRepeat2, GlowUVRepeat3);
vec4 specularTexel = CalcBlendedTexel(splatTexel, SpecularMapTexture1, SpecularMapTexture2, SpecularMapTexture3, vec4 specularTexel = CalcBlendedTexel(splatTexel, SpecularMapTexture1, SpecularMapTexture2, SpecularMapTexture3,
SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3); SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3);
vec4 position = V * M * vec4(Input.Position, 1.0); vec4 position = VM * vec4(Input.Position, 1.0);
//vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture); //vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture);
vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3, vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3,
NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3); NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3);
@@ -2,6 +2,7 @@
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
uniform mat4 VM;
uniform mat4 M; uniform mat4 M;
uniform mat4 V; uniform mat4 V;
uniform mat4 P; uniform mat4 P;
@@ -190,7 +191,7 @@ void main()
GlowUVRepeat1, GlowUVRepeat2, GlowUVRepeat3); GlowUVRepeat1, GlowUVRepeat2, GlowUVRepeat3);
vec4 specularTexel = CalcBlendedTexel(splatTexel, SpecularMapTexture1, SpecularMapTexture2, SpecularMapTexture3, vec4 specularTexel = CalcBlendedTexel(splatTexel, SpecularMapTexture1, SpecularMapTexture2, SpecularMapTexture3,
SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3); SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3);
vec4 position = V * M * vec4(Input.Position, 1.0); vec4 position = VM * vec4(Input.Position, 1.0);
//vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture); //vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture);
vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3, vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3,
NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3); NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3);
+2 -5
View File
@@ -1,8 +1,5 @@
#version 430 #version 430
uniform mat4 PVM;
uniform mat4 M;
uniform mat4 V;
uniform mat4 P;
layout(location = 0) in vec3 Position; layout(location = 0) in vec3 Position;
layout(location = 1) in vec3 Normal; layout(location = 1) in vec3 Normal;
@@ -16,6 +13,6 @@ out VertexData{
void main() void main()
{ {
gl_Position = P*V*M * vec4(Position, 1.0); gl_Position = PVM * vec4(Position, 1.0);
Output.Position = Position, 1.0; Output.Position = Position, 1.0;
} }
+2 -5
View File
@@ -1,8 +1,5 @@
#version 430 #version 430
uniform mat4 PVM;
uniform mat4 M;
uniform mat4 V;
uniform mat4 P;
uniform mat4 Bones[100]; uniform mat4 Bones[100];
layout(location = 0) in vec3 Position; layout(location = 0) in vec3 Position;
@@ -27,6 +24,6 @@ void main()
+ BoneWeights[3] * Bones[int(BoneIndices[3])]; + BoneWeights[3] * Bones[int(BoneIndices[3])];
} }
gl_Position = P*V*M*boneTransform * vec4(Position, 1.0); gl_Position = PVM*boneTransform * vec4(Position, 1.0);
Output.Position = (boneTransform * vec4(Position, 1.0)).xyz; Output.Position = (boneTransform * vec4(Position, 1.0)).xyz;
} }
-2
View File
@@ -3,8 +3,6 @@
uniform vec4 Color; uniform vec4 Color;
uniform vec4 FillColor; uniform vec4 FillColor;
uniform float FillPercentage; uniform float FillPercentage;
uniform mat4 M;
uniform mat4 V;
uniform mat4 P; uniform mat4 P;
layout (binding = 1) uniform sampler2D DiffuseTexture; layout (binding = 1) uniform sampler2D DiffuseTexture;
+2 -4
View File
@@ -1,8 +1,6 @@
#version 430 #version 430
uniform mat4 M; uniform mat4 PVM;
uniform mat4 V;
uniform mat4 P;
layout(location = 0) in vec3 Position; layout(location = 0) in vec3 Position;
layout(location = 1) in vec3 Normal; layout(location = 1) in vec3 Normal;
@@ -17,7 +15,7 @@ out VertexData{
void main() void main()
{ {
gl_Position = P * V * M * vec4(Position, 1.0); gl_Position = PVM* vec4(Position, 1.0);
Output.Position = Position; Output.Position = Position;
Output.TextureCoordinate = TextureCoords; Output.TextureCoordinate = TextureCoords;
@@ -0,0 +1,6 @@
vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textureCoordinate, sampler2D normalMap)
{
mat3 TBN = mat3(tangent, bitangent, normal);
vec3 NormalMap = texture(normalMap, textureCoordinate).xyz * 2.0 - vec3(1.0);
return vec4(TBN * normalize(NormalMap), 0.0);
}
+1 -1
View File
@@ -3,7 +3,7 @@
const EntityWrapper EntityWrapper::Invalid = EntityWrapper(nullptr, EntityID_Invalid); const EntityWrapper EntityWrapper::Invalid = EntityWrapper(nullptr, EntityID_Invalid);
const std::string EntityWrapper::Name() const std::string EntityWrapper::Name() const
{ {
return World->GetName(ID); return World->GetName(ID);
} }
+5 -1
View File
@@ -45,7 +45,7 @@ void InputProxy::Update(double dt)
} }
} }
void InputProxy::Process() void InputProxy::Process(bool suppressNewEvents /*= false*/)
{ {
for (auto& pair : m_CommandHandlers) { for (auto& pair : m_CommandHandlers) {
const std::string& command = pair.first; const std::string& command = pair.first;
@@ -62,8 +62,10 @@ void InputProxy::Process()
e.PlayerID = -1; e.PlayerID = -1;
e.Command = command; e.Command = command;
e.Value = currentValue; e.Value = currentValue;
if (!suppressNewEvents || e.Value == 0) {
m_EventBroker->Publish(e); m_EventBroker->Publish(e);
//LOG_DEBUG("Input: Published command %s=%f for player %i", e.Command.c_str(), e.Value, e.PlayerID); //LOG_DEBUG("Input: Published command %s=%f for player %i", e.Command.c_str(), e.Value, e.PlayerID);
}
m_LastCommandValues[command] = currentValue; m_LastCommandValues[command] = currentValue;
} }
} }
@@ -78,9 +80,11 @@ void InputProxy::Process()
e.Value += value; e.Value += value;
} }
//e.Value = std::max(-1.f, std::min(e.Value, 1.f)); //e.Value = std::max(-1.f, std::min(e.Value, 1.f));
if (!suppressNewEvents || e.Value == 0) {
m_EventBroker->Publish(e); m_EventBroker->Publish(e);
//LOG_DEBUG("Input: Published command %s=%f for player %i", e.Command.c_str(), e.Value, e.PlayerID); //LOG_DEBUG("Input: Published command %s=%f for player %i", e.Command.c_str(), e.Value, e.PlayerID);
} }
}
m_CommandQueue.clear(); m_CommandQueue.clear();
} }
+41 -1
View File
@@ -35,6 +35,7 @@ void Client::Connect(std::string address, int port)
EVENT_SUBSCRIBE_MEMBER(m_EDoubleJump, &Client::OnDoubleJump); EVENT_SUBSCRIBE_MEMBER(m_EDoubleJump, &Client::OnDoubleJump);
EVENT_SUBSCRIBE_MEMBER(m_EDashAbility, &Client::OnDashAbility); EVENT_SUBSCRIBE_MEMBER(m_EDashAbility, &Client::OnDashAbility);
EVENT_SUBSCRIBE_MEMBER(m_ESearchForServers, &Client::OnSearchForServers); EVENT_SUBSCRIBE_MEMBER(m_ESearchForServers, &Client::OnSearchForServers);
EVENT_SUBSCRIBE_MEMBER(m_EConnectRequest, &Client::OnConnectRequest);
auto config = ResourceManager::Load<ConfigFile>("Config.ini"); auto config = ResourceManager::Load<ConfigFile>("Config.ini");
m_Address = address; m_Address = address;
if (address.empty()) { if (address.empty()) {
@@ -456,12 +457,14 @@ void Client::parseSnapshot(Packet& packet)
void Client::disconnect() void Client::disconnect()
{ {
removeWorld();
m_IsConnected = false; m_IsConnected = false;
m_PreviousPacketID = 0; m_PreviousPacketID = 0;
m_PacketID = 0; m_PacketID = 0;
Packet packet(MessageType::Disconnect, m_SendPacketID); Packet packet(MessageType::Disconnect, m_SendPacketID);
m_Reliable.Send(packet); m_Reliable.Send(packet);
m_Reliable.Disconnect(); m_Reliable.Disconnect();
createMainMenu();
} }
bool Client::OnInputCommand(const Events::InputCommand & e) bool Client::OnInputCommand(const Events::InputCommand & e)
@@ -472,7 +475,7 @@ bool Client::OnInputCommand(const Events::InputCommand & e)
if (e.Command == "ConnectToServer") { // Connect for now if (e.Command == "ConnectToServer") { // Connect for now
if (e.Value > 0) { if (e.Value > 0) {
m_Reliable.Connect(m_PlayerName, m_Address, m_Port); //m_Reliable.Connect(m_PlayerName, m_Address, m_Port);
// m_Unreliable.Connect(m_PlayerName, m_Address, m_Port); // m_Unreliable.Connect(m_PlayerName, m_Address, m_Port);
} }
//LOG_DEBUG("Client::OnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID); //LOG_DEBUG("Client::OnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID);
@@ -545,6 +548,23 @@ bool Client::OnDashAbility(const Events::DashAbility& e)
return true; return true;
} }
bool Client::OnConnectRequest(const Events::ConnectRequest& e)
{
removeWorld();
if (m_Reliable.Connect(m_PlayerName, e.IP, e.Port)) {
// The client sent a successful connect message
return true;
} else {
// The client could not send a successful connect message
createMainMenu();
// Load the main menu again ?
return false;
}
return false;
}
bool Client::OnSearchForServers(const Events::SearchForServers& e) bool Client::OnSearchForServers(const Events::SearchForServers& e)
{ {
m_SearchingForServers = true; m_SearchingForServers = true;
@@ -671,6 +691,26 @@ void Client::displayServerlist()
} }
} }
void Client::removeWorld()
{
std::vector<EntityID> childrenToBeDeleted;
auto rootEntites = m_World->GetDirectChildren(EntityID_Invalid);
for (auto it = rootEntites.first; it != rootEntites.second; it++) {
childrenToBeDeleted.push_back(it->second);
}
for (int i = 0; i < childrenToBeDeleted.size(); ++i) {
m_World->DeleteEntity(childrenToBeDeleted[i]);
}
}
void Client::createMainMenu()
{
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/StartMenu.xml");
entityFile->MergeInto(m_World);
}
bool Client::clientServerMapsHasEntity(EntityID clientEntityID) bool Client::clientServerMapsHasEntity(EntityID clientEntityID)
{ {
if (m_ClientIDToServerID.find(clientEntityID) != m_ClientIDToServerID.end()) { if (m_ClientIDToServerID.find(clientEntityID) != m_ClientIDToServerID.end()) {
+3 -1
View File
@@ -7,6 +7,8 @@ Server::Server(World* world, EventBroker* eventBroker, int port)
ConfigFile* config = ResourceManager::Load<ConfigFile>("Config.ini"); ConfigFile* config = ResourceManager::Load<ConfigFile>("Config.ini");
snapshotInterval = 1000 * config->Get<float>("Networking.SnapshotInterval", 0.05f); snapshotInterval = 1000 * config->Get<float>("Networking.SnapshotInterval", 0.05f);
pingIntervalMs = config->Get<float>("Networking.PingIntervalMs", 1000); pingIntervalMs = config->Get<float>("Networking.PingIntervalMs", 1000);
m_ServerName = config->Get<std::string>("Networking.Name", "Unnamed");
// Subscribe to events // Subscribe to events
EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &Server::OnInputCommand); EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &Server::OnInputCommand);
EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &Server::OnPlayerSpawned); EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &Server::OnPlayerSpawned);
@@ -410,7 +412,7 @@ void Server::parseServerlistRequest(boost::asio::ip::udp::endpoint endpoint)
Packet packet(MessageType::ServerlistRequest); Packet packet(MessageType::ServerlistRequest);
packet.WriteString(m_Reliable.Address()); packet.WriteString(m_Reliable.Address());
packet.WritePrimitive<int>(m_Reliable.Port()); packet.WritePrimitive<int>(m_Reliable.Port());
packet.WriteString("SERVERNAME"); packet.WriteString(m_ServerName);
packet.WritePrimitive<int>(m_ConnectedPlayers.size()); packet.WritePrimitive<int>(m_ConnectedPlayers.size());
m_ServerlistRequest.Send(packet); m_ServerlistRequest.Send(packet);
} }
+4 -1
View File
@@ -10,7 +10,7 @@ TCPClient::~TCPClient()
{ {
} }
void TCPClient::Connect(std::string playerName, std::string address, int port) bool TCPClient::Connect(std::string playerName, std::string address, int port)
{ {
if (m_Socket) { if (m_Socket) {
if (m_IsConnected) { if (m_IsConnected) {
@@ -19,6 +19,7 @@ void TCPClient::Connect(std::string playerName, std::string address, int port)
Send(packet); Send(packet);
LOG_INFO("Connect message sent again!"); LOG_INFO("Connect message sent again!");
} }
return true;
} }
else if (!m_IsConnected) { else if (!m_IsConnected) {
boost::system::error_code error = boost::asio::error::host_not_found; boost::system::error_code error = boost::asio::error::host_not_found;
@@ -34,11 +35,13 @@ void TCPClient::Connect(std::string playerName, std::string address, int port)
packet.WriteString(playerName); packet.WriteString(playerName);
Send(packet); Send(packet);
LOG_INFO("Connect message sent!"); LOG_INFO("Connect message sent!");
return true;
} }
// If error // If error
else { else {
m_Socket->close(); m_Socket->close();
m_Socket = nullptr; m_Socket = nullptr;
return false;
} }
} }
} }
+3 -2
View File
@@ -10,14 +10,15 @@ UDPClient::~UDPClient()
{ {
} }
void UDPClient::Connect(std::string playerName, std::string address, int port) bool UDPClient::Connect(std::string playerName, std::string address, int port)
{ {
if (m_Socket) { if (m_Socket) {
return; return false;
} }
m_ReceiverEndpoint = udp::endpoint(boost::asio::ip::address().from_string(address), port); m_ReceiverEndpoint = udp::endpoint(boost::asio::ip::address().from_string(address), port);
m_Socket = boost::shared_ptr<boost::asio::ip::udp::socket>(new boost::asio::ip::udp::socket(m_IOService)); m_Socket = boost::shared_ptr<boost::asio::ip::udp::socket>(new boost::asio::ip::udp::socket(m_IOService));
m_Socket->open(boost::asio::ip::udp::v4()); m_Socket->open(boost::asio::ip::udp::v4());
return true;
} }
void UDPClient::Disconnect() void UDPClient::Disconnect()
+143 -17
View File
@@ -4,6 +4,8 @@ AnimationSystem::AnimationSystem(SystemParams params)
: System(params) : System(params)
{ {
EVENT_SUBSCRIBE_MEMBER(m_EAutoAnimationBlend, &AnimationSystem::OnAutoAnimationBlend); EVENT_SUBSCRIBE_MEMBER(m_EAutoAnimationBlend, &AnimationSystem::OnAutoAnimationBlend);
EVENT_SUBSCRIBE_MEMBER(m_EEntityDeleted, &AnimationSystem::OnEntityDeleted);
EVENT_SUBSCRIBE_MEMBER(m_ESetBlendWeight, &AnimationSystem::OnSetBlendWeight);
} }
void AnimationSystem::Update(double dt) void AnimationSystem::Update(double dt)
@@ -122,16 +124,16 @@ void AnimationSystem::UpdateAnimations(double dt)
} }
} }
void AnimationSystem::UpdateWeights(double dt) void AnimationSystem::UpdateWeights(double dt)
{ {
for (auto& autoBlendQueue : m_AutoBlendQueues) { for (auto it = m_AutoBlendQueues.begin(); it != m_AutoBlendQueues.end(); ) {
LOG_INFO("%s", it->first.Name().c_str());
if(autoBlendQueue.second.HasActiveBlendJob()) { it->second.PrintQueue();
AutoBlendQueue::AutoBlendJob& blendJob = autoBlendQueue.second.GetActiveBlendJob();
std::shared_ptr<BlendTree> blendTree = autoBlendQueue.second.GetBlendTree();
if(it->second.HasActiveBlendJob()) {
AutoBlendQueue::AutoBlendJob& blendJob = it->second.GetActiveBlendJob();
LOG_INFO("%s", blendJob.RootNode.Name().c_str());
std::shared_ptr<BlendTree> blendTree = it->second.GetBlendTree();
if (blendTree != nullptr) { if (blendTree != nullptr) {
if (blendJob.Duration != 0.0) { if (blendJob.Duration != 0.0) {
blendJob.BlendInfo.progress = glm::clamp(blendJob.CurrentTime / blendJob.Duration, 0.0, 1.0); blendJob.BlendInfo.progress = glm::clamp(blendJob.CurrentTime / blendJob.Duration, 0.0, 1.0);
@@ -140,10 +142,17 @@ void AnimationSystem::UpdateWeights(double dt)
} }
blendJob.BlendInfo = blendTree->AutoBlendStep(blendJob.BlendInfo); blendJob.BlendInfo = blendTree->AutoBlendStep(blendJob.BlendInfo);
} else {
it = m_AutoBlendQueues.erase(it);
}
it++;
} else {
if (it->second.Empty()) {
it = m_AutoBlendQueues.erase(it);
} else {
it++;
} }
} }
} }
} }
@@ -177,9 +186,11 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
return false; return false;
} }
EntityWrapper subTreeRoot;
EntityWrapper subTreeRoot = blendTree->GetSubTreeRoot(e.NodeName); if (e.SingleLevelBlend) {
subTreeRoot = blendTree->GetSubTreeRoot(e.NodeName);
if (!subTreeRoot.Valid()) { if (!subTreeRoot.Valid()) {
return false; return false;
@@ -198,19 +209,20 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
abj.BlendInfo.SingleBlend = e.SingleLevelBlend; abj.BlendInfo.SingleBlend = e.SingleLevelBlend;
abj.BlendInfo.Weight = e.Weight; abj.BlendInfo.Weight = e.Weight;
EntityWrapper nodeEntity = subTreeRoot.FirstChildByName(e.NodeName); // more than one std::vector<EntityWrapper> animationEntities = blendTree->GetEntitesByName(e.NodeName); // more than one
if (nodeEntity.Valid()) { for(auto entity : animationEntities)
if (nodeEntity.HasComponent("Animation")) { if (entity.Valid()) {
const Skeleton::Animation* animation = skeleton->GetAnimation(nodeEntity["Animation"]["AnimationName"]); if (entity.HasComponent("Animation")) {
(bool&)nodeEntity["Animation"]["Reverse"] = e.Reverse; const Skeleton::Animation* animation = skeleton->GetAnimation(entity["Animation"]["AnimationName"]);
(bool&)entity["Animation"]["Reverse"] = e.Reverse;
if (e.Restart) { if (e.Restart) {
if (animation != nullptr) { if (animation != nullptr) {
if (e.Restart) { if (e.Restart) {
if (e.Reverse) { if (e.Reverse) {
(double&)nodeEntity["Animation"]["Time"] = animation->Duration; (double&)entity["Animation"]["Time"] = animation->Duration;
} else { } else {
(double&)nodeEntity["Animation"]["Time"] = 0.0; (double&)entity["Animation"]["Time"] = 0.0;
} }
} }
} }
@@ -218,5 +230,119 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
} }
} }
m_AutoBlendQueues[subTreeRoot].Insert(abj); m_AutoBlendQueues[subTreeRoot].Insert(abj);
} else {
std::vector<EntityWrapper> subtreeroots = blendTree->GetSingleLevelRoots(e.NodeName);
for(auto entity : subtreeroots) {
subTreeRoot = entity;
if (!subTreeRoot.Valid()) {
return false;
}
AutoBlendQueue::AutoBlendJob abj;
abj.AnimationEntity = e.AnimationEntity;
abj.CurrentTime = 0.0;
abj.Delay = e.Delay;
abj.Duration = e.Duration;
abj.RootNode = e.RootNode;
abj.BlendInfo.NodeName = e.NodeName;
abj.BlendInfo.progress = 0.0;
abj.BlendInfo.Start = e.Start;
abj.BlendInfo.SingleBlend = e.SingleLevelBlend;
abj.BlendInfo.Weight = e.Weight;
m_AutoBlendQueues[subTreeRoot].Insert(abj);
}
std::vector<EntityWrapper> animationEntities = blendTree->GetEntitesByName(e.NodeName); // more than one
for (auto entity : animationEntities)
if (entity.Valid()) {
if (entity.HasComponent("Animation")) {
const Skeleton::Animation* animation = skeleton->GetAnimation(entity["Animation"]["AnimationName"]);
(bool&)entity["Animation"]["Reverse"] = e.Reverse;
if (e.Restart) {
if (animation != nullptr) {
if (e.Restart) {
if (e.Reverse) {
(double&)entity["Animation"]["Time"] = animation->Duration;
} else {
(double&)entity["Animation"]["Time"] = 0.0;
}
}
}
}
}
}
}
return true; return true;
} }
bool AnimationSystem::OnEntityDeleted(Events::EntityDeleted& e)
{
EntityWrapper entity = EntityWrapper(m_World, e.DeletedEntity);
if (entity.HasComponent("Model")) {
Model* model;
try {
model = ResourceManager::Load<::Model, true>(entity["Model"]["Resource"]);
} catch (const std::exception&) {
return false;
}
Skeleton* skeleton = model->m_RawModel->m_Skeleton;
if (skeleton == nullptr) {
return false;
}
if (skeleton->BlendTrees.find(entity) != skeleton->BlendTrees.end()) {
skeleton->BlendTrees.erase(entity);
}
}
}
bool AnimationSystem::OnSetBlendWeight(Events::SetBlendWeight& e)
{
if (!e.RootNode.Valid()) {
return false;
}
if (!e.RootNode.HasComponent("Model")) {
return false;
}
Model* model;
try {
model = ResourceManager::Load<::Model, true>((std::string)e.RootNode["Model"]["Resource"]);
} catch (const std::exception&) {
return false;
}
Skeleton* skeleton = model->m_RawModel->m_Skeleton;
if (skeleton == nullptr) {
return false;
}
std::shared_ptr<BlendTree> blendTree;
if (skeleton->BlendTrees.find(e.RootNode) != skeleton->BlendTrees.end()) {
blendTree = skeleton->BlendTrees.at(e.RootNode);
} else {
return false;
}
if(e.Weight >= 0 && e.Weight <= 1) {
blendTree->SetWeightByName(e.NodeName, e.Weight);
return true;
} else {
return false;
}
}
+7 -5
View File
@@ -38,11 +38,14 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob)
double animationSpeed = (double)autoBlendJob.AnimationEntity["Animation"]["Speed"]; double animationSpeed = (double)autoBlendJob.AnimationEntity["Animation"]["Speed"];
double animationTime = (double)autoBlendJob.AnimationEntity["Animation"]["Time"]; double animationTime = (double)autoBlendJob.AnimationEntity["Animation"]["Time"];
if (animationSpeed != 0) {
if ((bool)autoBlendJob.AnimationEntity["Animation"]["Reverse"]) { if ((bool)autoBlendJob.AnimationEntity["Animation"]["Reverse"]) {
AnimationDuration = (animation->Duration * animationSpeed) - (animation->Duration - animationTime); AnimationDuration = (animation->Duration / animationSpeed) - (animation->Duration - animationTime);
} else { } else {
AnimationDuration = (animation->Duration * animationSpeed) - animationTime; AnimationDuration = (animation->Duration / animationSpeed) - animationTime;
}
} else {
return;
} }
blendNode.StartTime += AnimationDuration; blendNode.StartTime += AnimationDuration;
@@ -75,7 +78,6 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob)
} }
} }
m_BlendQueue.clear(); m_BlendQueue.clear();
m_BlendQueue.push_back(blendNode); m_BlendQueue.push_back(blendNode);
} }
@@ -124,7 +126,7 @@ bool AutoBlendQueue::HasActiveBlendJob()
try { try {
model = ResourceManager::Load<::Model, true>(blendJob.RootNode["Model"]["Resource"]); model = ResourceManager::Load<::Model, true>(blendJob.RootNode["Model"]["Resource"]);
} catch (const std::exception&) { } catch (const std::exception&) {
m_BlendQueue.pop_front(); //m_BlendQueue.pop_front();
return HasActiveBlendJob(); return HasActiveBlendJob();
} }
+53 -6
View File
@@ -2,11 +2,8 @@
BlendTree::BlendTree(EntityWrapper ModelEntity, Skeleton* skeleton) BlendTree::BlendTree(EntityWrapper ModelEntity, Skeleton* skeleton)
{ {
m_Skeleton = skeleton; m_Skeleton = skeleton;
if (ModelEntity.HasComponent("Animation")) { if (ModelEntity.HasComponent("Animation")) {
const Skeleton::Animation* animation = skeleton->GetAnimation(ModelEntity["Animation"]["AnimationName"]); const Skeleton::Animation* animation = skeleton->GetAnimation(ModelEntity["Animation"]["AnimationName"]);
if (animation == nullptr) { if (animation == nullptr) {
@@ -217,7 +214,6 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo)
} }
} }
} }
return blendInfo; return blendInfo;
} }
@@ -270,7 +266,7 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo)
currentNode = currentNode->Parent; currentNode = currentNode->Parent;
if (blendInfo.SingleBlend) { if (blendInfo.SingleBlend) {
break; return blendInfo;;
} }
} }
} else if(goalNodes.size() >= 2) { } else if(goalNodes.size() >= 2) {
@@ -331,9 +327,11 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo)
lastNode = currentNode; lastNode = currentNode;
currentNode = currentNode->Parent; currentNode = currentNode->Parent;
if (blendInfo.SingleBlend) {
return blendInfo;
}
} }
} }
} }
return blendInfo; return blendInfo;
@@ -427,6 +425,55 @@ EntityWrapper BlendTree::GetSubTreeRoot(std::string nodeName)
return subTreeRoots.front()->Entity; return subTreeRoots.front()->Entity;
} }
std::vector<EntityWrapper> BlendTree::GetSingleLevelRoots(std::string name)
{
std::vector<Node*> nodes = FindNodesByName(name);
std::vector<EntityWrapper> entities;
for (auto it = nodes.begin(); it != nodes.end(); it++) {
Node* currentNode = (*it)->Parent;
if(currentNode->Entity.Valid()) {
entities.push_back(currentNode->Entity);
}
}
return entities;
}
std::vector<EntityWrapper> BlendTree::GetEntitesByName(std::string name)
{
std::vector<Node*> nodes = FindNodesByName(name);
std::vector<EntityWrapper> entities;
for (auto it = nodes.begin(); it != nodes.end(); it++) {
Node* currentNode = (*it);
if (currentNode->Entity.Valid()) {
entities.push_back(currentNode->Entity);
}
}
return entities;
}
void BlendTree::SetWeightByName(std::string name, double weight)
{
std::vector<Node*> nodes = FindNodesByName(name);
for (auto node : nodes) {
EntityWrapper entity = node->Entity;
if(entity.HasComponent("Blend")) {
entity["Blend"]["Weight"] = weight;
node->Weight = weight;
}
}
}
void BlendTree::Blend(std::map<int, Skeleton::PoseData>& pose) void BlendTree::Blend(std::map<int, Skeleton::PoseData>& pose)
{ {
Node* currentNode; Node* currentNode;
+1 -1
View File
@@ -10,7 +10,7 @@ BlurHUD::BlurHUD(IRenderer* renderer)
void BlurHUD::InitializeTextures() void BlurHUD::InitializeTextures()
{ {
m_BlackTexture = CommonFunctions::LoadTexture("Textures/Core/Black.png", false); m_BlackTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/Black.png");
m_ScreenQuad = ResourceManager::Load<Model>("Models/Core/ScreenQuad.mesh"); m_ScreenQuad = ResourceManager::Load<Model>("Models/Core/ScreenQuad.mesh");
} }
@@ -50,13 +50,15 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp
glm::vec4 perspective; glm::vec4 perspective;
glm::decompose(boneTransform, scale, rotation, translation, skew, perspective); glm::decompose(boneTransform, scale, rotation, translation, skew, perspective);
glm::vec3 angles = glm::vec3(-glm::pitch(rotation), -glm::yaw(rotation), -glm::roll(rotation)); rotation = glm::quat((glm::vec3)entity["BoneAttachment"]["OrientationOffset"]) * rotation;
rotation = glm::inverse(rotation);
glm::vec3 angles = glm::eulerAngles(rotation);
if ((bool)entity["BoneAttachment"]["InheritPosition"]) { if ((bool)entity["BoneAttachment"]["InheritPosition"]) {
(glm::vec3&)entity["Transform"]["Position"] = translation + (glm::vec3)entity["BoneAttachment"]["PositionOffset"]; (glm::vec3&)entity["Transform"]["Position"] = translation + (glm::vec3)entity["BoneAttachment"]["PositionOffset"];
} }
if ((bool)entity["BoneAttachment"]["InheritOrientation"]) { if ((bool)entity["BoneAttachment"]["InheritOrientation"]) {
(glm::vec3&)entity["Transform"]["Orientation"] = angles + (glm::vec3)entity["BoneAttachment"]["OrientationOffset"]; (glm::vec3&)entity["Transform"]["Orientation"] = angles;
} }
if ((bool)entity["BoneAttachment"]["InheritScale"]) { if ((bool)entity["BoneAttachment"]["InheritScale"]) {
(glm::vec3&)entity["Transform"]["Scale"] = scale * (glm::vec3)entity["BoneAttachment"]["ScaleOffset"]; (glm::vec3&)entity["Transform"]["Scale"] = scale * (glm::vec3)entity["BoneAttachment"]["ScaleOffset"];
+6 -1
View File
@@ -9,9 +9,14 @@ DrawBloomPass::DrawBloomPass(IRenderer* renderer, ConfigFile* config)
ChangeQuality(m_Config->Get<int>("GLOW.Quality", 2)); ChangeQuality(m_Config->Get<int>("GLOW.Quality", 2));
} }
DrawBloomPass::~DrawBloomPass() {
CommonFunctions::DeleteTexture(&m_GaussianTexture_horiz);
CommonFunctions::DeleteTexture(&m_GaussianTexture_vert);
}
void DrawBloomPass::InitializeTextures() void DrawBloomPass::InitializeTextures()
{ {
m_BlackTexture = CommonFunctions::LoadTexture("Textures/Core/Black.png", false); m_BlackTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/Black.png");
} }
void DrawBloomPass::ChangeQuality(int quality) void DrawBloomPass::ChangeQuality(int quality)
+295 -60
View File
@@ -12,13 +12,21 @@ DrawFinalPass::DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCulling
InitializeFrameBuffers(); InitializeFrameBuffers();
} }
DrawFinalPass::~DrawFinalPass(){
CommonFunctions::DeleteTexture(&m_BloomTexture);
CommonFunctions::DeleteTexture(&m_SceneTexture);
CommonFunctions::DeleteTexture(&m_DepthBuffer);
CommonFunctions::DeleteTexture(&m_ShieldBuffer);
CommonFunctions::DeleteTexture(&m_CubeMapTexture);
}
void DrawFinalPass::InitializeTextures() void DrawFinalPass::InitializeTextures()
{ {
m_WhiteTexture = CommonFunctions::LoadTexture("Textures/Core/White.png", false); m_WhiteTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/White.png");
m_BlackTexture = CommonFunctions::LoadTexture("Textures/Core/Black.png", false); m_BlackTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/Black.png");
m_NeutralNormalTexture = CommonFunctions::LoadTexture("Textures/Core/NeutralNormalMap.png", false); m_NeutralNormalTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/NeutralNormalMap.png");
m_GreyTexture = CommonFunctions::LoadTexture("Textures/Core/Grey.png", false); m_GreyTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/Grey.png");
m_ErrorTexture = CommonFunctions::LoadTexture("Textures/Core/ErrorTexture.png", false); m_ErrorTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/ErrorTexture.png");
} }
void DrawFinalPass::InitializeFrameBuffers() void DrawFinalPass::InitializeFrameBuffers()
@@ -351,6 +359,8 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
GLuint explosionSkinnedHandle = m_ExplosionEffectSkinnedProgram->GetHandle(); GLuint explosionSkinnedHandle = m_ExplosionEffectSkinnedProgram->GetHandle();
GLuint explosionSplatMapSkinnedHandle = m_ExplosionEffectSplatMapSkinnedProgram->GetHandle(); GLuint explosionSplatMapSkinnedHandle = m_ExplosionEffectSplatMapSkinnedProgram->GetHandle();
GLuint forwardSplatMapSkinnedHandle = m_ForwardPlusSplatMapSkinnedProgram->GetHandle(); GLuint forwardSplatMapSkinnedHandle = m_ForwardPlusSplatMapSkinnedProgram->GetHandle();
GLuint lastShader = 0;
unsigned int lastModel = 0;
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, m_LightCullingPass->LightSSBO()); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, m_LightCullingPass->LightSSBO());
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, m_LightCullingPass->LightGridSSBO()); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, m_LightCullingPass->LightGridSSBO());
@@ -367,9 +377,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
if (explosionEffectJob->Model->IsSkinned()) { if (explosionEffectJob->Model->IsSkinned()) {
if (lastShader != m_ExplosionEffectSkinnedProgram->GetHandle()) {
m_ExplosionEffectSkinnedProgram->Bind(); m_ExplosionEffectSkinnedProgram->Bind();
lastShader = m_ExplosionEffectSkinnedProgram->GetHandle();
GLERROR("Bind ExplosionEffectSkinned program"); GLERROR("Bind ExplosionEffectSkinned program");
glUniform1i(glGetUniformLocation(explosionSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSkinned Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -389,8 +407,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
} }
else { else {
if (lastShader != m_ExplosionEffectProgram->GetHandle()) {
m_ExplosionEffectProgram->Bind(); m_ExplosionEffectProgram->Bind();
lastShader = m_ExplosionEffectProgram->GetHandle();
GLERROR("Bind ExplosionEffect program"); GLERROR("Bind ExplosionEffect program");
glUniform1i(glGetUniformLocation(explosionHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffect Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -404,8 +431,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
if (explosionEffectJob->Model->IsSkinned()) { if (explosionEffectJob->Model->IsSkinned()) {
if (lastShader != m_ExplosionEffectSplatMapSkinnedProgram->GetHandle()) {
m_ExplosionEffectSplatMapSkinnedProgram->Bind(); m_ExplosionEffectSplatMapSkinnedProgram->Bind();
lastShader = m_ExplosionEffectSplatMapSkinnedProgram->GetHandle();
GLERROR("Bind ExplosionEffectSplatMapSkinned program"); GLERROR("Bind ExplosionEffectSplatMapSkinned program");
glUniform1i(glGetUniformLocation(explosionSplatMapSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSplatMapSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSplatMapSkinned Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -421,9 +457,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
} }
else { else {
if (lastShader != m_ExplosionEffectSplatMapProgram->GetHandle()) {
m_ExplosionEffectSplatMapProgram->Bind(); m_ExplosionEffectSplatMapProgram->Bind();
lastShader = m_ExplosionEffectSplatMapProgram->GetHandle();
GLERROR("Bind ExplosionEffectSplatMap program"); GLERROR("Bind ExplosionEffectSplatMap program");
//bind uniforms glUniform1i(glGetUniformLocation(explosionSplatMapHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSplatMapHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSplatMapHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -436,8 +480,11 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);
//draw //draw
if (lastModel != explosionEffectJob->ModelID) {
glBindVertexArray(explosionEffectJob->Model->VAO); glBindVertexArray(explosionEffectJob->Model->VAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, explosionEffectJob->Model->ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, explosionEffectJob->Model->ElementBuffer);
lastModel = explosionEffectJob->ModelID;
}
glDrawElements(GL_TRIANGLES, explosionEffectJob->EndIndex - explosionEffectJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(explosionEffectJob->StartIndex*sizeof(unsigned int))); glDrawElements(GL_TRIANGLES, explosionEffectJob->EndIndex - explosionEffectJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(explosionEffectJob->StartIndex*sizeof(unsigned int)));
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
GLERROR("explosion effect end"); GLERROR("explosion effect end");
@@ -451,8 +498,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_ForwardPlusSkinnedProgram->GetHandle()) {
m_ForwardPlusSkinnedProgram->Bind(); m_ForwardPlusSkinnedProgram->Bind();
GLERROR("Bind ForwardPlusSkinnedProgram"); lastShader = m_ForwardPlusSkinnedProgram->GetHandle();
GLERROR("Bind ForwardPlusSkinnedProgram program");
glUniform1i(glGetUniformLocation(forwardSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ForwardPlusSkinnedProgram Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSkinnedHandle, modelJob, scene); BindModelUniforms(forwardSkinnedHandle, modelJob, scene);
//bind textures //bind textures
@@ -470,8 +526,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
} }
else { else {
if (lastShader != m_ForwardPlusProgram->GetHandle()) {
m_ForwardPlusProgram->Bind(); m_ForwardPlusProgram->Bind();
GLERROR("Bind ForwardPlusProgram"); lastShader = m_ForwardPlusProgram->GetHandle();
GLERROR("Bind ForwardPlusProgram program");
glUniform1i(glGetUniformLocation(forwardHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ForwardPlusProgram Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardHandle, modelJob, scene); BindModelUniforms(forwardHandle, modelJob, scene);
//bind textures //bind textures
@@ -485,8 +550,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_ForwardPlusSplatMapSkinnedProgram->GetHandle()) {
m_ForwardPlusSplatMapSkinnedProgram->Bind(); m_ForwardPlusSplatMapSkinnedProgram->Bind();
GLERROR("Bind SplatMap program"); lastShader = m_ForwardPlusSplatMapSkinnedProgram->GetHandle();
GLERROR("Bind SkinnedSplatMapProgram program");
glUniform1i(glGetUniformLocation(forwardSplatMapSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSplatMapSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind SkinnedSplatMapProgram Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSplatMapSkinnedHandle, modelJob, scene); BindModelUniforms(forwardSplatMapSkinnedHandle, modelJob, scene);
//bind textures //bind textures
@@ -502,8 +576,17 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
} }
else { else {
if (lastShader != m_ForwardPlusSplatMapProgram->GetHandle()) {
m_ForwardPlusSplatMapProgram->Bind(); m_ForwardPlusSplatMapProgram->Bind();
lastShader = m_ForwardPlusSplatMapProgram->GetHandle();
GLERROR("Bind SplatMap program"); GLERROR("Bind SplatMap program");
glUniform1i(glGetUniformLocation(forwardSplatMapHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSplatMapHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSplatMapHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind SplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSplatMapHandle, modelJob, scene); BindModelUniforms(forwardSplatMapHandle, modelJob, scene);
//bind textures //bind textures
@@ -514,8 +597,11 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
} }
} }
//draw //draw
if (lastModel != modelJob->ModelID) {
glBindVertexArray(modelJob->Model->VAO); glBindVertexArray(modelJob->Model->VAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer);
lastModel = modelJob->ModelID;
}
glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex*sizeof(unsigned int))); glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex*sizeof(unsigned int)));
if (GLERROR("models end")) { if (GLERROR("models end")) {
continue; continue;
@@ -544,6 +630,8 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
GLuint explosionSkinnedShieldCheckHandle = m_ExplosionEffectSkinnedShieldCheckProgram->GetHandle(); GLuint explosionSkinnedShieldCheckHandle = m_ExplosionEffectSkinnedShieldCheckProgram->GetHandle();
GLuint explosionSplatMapSkinnedShieldCheckHandle = m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->GetHandle(); GLuint explosionSplatMapSkinnedShieldCheckHandle = m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->GetHandle();
GLuint forwardSplatMapSkinnedShieldCheckHandle = m_ForwardPlusSplatMapSkinnedShieldCheckProgram->GetHandle(); GLuint forwardSplatMapSkinnedShieldCheckHandle = m_ForwardPlusSplatMapSkinnedShieldCheckProgram->GetHandle();
GLuint lastShader = 0;
unsigned int lastModel = 0;
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, m_LightCullingPass->LightSSBO()); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, m_LightCullingPass->LightSSBO());
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, m_LightCullingPass->LightGridSSBO()); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, m_LightCullingPass->LightGridSSBO());
@@ -564,9 +652,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
if (explosionEffectJob->Model->IsSkinned()) { if (explosionEffectJob->Model->IsSkinned()) {
if (lastShader != m_ExplosionEffectSkinnedShieldCheckProgram->GetHandle()) {
m_ExplosionEffectSkinnedShieldCheckProgram->Bind(); m_ExplosionEffectSkinnedShieldCheckProgram->Bind();
lastShader = m_ExplosionEffectSkinnedShieldCheckProgram->GetHandle();
GLERROR("Bind ExplosionEffectSkinned program"); GLERROR("Bind ExplosionEffectSkinned program");
glUniform1i(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSkinned Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSkinnedShieldCheckHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSkinnedShieldCheckHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -585,8 +681,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
} }
else { else {
if (lastShader != m_ExplosionEffectShieldCheckProgram->GetHandle()) {
m_ExplosionEffectShieldCheckProgram->Bind(); m_ExplosionEffectShieldCheckProgram->Bind();
lastShader = m_ExplosionEffectShieldCheckProgram->GetHandle();
GLERROR("Bind ExplosionEffect program"); GLERROR("Bind ExplosionEffect program");
glUniform1i(glGetUniformLocation(explosionShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffect Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionShieldCheckHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionShieldCheckHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -601,8 +706,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
if (explosionEffectJob->Model->IsSkinned()) { if (explosionEffectJob->Model->IsSkinned()) {
if (lastShader != m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->GetHandle()) {
m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->Bind(); m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->Bind();
lastShader = m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->GetHandle();
GLERROR("Bind ExplosionEffectSplatMapSkinned program"); GLERROR("Bind ExplosionEffectSplatMapSkinned program");
glUniform1i(glGetUniformLocation(explosionSplatMapSkinnedShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSplatMapSkinnedShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSplatMapSkinnedShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSplatMapSkinned Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSplatMapSkinnedShieldCheckHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSplatMapSkinnedShieldCheckHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -619,9 +733,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
} }
else { else {
if (lastShader != m_ExplosionEffectSplatMapShieldCheckProgram->GetHandle()) {
m_ExplosionEffectSplatMapShieldCheckProgram->Bind(); m_ExplosionEffectSplatMapShieldCheckProgram->Bind();
lastShader = m_ExplosionEffectSplatMapShieldCheckProgram->GetHandle();
GLERROR("Bind ExplosionEffectSplatMap program"); GLERROR("Bind ExplosionEffectSplatMap program");
//bind uniforms glUniform1i(glGetUniformLocation(explosionSplatMapShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSplatMapShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSplatMapShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSplatMapShieldCheckHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSplatMapShieldCheckHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -637,9 +759,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
if (explosionEffectJob->Model->IsSkinned()) { if (explosionEffectJob->Model->IsSkinned()) {
if (lastShader != m_ExplosionEffectSkinnedProgram->GetHandle()) {
m_ExplosionEffectSkinnedProgram->Bind(); m_ExplosionEffectSkinnedProgram->Bind();
lastShader = m_ExplosionEffectSkinnedProgram->GetHandle();
GLERROR("Bind ExplosionEffectSkinned program"); GLERROR("Bind ExplosionEffectSkinned program");
glUniform1i(glGetUniformLocation(explosionSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSkinned Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -657,8 +787,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
} }
else { else {
if (lastShader != m_ExplosionEffectProgram->GetHandle()) {
m_ExplosionEffectProgram->Bind(); m_ExplosionEffectProgram->Bind();
lastShader = m_ExplosionEffectProgram->GetHandle();
GLERROR("Bind ExplosionEffect program"); GLERROR("Bind ExplosionEffect program");
glUniform1i(glGetUniformLocation(explosionHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffect Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -672,8 +811,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
if (explosionEffectJob->Model->IsSkinned()) { if (explosionEffectJob->Model->IsSkinned()) {
if (lastShader != m_ExplosionEffectSplatMapSkinnedProgram->GetHandle()) {
m_ExplosionEffectSplatMapSkinnedProgram->Bind(); m_ExplosionEffectSplatMapSkinnedProgram->Bind();
GLERROR("Bind ExplosionEffectSplatMapSkinned program"); lastShader = m_ExplosionEffectSplatMapSkinnedProgram->GetHandle();
GLERROR("Bind ExplosionEffectSkinnedSplatMap program");
glUniform1i(glGetUniformLocation(explosionSplatMapSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSplatMapSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSkinnedSplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -689,9 +837,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
} }
else { else {
if (lastShader != m_ExplosionEffectSplatMapProgram->GetHandle()) {
m_ExplosionEffectSplatMapProgram->Bind(); m_ExplosionEffectSplatMapProgram->Bind();
lastShader = m_ExplosionEffectSplatMapProgram->GetHandle();
GLERROR("Bind ExplosionEffectSplatMap program"); GLERROR("Bind ExplosionEffectSplatMap program");
//bind uniforms glUniform1i(glGetUniformLocation(explosionSplatMapHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(explosionSplatMapHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(explosionSplatMapHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ExplosionEffectSplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene); BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene);
//bind textures //bind textures
@@ -705,8 +861,11 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);
//draw //draw
if (lastModel != explosionEffectJob->ModelID) {
glBindVertexArray(explosionEffectJob->Model->VAO); glBindVertexArray(explosionEffectJob->Model->VAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, explosionEffectJob->Model->ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, explosionEffectJob->Model->ElementBuffer);
lastModel = explosionEffectJob->ModelID;
}
glDrawElements(GL_TRIANGLES, explosionEffectJob->EndIndex - explosionEffectJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(explosionEffectJob->StartIndex*sizeof(unsigned int))); glDrawElements(GL_TRIANGLES, explosionEffectJob->EndIndex - explosionEffectJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(explosionEffectJob->StartIndex*sizeof(unsigned int)));
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
GLERROR("explosion effect end"); GLERROR("explosion effect end");
@@ -721,8 +880,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_ForwardPlusSkinnedShieldCheckProgram->GetHandle()) {
m_ForwardPlusSkinnedShieldCheckProgram->Bind(); m_ForwardPlusSkinnedShieldCheckProgram->Bind();
GLERROR("Bind ForwardPlusSkinnedProgram"); lastShader = m_ForwardPlusSkinnedShieldCheckProgram->GetHandle();
GLERROR("Bind ForwardPlusSkinnedProgram program");
glUniform1i(glGetUniformLocation(forwardSkinnedShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSkinnedShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSkinnedShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ForwardPlusSkinnedProgram Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSkinnedShieldCheckHandle, modelJob, scene); BindModelUniforms(forwardSkinnedShieldCheckHandle, modelJob, scene);
//bind textures //bind textures
@@ -741,8 +909,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
} }
else { else {
if (lastShader != m_ForwardPlusShieldCheckProgram->GetHandle()) {
m_ForwardPlusShieldCheckProgram->Bind(); m_ForwardPlusShieldCheckProgram->Bind();
GLERROR("Bind ForwardPlusProgram"); lastShader = m_ForwardPlusShieldCheckProgram->GetHandle();
GLERROR("Bind ForwardPlusProgram program");
glUniform1i(glGetUniformLocation(forwardShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ForwardPlusProgram Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardShieldCheckHandle, modelJob, scene); BindModelUniforms(forwardShieldCheckHandle, modelJob, scene);
//bind textures //bind textures
@@ -756,8 +933,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_ForwardPlusSplatMapSkinnedShieldCheckProgram->GetHandle()) {
m_ForwardPlusSplatMapSkinnedShieldCheckProgram->Bind(); m_ForwardPlusSplatMapSkinnedShieldCheckProgram->Bind();
GLERROR("Bind SplatMap program"); lastShader = m_ForwardPlusSplatMapSkinnedShieldCheckProgram->GetHandle();
GLERROR("Bind ForwardPlusProgramSplatMapSkinned program");
glUniform1i(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ForwardPlusProgramSplatMapSkinned Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSplatMapSkinnedShieldCheckHandle, modelJob, scene); BindModelUniforms(forwardSplatMapSkinnedShieldCheckHandle, modelJob, scene);
//bind textures //bind textures
@@ -773,8 +959,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
} }
else { else {
if (lastShader != m_ForwardPlusSplatMapShieldCheckProgram->GetHandle()) {
m_ForwardPlusSplatMapShieldCheckProgram->Bind(); m_ForwardPlusSplatMapShieldCheckProgram->Bind();
lastShader = m_ForwardPlusSplatMapShieldCheckProgram->GetHandle();
GLERROR("Bind SplatMap program"); GLERROR("Bind SplatMap program");
glUniform1i(glGetUniformLocation(forwardSplatShieldCheckHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSplatShieldCheckHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSplatShieldCheckHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSplatShieldCheckHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSplatShieldCheckHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind SplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSplatShieldCheckHandle, modelJob, scene); BindModelUniforms(forwardSplatShieldCheckHandle, modelJob, scene);
//bind textures //bind textures
@@ -790,8 +985,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_ForwardPlusSkinnedProgram->GetHandle()) {
m_ForwardPlusSkinnedProgram->Bind(); m_ForwardPlusSkinnedProgram->Bind();
GLERROR("Bind ForwardPlusSkinnedProgram"); lastShader = m_ForwardPlusSkinnedProgram->GetHandle();
GLERROR("Bind ForwardPlusSkinnedProgram program");
glUniform1i(glGetUniformLocation(forwardSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ForwardPlusSkinnedProgram Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSkinnedHandle, modelJob, scene); BindModelUniforms(forwardSkinnedHandle, modelJob, scene);
//bind textures //bind textures
@@ -810,8 +1014,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
} }
else { else {
if (lastShader != m_ForwardPlusProgram->GetHandle()) {
m_ForwardPlusProgram->Bind(); m_ForwardPlusProgram->Bind();
GLERROR("Bind ForwardPlusProgram"); lastShader = m_ForwardPlusProgram->GetHandle();
GLERROR("Bind ForwardPlusProgram program");
glUniform1i(glGetUniformLocation(forwardHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind ForwardPlusProgram Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardHandle, modelJob, scene); BindModelUniforms(forwardHandle, modelJob, scene);
//bind textures //bind textures
@@ -825,8 +1038,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_ForwardPlusSplatMapSkinnedProgram->GetHandle()) {
m_ForwardPlusSplatMapSkinnedProgram->Bind(); m_ForwardPlusSplatMapSkinnedProgram->Bind();
lastShader = m_ForwardPlusSplatMapSkinnedProgram->GetHandle();
GLERROR("Bind SplatMap program"); GLERROR("Bind SplatMap program");
glUniform1i(glGetUniformLocation(forwardSplatMapSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSplatMapSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind SplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSplatMapSkinnedHandle, modelJob, scene); BindModelUniforms(forwardSplatMapSkinnedHandle, modelJob, scene);
//bind textures //bind textures
@@ -842,8 +1064,17 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
} }
else { else {
if (lastShader != m_ForwardPlusSplatMapProgram->GetHandle()) {
m_ForwardPlusSplatMapProgram->Bind(); m_ForwardPlusSplatMapProgram->Bind();
lastShader = m_ForwardPlusSplatMapProgram->GetHandle();
GLERROR("Bind SplatMap program"); GLERROR("Bind SplatMap program");
glUniform1i(glGetUniformLocation(forwardSplatMapHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(forwardSplatMapHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(forwardSplatMapHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind SplatMap Uniforms");
}
//bind uniforms //bind uniforms
BindModelUniforms(forwardSplatMapHandle, modelJob, scene); BindModelUniforms(forwardSplatMapHandle, modelJob, scene);
//bind textures //bind textures
@@ -855,8 +1086,11 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
} }
} }
//draw //draw
if (lastModel != modelJob->ModelID) {
glBindVertexArray(modelJob->Model->VAO); glBindVertexArray(modelJob->Model->VAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer);
lastModel = modelJob->ModelID;
}
glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex*sizeof(unsigned int))); glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex*sizeof(unsigned int)));
if (GLERROR("models end")) { if (GLERROR("models end")) {
continue; continue;
@@ -961,17 +1195,26 @@ void DrawFinalPass::DrawShieldedModelRenderQueue(std::list<std::shared_ptr<Rende
void DrawFinalPass::DrawToDepthStencilBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene) void DrawFinalPass::DrawToDepthStencilBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene)
{ {
GLuint shaderSkinnedHandle = m_FillDepthStencilBufferSkinnedProgram->GetHandle();
GLuint shaderHandle = m_FillDepthStencilBufferProgram->GetHandle();
GLuint lastShader = 0;
for (auto &job : jobs) { for (auto &job : jobs) {
auto modelJob = std::dynamic_pointer_cast<ModelJob>(job); auto modelJob = std::dynamic_pointer_cast<ModelJob>(job);
if(modelJob->Model->IsSkinned()) { if(modelJob->Model->IsSkinned()) {
if (lastShader != m_FillDepthStencilBufferSkinnedProgram->GetHandle()) {
m_FillDepthStencilBufferSkinnedProgram->Bind(); m_FillDepthStencilBufferSkinnedProgram->Bind();
GLuint shaderHandle = m_FillDepthStencilBufferSkinnedProgram->GetHandle(); lastShader = m_FillDepthStencilBufferSkinnedProgram->GetHandle();
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); glUniform1i(glGetUniformLocation(shaderSkinnedHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2f(glGetUniformLocation(shaderSkinnedHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(shaderSkinnedHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind Uniforms 1");
}
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * modelJob->Matrix));
GLERROR("Bind PVM uniform");
std::vector<glm::mat4> frameBones; std::vector<glm::mat4> frameBones;
if (modelJob->BlendTree != nullptr) { if (modelJob->BlendTree != nullptr) {
@@ -982,11 +1225,19 @@ void DrawFinalPass::DrawToDepthStencilBuffer(std::list<std::shared_ptr<RenderJob
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
} else { } else {
if (lastShader != m_FillDepthStencilBufferProgram->GetHandle()) {
m_FillDepthStencilBufferProgram->Bind(); m_FillDepthStencilBufferProgram->Bind();
GLuint shaderHandle = m_FillDepthStencilBufferProgram->GetHandle(); lastShader = m_FillDepthStencilBufferProgram->GetHandle();
glUniform1i(glGetUniformLocation(shaderHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); glUniform2f(glGetUniformLocation(shaderHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
glUniform4fv(glGetUniformLocation(shaderHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind Uniforms 2");
}
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * modelJob->Matrix));
GLERROR("Bind PVM uniform");
} }
@@ -1008,6 +1259,9 @@ void DrawFinalPass::DrawSprites(std::list<std::shared_ptr<RenderJob>>&jobs, Rend
GLuint shaderHandle = m_SpriteProgram->GetHandle(); GLuint shaderHandle = m_SpriteProgram->GetHandle();
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform3fv(glGetUniformLocation(shaderHandle, "CameraPos"), 1, glm::value_ptr(scene.Camera->Position()));
for(auto& job : jobs) { for(auto& job : jobs) {
auto spriteJob = std::dynamic_pointer_cast<SpriteJob>(job); auto spriteJob = std::dynamic_pointer_cast<SpriteJob>(job);
RenderState jobState; RenderState jobState;
@@ -1016,10 +1270,7 @@ void DrawFinalPass::DrawSprites(std::list<std::shared_ptr<RenderJob>>&jobs, Rend
if(spriteJob->Depth == 0) { if(spriteJob->Depth == 0) {
jobState.Disable(GL_DEPTH_TEST); jobState.Disable(GL_DEPTH_TEST);
} }
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(spriteJob->Matrix)); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * spriteJob->Matrix));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform3fv(glGetUniformLocation(shaderHandle, "CameraPos"), 1, glm::value_ptr(scene.Camera->Position()));
glUniform4fv(glGetUniformLocation(shaderHandle, "Color"), 1, glm::value_ptr(spriteJob->Color)); glUniform4fv(glGetUniformLocation(shaderHandle, "Color"), 1, glm::value_ptr(spriteJob->Color));
glUniform4fv(glGetUniformLocation(shaderHandle, "FillColor"), 1, glm::value_ptr(spriteJob->FillColor)); glUniform4fv(glGetUniformLocation(shaderHandle, "FillColor"), 1, glm::value_ptr(spriteJob->FillColor));
glUniform1f(glGetUniformLocation(shaderHandle, "FillPercentage"), spriteJob->FillPercentage); glUniform1f(glGetUniformLocation(shaderHandle, "FillPercentage"), spriteJob->FillPercentage);
@@ -1049,17 +1300,14 @@ void DrawFinalPass::DrawSprites(std::list<std::shared_ptr<RenderJob>>&jobs, Rend
void DrawFinalPass::BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene) void DrawFinalPass::BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene)
{ {
glUniform1i(glGetUniformLocation(shaderHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
GLERROR("Bind 1 uniform");
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(job->Matrix)); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(job->Matrix));
GLERROR("Bind 2 uniform"); GLERROR("Bind 2 uniform");
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * job->Matrix));
GLERROR("Bind 3 uniform"); GLERROR("Bind PVM uniform");
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "VM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix() * job->Matrix));
GLERROR("Bind 4 uniform"); GLERROR("Bind VM uniform");
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "TIM"), 1, GL_FALSE, glm::value_ptr(glm::transpose(glm::inverse(job->Matrix))));
glUniform2f(glGetUniformLocation(shaderHandle, "ScreenDimensions"), m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); GLERROR("Bind TIM uniform");
GLERROR("Bind 5 uniform");
glUniform3fv(glGetUniformLocation(shaderHandle, "ExplosionOrigin"), 1, glm::value_ptr(job->ExplosionOrigin)); glUniform3fv(glGetUniformLocation(shaderHandle, "ExplosionOrigin"), 1, glm::value_ptr(job->ExplosionOrigin));
GLERROR("Bind 6 uniform"); GLERROR("Bind 6 uniform");
@@ -1090,29 +1338,21 @@ void DrawFinalPass::BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<E
GLERROR("Bind 18 uniform"); GLERROR("Bind 18 uniform");
glUniform1f(glGetUniformLocation(shaderHandle, "FillPercentage"), job->FillPercentage); glUniform1f(glGetUniformLocation(shaderHandle, "FillPercentage"), job->FillPercentage);
GLERROR("Bind 19 uniform"); GLERROR("Bind 19 uniform");
glUniform4fv(glGetUniformLocation(shaderHandle, "AmbientColor"), 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind 20 uniform");
glUniform1f(glGetUniformLocation(shaderHandle, "GlowIntensity"), job->GlowIntensity); glUniform1f(glGetUniformLocation(shaderHandle, "GlowIntensity"), job->GlowIntensity);
GLERROR("END"); GLERROR("END");
} }
void DrawFinalPass::BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene) void DrawFinalPass::BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene)
{ {
glUniform1i(glGetUniformLocation(shaderHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
GLERROR("Bind 1 uniform");
GLint Location_M = glGetUniformLocation(shaderHandle, "M"); GLint Location_M = glGetUniformLocation(shaderHandle, "M");
glUniformMatrix4fv(Location_M, 1, GL_FALSE, glm::value_ptr(job->Matrix)); glUniformMatrix4fv(Location_M, 1, GL_FALSE, glm::value_ptr(job->Matrix));
GLERROR("Bind 2 uniform"); GLERROR("Bind 2 uniform");
GLint Location_V = glGetUniformLocation(shaderHandle, "V"); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * job->Matrix));
glUniformMatrix4fv(Location_V, 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); GLERROR("Bind PVM uniform");
GLERROR("Bind 3 uniform"); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "VM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix() * job->Matrix));
GLint Location_P = glGetUniformLocation(shaderHandle, "P"); GLERROR("Bind VM uniform");
glUniformMatrix4fv(Location_P, 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "TIM"), 1, GL_FALSE, glm::value_ptr(glm::transpose(glm::inverse(job->Matrix))));
GLERROR("Bind 4 uniform"); GLERROR("Bind TIM uniform");
GLint Location_ScreenDimensions = glGetUniformLocation(shaderHandle, "ScreenDimensions");
glUniform2f(Location_ScreenDimensions, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height);
GLERROR("Bind 5 uniform");
GLint Location_FillPercentage = glGetUniformLocation(shaderHandle, "FillPercentage"); GLint Location_FillPercentage = glGetUniformLocation(shaderHandle, "FillPercentage");
glUniform1f(Location_FillPercentage, job->FillPercentage); glUniform1f(Location_FillPercentage, job->FillPercentage);
@@ -1125,11 +1365,6 @@ void DrawFinalPass::BindModelUniforms(GLuint shaderHandle, std::shared_ptr<Model
GLERROR("Bind 8 uniform"); GLERROR("Bind 8 uniform");
GLint Location_Color = glGetUniformLocation(shaderHandle, "Color"); GLint Location_Color = glGetUniformLocation(shaderHandle, "Color");
glUniform4fv(Location_Color, 1, glm::value_ptr(job->Color)); glUniform4fv(Location_Color, 1, glm::value_ptr(job->Color));
GLERROR("Bind 9 uniform");
GLint Location_AmbientColor = glGetUniformLocation(shaderHandle, "AmbientColor");
glUniform4fv(Location_AmbientColor, 1, glm::value_ptr(scene.AmbientColor));
GLERROR("Bind 10 uniform");
GLint Location_GlowIntensity = glGetUniformLocation(shaderHandle, "GlowIntensity"); GLint Location_GlowIntensity = glGetUniformLocation(shaderHandle, "GlowIntensity");
glUniform1f(Location_GlowIntensity, job->GlowIntensity); glUniform1f(Location_GlowIntensity, job->GlowIntensity);
+9 -9
View File
@@ -10,31 +10,31 @@ Model::Model(std::string fileName)
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
RawModel::MaterialSingleTextures* materialSingleTexture = static_cast<RawModel::MaterialSingleTextures*>(materialProperty.material); RawModel::MaterialSingleTextures* materialSingleTexture = static_cast<RawModel::MaterialSingleTextures*>(materialProperty.material);
materialSingleTexture->ColorMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->ColorMap.TexturePath, false); materialSingleTexture->ColorMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->ColorMap.TexturePath);
materialSingleTexture->NormalMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->NormalMap.TexturePath, false); materialSingleTexture->NormalMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->NormalMap.TexturePath);
materialSingleTexture->SpecularMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->SpecularMap.TexturePath, false); materialSingleTexture->SpecularMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->SpecularMap.TexturePath);
materialSingleTexture->IncandescenceMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->IncandescenceMap.TexturePath, false); materialSingleTexture->IncandescenceMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->IncandescenceMap.TexturePath);
} }
break; break;
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
RawModel::MaterialSplatMapping* materialSplatMapping = static_cast<RawModel::MaterialSplatMapping*>(materialProperty.material); RawModel::MaterialSplatMapping* materialSplatMapping = static_cast<RawModel::MaterialSplatMapping*>(materialProperty.material);
materialSplatMapping->SplatMap.Texture = CommonFunctions::LoadTexture(materialSplatMapping->SplatMap.TexturePath, false); materialSplatMapping->SplatMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSplatMapping->SplatMap.TexturePath);
for (auto& texture : materialSplatMapping->ColorMaps) for (auto& texture : materialSplatMapping->ColorMaps)
{ {
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false); texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
} }
for (auto& texture : materialSplatMapping->NormalMaps) for (auto& texture : materialSplatMapping->NormalMaps)
{ {
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false); texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
} }
for (auto& texture : materialSplatMapping->SpecularMaps) for (auto& texture : materialSplatMapping->SpecularMaps)
{ {
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false); texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
} }
for (auto& texture : materialSplatMapping->IncandescenceMaps) for (auto& texture : materialSplatMapping->IncandescenceMaps)
{ {
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false); texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
} }
} }
break; break;
+28 -18
View File
@@ -12,7 +12,8 @@ PickingPass::PickingPass(IRenderer* renderer, EventBroker* eb)
PickingPass::~PickingPass() PickingPass::~PickingPass()
{ {
CommonFunctions::DeleteTexture(&m_PickingTexture);
CommonFunctions::DeleteTexture(&m_DepthBuffer);
} }
@@ -61,8 +62,9 @@ void PickingPass::Draw(RenderScene& scene)
//TODO: Render: Add code for more jobs than modeljobs. //TODO: Render: Add code for more jobs than modeljobs.
GLuint shaderHandle = m_PickingProgram->GetHandle(); GLuint shaderHandle = m_PickingProgram->GetHandle();
GLuint shaderSkinnedHandle = m_PickingSkinnedProgram->GetHandle(); GLuint shaderSkinnedHandle = m_PickingSkinnedProgram->GetHandle();
GLuint lastShader = 0;
unsigned int lastModel = 0;
m_PickingProgram->Bind(); m_PickingProgram->Bind();
if (scene.ClearDepth) { if (scene.ClearDepth) {
//glClear(GL_DEPTH_BUFFER_BIT); //glClear(GL_DEPTH_BUFFER_BIT);
state->Disable(GL_DEPTH_TEST); state->Disable(GL_DEPTH_TEST);
@@ -98,10 +100,11 @@ void PickingPass::Draw(RenderScene& scene)
m_PickingColorsToEntity[glm::ivec2(pickColor[0], pickColor[1])] = pickInfo; m_PickingColorsToEntity[glm::ivec2(pickColor[0], pickColor[1])] = pickInfo;
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_PickingSkinnedProgram->GetHandle()) {
m_PickingSkinnedProgram->Bind(); m_PickingSkinnedProgram->Bind();
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); lastShader = m_PickingSkinnedProgram->GetHandle();
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); }
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * modelJob->Matrix));
glUniform2fv(glGetUniformLocation(shaderSkinnedHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1]))); glUniform2fv(glGetUniformLocation(shaderSkinnedHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1])));
std::vector<glm::mat4> frameBones; std::vector<glm::mat4> frameBones;
@@ -114,15 +117,19 @@ void PickingPass::Draw(RenderScene& scene)
} else { } else {
if (lastShader != m_PickingProgram->GetHandle()) {
m_PickingProgram->Bind(); m_PickingProgram->Bind();
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); lastShader = m_PickingProgram->GetHandle();
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); }
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * modelJob->Matrix));
glUniform2fv(glGetUniformLocation(shaderHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1]))); glUniform2fv(glGetUniformLocation(shaderHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1])));
} }
if (lastModel != modelJob->ModelID) {
glBindVertexArray(modelJob->Model->VAO); glBindVertexArray(modelJob->Model->VAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer);
lastModel = modelJob->ModelID;
}
glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex * sizeof(unsigned int))); glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex * sizeof(unsigned int)));
} }
} }
@@ -208,10 +215,11 @@ void PickingPass::Draw(RenderScene& scene)
m_PickingColorsToEntity[glm::ivec2(pickColor[0], pickColor[1])] = pickInfo; m_PickingColorsToEntity[glm::ivec2(pickColor[0], pickColor[1])] = pickInfo;
if (modelJob->Model->IsSkinned()) { if (modelJob->Model->IsSkinned()) {
if (lastShader != m_PickingSkinnedProgram->GetHandle()) {
m_PickingSkinnedProgram->Bind(); m_PickingSkinnedProgram->Bind();
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); lastShader = m_PickingSkinnedProgram->GetHandle();
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); }
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * modelJob->Matrix));
glUniform2fv(glGetUniformLocation(shaderSkinnedHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1]))); glUniform2fv(glGetUniformLocation(shaderSkinnedHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1])));
std::vector<glm::mat4> frameBones; std::vector<glm::mat4> frameBones;
@@ -224,19 +232,24 @@ void PickingPass::Draw(RenderScene& scene)
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
} else { } else {
if (lastShader != m_PickingProgram->GetHandle()) {
m_PickingProgram->Bind(); m_PickingProgram->Bind();
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); lastShader = m_PickingProgram->GetHandle();
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); }
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * modelJob->Matrix));
glUniform2fv(glGetUniformLocation(shaderHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1]))); glUniform2fv(glGetUniformLocation(shaderHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1])));
} }
if (lastModel != modelJob->ModelID) {
glBindVertexArray(modelJob->Model->VAO); glBindVertexArray(modelJob->Model->VAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer);
lastModel = modelJob->ModelID;
}
glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex * sizeof(unsigned int))); glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex * sizeof(unsigned int)));
} }
} }
m_PickingProgram->Bind();
for (auto& job : scene.Jobs.SpriteJob) { for (auto& job : scene.Jobs.SpriteJob) {
auto spriteJob = std::dynamic_pointer_cast<SpriteJob>(job); auto spriteJob = std::dynamic_pointer_cast<SpriteJob>(job);
if (!spriteJob->Pickable) { if (!spriteJob->Pickable) {
@@ -271,10 +284,7 @@ void PickingPass::Draw(RenderScene& scene)
m_PickingColorsToEntity[glm::ivec2(pickColor[0], pickColor[1])] = pickInfo; m_PickingColorsToEntity[glm::ivec2(pickColor[0], pickColor[1])] = pickInfo;
m_PickingProgram->Bind(); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "PVM"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix() * scene.Camera->ViewMatrix() * spriteJob->Matrix));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(spriteJob->Matrix));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix()));
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix()));
glUniform2fv(glGetUniformLocation(shaderHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1]))); glUniform2fv(glGetUniformLocation(shaderHandle, "PickingColor"), 1, glm::value_ptr(glm::vec2(pickColor[0], pickColor[1])));
glBindVertexArray(spriteJob->Model->VAO); glBindVertexArray(spriteJob->Model->VAO);
+1 -1
View File
@@ -449,7 +449,7 @@ void RenderSystem::Update(double dt)
fillModels(scene.Jobs); fillModels(scene.Jobs);
fillPointLights(scene.Jobs.PointLight, m_World); fillPointLights(scene.Jobs.PointLight, m_World);
//TODO: Make sure all objects needed are also sorted. //TODO: Make sure all objects needed are also sorted.
scene.Jobs.OpaqueObjects.sort(); scene.Jobs.OpaqueObjects.sort([](auto& a, auto& b) {return *a < *b; });
fillSprites(scene.Jobs.SpriteJob, m_World); fillSprites(scene.Jobs.SpriteJob, m_World);
fillDirectionalLights(scene.Jobs.DirectionalLight, m_World); fillDirectionalLights(scene.Jobs.DirectionalLight, m_World);
fillText(scene.Jobs.Text, m_World); fillText(scene.Jobs.Text, m_World);
+15 -2
View File
@@ -2,6 +2,19 @@
std::unordered_map<GLFWwindow*, Renderer*> Renderer::m_WindowToRenderer; std::unordered_map<GLFWwindow*, Renderer*> Renderer::m_WindowToRenderer;
Renderer::~Renderer() {
delete m_PickingPass;
delete m_LightCullingPass;
delete m_ImGuiRenderPass;
delete m_DrawFinalPass;
delete m_DrawScreenQuadPass;
delete m_DrawBloomPass;
delete m_DrawColorCorrectionPass;
delete m_SSAOPass;
delete m_CubeMapPass;
delete m_TextPass;
}
void Renderer::Initialize() void Renderer::Initialize()
{ {
m_SSAO_Quality = m_Config->Get<int>("SSAO.Quality", 0); m_SSAO_Quality = m_Config->Get<int>("SSAO.Quality", 0);
@@ -220,8 +233,8 @@ PickData Renderer::Pick(glm::vec2 screenCoord)
void Renderer::InitializeTextures() void Renderer::InitializeTextures()
{ {
m_ErrorTexture = CommonFunctions::LoadTexture("Textures/Core/ErrorTexture.png", false); m_ErrorTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/ErrorTexture.png");
m_WhiteTexture = CommonFunctions::LoadTexture("Textures/Core/White.png", false); m_WhiteTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/White.png");
} }
+8 -1
View File
@@ -4,12 +4,19 @@ SSAOPass::SSAOPass(IRenderer* renderer, ConfigFile* config)
: m_Renderer(renderer) : m_Renderer(renderer)
, m_Config(config) , m_Config(config)
{ {
m_WhiteTexture = CommonFunctions::LoadTexture("Textures/Core/White.png", false); m_WhiteTexture = CommonFunctions::TryLoadResource<Texture, false>("Textures/Core/White.png");
ChangeQuality(m_Config->Get<int>("SSAO.Quality", 0)); ChangeQuality(m_Config->Get<int>("SSAO.Quality", 0));
} }
SSAOPass::~SSAOPass() {
CommonFunctions::DeleteTexture(&m_SSAOTexture);
CommonFunctions::DeleteTexture(&m_SSAOViewSpaceZTexture);
CommonFunctions::DeleteTexture(&m_Gaussian_horiz);
CommonFunctions::DeleteTexture(&m_Gaussian_vert);
}
void SSAOPass::ChangeQuality(int quality) void SSAOPass::ChangeQuality(int quality)
{ {
if (m_Quality == quality) { if (m_Quality == quality) {
+39 -11
View File
@@ -4,22 +4,32 @@ GLuint Shader::CompileShader(GLenum shaderType, std::string fileName)
{ {
LOG_INFO("Compiling shader \"%s\"", fileName.c_str()); LOG_INFO("Compiling shader \"%s\"", fileName.c_str());
std::string shaderFile; std::string shaderFile = ReadFile(fileName);
std::ifstream in(fileName, std::ios::in);
if (!in) {
LOG_ERROR("Error: Failed to open shader file \"%s\"", fileName.c_str());
return 0;
}
in.seekg(0, std::ios::end);
shaderFile.resize((int)in.tellg());
in.seekg(0, std::ios::beg);
in.read(&shaderFile[0], shaderFile.size());
in.close();
GLuint shader = glCreateShader(shaderType); GLuint shader = glCreateShader(shaderType);
if (GLERROR("glCreateShader")) if (GLERROR("glCreateShader"))
return 0; return 0;
std::size_t startPos = 0;
std::size_t SEofNewFile[2];
std::string key = "#include";
while((startPos = shaderFile.find(key, startPos)) != std::string::npos)
{
SEofNewFile[0] = shaderFile.find('"', startPos+key.length())+1;
SEofNewFile[1] = shaderFile.find('"', SEofNewFile[0]);
if (SEofNewFile[0] == std::string::npos || SEofNewFile[1] == std::string::npos)
return 0;
std::string replacementFileName = shaderFile.substr(SEofNewFile[0], SEofNewFile[1] - SEofNewFile[0]);
std::string replacementString = ReadFile(replacementFileName);
size_t firstof = replacementString.find_first_of((char)0);
replacementString.erase(firstof, replacementString.size() - firstof);
if (replacementString.length() <= 0)
return 0;
shaderFile.replace(startPos, SEofNewFile[1]+2 - startPos, replacementString + "\n");
startPos += replacementString.length(); //This might not be wanted.
}
const GLchar* shaderFiles = shaderFile.c_str(); const GLchar* shaderFiles = shaderFile.c_str();
const GLint length = static_cast<GLint>(shaderFile.length()); const GLint length = static_cast<GLint>(shaderFile.length());
glShaderSource(shader, 1, &shaderFiles, &length); glShaderSource(shader, 1, &shaderFiles, &length);
@@ -46,6 +56,24 @@ GLuint Shader::CompileShader(GLenum shaderType, std::string fileName)
return shader; return shader;
} }
std::string Shader::ReadFile(std::string fileName)
{
std::string shaderFile;
std::ifstream in(fileName, std::ios::in);
if (!in) {
LOG_ERROR("Error: Failed to open shader file \"%s\"", fileName.c_str());
return "";
}
in.seekg(0, std::ios::end);
shaderFile.resize((int)in.tellg());
in.seekg(0, std::ios::beg);
in.read(&shaderFile[0], shaderFile.size());
in.close();
return shaderFile;
}
Shader::Shader(GLenum shaderType, std::string fileName) : m_ShaderType(shaderType), m_FileName(fileName) Shader::Shader(GLenum shaderType, std::string fileName) : m_ShaderType(shaderType), m_FileName(fileName)
{ {
m_ShaderHandle = 0; m_ShaderHandle = 0;
+2
View File
@@ -321,6 +321,8 @@ Skeleton::~Skeleton()
for (auto &kv : Bones) { for (auto &kv : Bones) {
delete kv.second; delete kv.second;
} }
BlendTrees.clear();
} }
const Skeleton::Animation* Skeleton::GetAnimation(std::string name) const Skeleton::Animation* Skeleton::GetAnimation(std::string name)
+1 -13
View File
@@ -4,18 +4,6 @@ Texture::Texture(std::string path)
{ {
PNG* img = ResourceManager::Load<PNG, true>(path); //TODO: Make this threaded. Catch exeptions in all other load places. PNG* img = ResourceManager::Load<PNG, true>(path); //TODO: Make this threaded. Catch exeptions in all other load places.
//PNG image(path);
//if (img->Width == 0 && img->Height == 0 || img->Format == Image::ImageFormat::Unknown) {
// //image = PNG("Textures/Core/ErrorTexture.png");
// //return; // Temporary fix to remove crash
// if (img->Width == 0 && img->Height == 0 || img->Format == Image::ImageFormat::Unknown) {
// LOG_ERROR("Couldn't even load the error texture. This is a dark day indeed.");
// return;
// }
//}
this->Width = img->Width; this->Width = img->Width;
this->Height = img->Height; this->Height = img->Height;
this->Data = img->Data; this->Data = img->Data;
@@ -30,8 +18,8 @@ Texture::Texture(std::string path)
break; break;
} }
// Construct the OpenGL texture // Construct the OpenGL texture
glGenTextures(1, &m_Texture); glGenTextures(1, &m_Texture);
glBindTexture(GL_TEXTURE_2D, m_Texture); glBindTexture(GL_TEXTURE_2D, m_Texture);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+11
View File
@@ -0,0 +1,11 @@
#include "Rendering/TextureSprite.h"
TextureSprite::TextureSprite(std::string path)
:Texture(path)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST_MIPMAP_NEAREST);
GLERROR("Texture load");
}
@@ -1,23 +1,5 @@
#include "Rendering/Util/CommonFunctions.h" #include "Rendering/Util/CommonFunctions.h"
Texture* CommonFunctions::LoadTexture(std::string path, bool threaded)
{
Texture* img;
try {
if(threaded) {
img = ResourceManager::Load<Texture, true>(path);
} else {
img = ResourceManager::Load<Texture, false>(path);
}
} catch (const Resource::StillLoadingException&) {
img = ResourceManager::Load<Texture>("Textures/Core/ErrorTexture.png");
} catch (const std::exception&) {
img = nullptr;
}
return img;
}
void CommonFunctions::GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) void CommonFunctions::GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type)
{ {
glDeleteTextures(1, texture); glDeleteTextures(1, texture);
+1 -1
View File
@@ -37,7 +37,7 @@ ScreenCoords::PixelData ScreenCoords::ToPixelData(float x, float y, FrameBuffer*
glReadPixels(x, y, 1, 1, GL_RGB, GL_UNSIGNED_BYTE, &pdata); glReadPixels(x, y, 1, 1, GL_RGB, GL_UNSIGNED_BYTE, &pdata);
GLERROR("glReadPixels(pdata) Error"); GLERROR("glReadPixels(pdata) Error");
PickDataBuffer->Unbind(); PickDataBuffer->Unbind();
GLERROR("Unbind Error");
glBindFramebuffer(GL_FRAMEBUFFER, DepthBuffer); glBindFramebuffer(GL_FRAMEBUFFER, DepthBuffer);
GLERROR("glBindFramebuffer(DepthBuffer) Error"); GLERROR("glBindFramebuffer(DepthBuffer) Error");
float depthData; float depthData;

Some files were not shown because too many files have changed in this diff Show More