Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a806f9b1e3 | |||
| 22748f6594 | |||
| df7ace6626 | |||
| bb76c9d248 | |||
| 9cbc6f7755 | |||
| d3a245606a | |||
| b320d8d1e4 | |||
| 62e22d3821 | |||
| 0805375483 | |||
| 0c60b637c3 | |||
| d411de894f | |||
| f56705d921 | |||
| 18450ff4f3 | |||
| 22b473a0b6 | |||
| f161fce719 | |||
| 0343683678 | |||
| 9e6c67596d | |||
| 89d0d5753f | |||
| 748a178801 | |||
| eac9a9daf6 | |||
| 059fe5c6c0 | |||
| fb465ede81 | |||
| f66fa7a183 | |||
| 508d8a6f00 | |||
| 8ce6308649 | |||
| f10958c268 | |||
| da1c7b3093 | |||
| ef87102d1f | |||
| 9a41bda4cf | |||
| fc18932068 | |||
| b874ea8641 | |||
| 2609a0253d | |||
| de309d3b9d | |||
| f7ef6707a7 | |||
| feeff5b164 | |||
| 7394436e7a | |||
| f41e0b29be | |||
| 607e83134d | |||
| 5af4f9d8e7 | |||
| af68236e71 | |||
| 6f9ce8a0c1 | |||
| 6465fe6ed6 | |||
| fa13c1d065 | |||
| e2831c5593 | |||
| 8d23c531af | |||
| 91b0ac5fbd | |||
| d77119bb2d | |||
| 27669b7383 | |||
| fc7d62a5ad | |||
| c42e1e0967 | |||
| fe9dbf0b0f | |||
| 4ffb03fdd5 | |||
| fe3e0bac5b | |||
| fa4f007604 | |||
| e5ff88d3c9 | |||
| 845a30ed0f | |||
| 34a71b0767 | |||
| 833006744a | |||
| b2d8cddfb7 | |||
| 6fab971734 | |||
| ed9149fe63 | |||
| 4c1a284636 | |||
| 23dc8e07b2 | |||
| c7d31cac2d | |||
| a1e932d261 | |||
| 070f1bd394 | |||
| 993d804cef | |||
| 2f259c3773 | |||
| 97fcdb342d | |||
| 949ee76f55 | |||
| c4d3c515e4 | |||
| 7cc58dc94c | |||
| 5e3af7ac5d | |||
| 46987beefb | |||
| 4fd0108443 | |||
| 950ecba1c0 | |||
| fdc8f753cb | |||
| 4432891437 | |||
| a006db9e63 | |||
| 17da9a8036 | |||
| 717af2c4a4 |
+1
-1
Submodule assets updated: 1e7adc749e...10a611659d
@@ -24,6 +24,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
Octree<EntityAABB>* m_Octree;
|
Octree<EntityAABB>* m_Octree;
|
||||||
std::vector<EntityAABB> m_OctreeResult;
|
std::vector<EntityAABB> m_OctreeResult;
|
||||||
|
std::unordered_map<EntityWrapper, glm::vec3> m_PrevPositions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef EAmmoPickup_h__
|
||||||
|
#define EAmmoPickup_h__
|
||||||
|
|
||||||
|
#include "EventBroker.h"
|
||||||
|
#include "../Core/EntityWrapper.h"
|
||||||
|
|
||||||
|
namespace Events
|
||||||
|
{
|
||||||
|
|
||||||
|
struct AmmoPickup : Event
|
||||||
|
{
|
||||||
|
EntityWrapper Player;
|
||||||
|
int AmmoGain;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
#ifndef ECaptured_h__
|
#ifndef ECaptured_h__
|
||||||
#define ECaptured_h__
|
#define ECaptured_h__
|
||||||
|
|
||||||
#include "Core/EventBroker.h"
|
#include "EventBroker.h"
|
||||||
#include "Core/Entity.h"
|
#include "../Core/Entity.h"
|
||||||
|
#include "Engine/GLM.h"
|
||||||
|
|
||||||
namespace Events
|
namespace Events
|
||||||
{
|
{
|
||||||
|
|
||||||
//triggers when a capturePoint has been taken over
|
//triggers when a capturePoint has been taken over
|
||||||
struct Captured : Event
|
struct Captured : Event
|
||||||
{
|
{
|
||||||
int TeamNumberThatCapturedCapturePoint;
|
int TeamNumberThatCapturedCapturePoint;
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef EPlayerHealthPickup_h__
|
||||||
|
#define EPlayerHealthPickup_h__
|
||||||
|
|
||||||
|
#include "EventBroker.h"
|
||||||
|
#include "../Core/EntityWrapper.h"
|
||||||
|
|
||||||
|
namespace Events
|
||||||
|
{
|
||||||
|
|
||||||
|
struct PlayerHealthPickup : Event
|
||||||
|
{
|
||||||
|
EntityWrapper Player;
|
||||||
|
double HealthAmount;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef EWin_h__
|
||||||
|
#define EWin_h__
|
||||||
|
|
||||||
|
#include "EventBroker.h"
|
||||||
|
#include "../Core/Entity.h"
|
||||||
|
#include "Engine/GLM.h"
|
||||||
|
|
||||||
|
namespace Events
|
||||||
|
{
|
||||||
|
|
||||||
|
//triggers when a team has captured all capturePoints
|
||||||
|
struct Win : Event
|
||||||
|
{
|
||||||
|
//can be 0 = none, 1,2
|
||||||
|
int TeamThatWon;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#ifndef EntitySystem_h__
|
|
||||||
#define EntitySystem_h__
|
|
||||||
|
|
||||||
#include "World.h"
|
|
||||||
#include "SystemPipeline.h"
|
|
||||||
|
|
||||||
// An "EntitySystem" is defined as the combination of a World with a SystemPipeline
|
|
||||||
template <typename WorldType>
|
|
||||||
class EntitySystem : public WorldType, public SystemPipeline
|
|
||||||
{
|
|
||||||
static_assert(std::is_base_of<World, WorldType>::value, "WorldType must inherit from World");
|
|
||||||
public:
|
|
||||||
EntitySystem(EventBroker* eventBroker, bool isClient, bool isServer)
|
|
||||||
: WorldType(eventBroker)
|
|
||||||
, SystemPipeline(this, eventBroker, isClient, isServer)
|
|
||||||
{ }
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -29,16 +29,22 @@ struct EntityWrapper
|
|||||||
EntityWrapper Parent();
|
EntityWrapper Parent();
|
||||||
EntityWrapper FirstChildByName(const std::string& name);
|
EntityWrapper FirstChildByName(const std::string& name);
|
||||||
EntityWrapper FirstParentWithComponent(const std::string& componentType);
|
EntityWrapper FirstParentWithComponent(const std::string& componentType);
|
||||||
|
EntityWrapper Clone(EntityWrapper parent = EntityWrapper::Invalid);
|
||||||
|
std::vector<EntityWrapper> ChildrenWithComponent(const std::string& componentType);
|
||||||
|
void DeleteChildren();
|
||||||
bool IsChildOf(EntityWrapper potentialParent);
|
bool IsChildOf(EntityWrapper potentialParent);
|
||||||
bool Valid() const;
|
bool Valid() const;
|
||||||
|
|
||||||
ComponentWrapper operator[](const char* componentName);
|
ComponentWrapper operator[](const char* componentName);
|
||||||
|
ComponentWrapper operator[](const std::string& componentName);
|
||||||
bool operator==(const EntityWrapper& e) const;
|
bool operator==(const EntityWrapper& e) const;
|
||||||
bool operator!=(const EntityWrapper& e) const;
|
bool operator!=(const EntityWrapper& e) const;
|
||||||
explicit operator EntityID() const;
|
explicit operator EntityID() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EntityWrapper firstChildByNameRecursive(const std::string& name, EntityID parent);
|
EntityWrapper firstChildByNameRecursive(const std::string& name, EntityID parent);
|
||||||
|
EntityWrapper cloneRecursive(EntityWrapper entity, EntityWrapper parent);
|
||||||
|
void childrenWithComponentRecursive(const std::string& componentType, EntityWrapper& entity, std::vector<EntityWrapper>& childrenWithComponent);
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ protected:
|
|||||||
|
|
||||||
const std::string m_ComponentType;
|
const std::string m_ComponentType;
|
||||||
|
|
||||||
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cPlayer, double dt) = 0;
|
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ImpureSystem : public virtual System
|
class ImpureSystem : public virtual System
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public:
|
|||||||
// Change the parent of an entity
|
// Change the parent of an entity
|
||||||
void SetParent(EntityID entity, EntityID parent);
|
void SetParent(EntityID entity, EntityID parent);
|
||||||
// Get children of an entity
|
// Get children of an entity
|
||||||
const std::pair<std::unordered_multimap<EntityID, EntityID>::const_iterator, std::unordered_multimap<EntityID, EntityID>::const_iterator> GetChildren(EntityID entity);
|
const std::pair<std::unordered_multimap<EntityID, EntityID>::const_iterator, std::unordered_multimap<EntityID, EntityID>::const_iterator> GetDirectChildren(EntityID entity);
|
||||||
// Get all component pools
|
// Get all component pools
|
||||||
const std::unordered_map<std::string, ComponentPool*>& GetComponentPools() const { return m_ComponentPools; }
|
const std::unordered_map<std::string, ComponentPool*>& GetComponentPools() const { return m_ComponentPools; }
|
||||||
// Get the entity children map
|
// Get the entity children map
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ public:
|
|||||||
// Called when the user means to rename an entity.
|
// Called when the user means to rename an entity.
|
||||||
typedef std::function<void(EntityWrapper, const std::string&)> OnEntityChangeName_t;
|
typedef std::function<void(EntityWrapper, const std::string&)> OnEntityChangeName_t;
|
||||||
void SetEntityChangeNameCallback(OnEntityChangeName_t f) { m_OnEntityChangeName = f; }
|
void SetEntityChangeNameCallback(OnEntityChangeName_t f) { m_OnEntityChangeName = f; }
|
||||||
|
// Called when the user pastes an entity previously "copied"
|
||||||
|
// @param EntityWrapper The entity to copy
|
||||||
|
// @param EntityWrapper The entity to parent the new copy to
|
||||||
|
// @return The new copy of the entity
|
||||||
|
typedef std::function<EntityWrapper(EntityWrapper, EntityWrapper)> OnEntityPaste_t;
|
||||||
|
void SetEntityPasteCallback(OnEntityPaste_t f) { m_OnEntityPaste = f; }
|
||||||
// Called when the user means to attach a new component to an entity.
|
// Called when the user means to attach a new component to an entity.
|
||||||
typedef std::function<void(EntityWrapper, const std::string&)> OnComponentAttach_t;
|
typedef std::function<void(EntityWrapper, const std::string&)> OnComponentAttach_t;
|
||||||
void SetComponentAttachCallback(OnComponentAttach_t f) { m_OnComponentAttach = f; }
|
void SetComponentAttachCallback(OnComponentAttach_t f) { m_OnComponentAttach = f; }
|
||||||
@@ -111,6 +117,7 @@ private:
|
|||||||
std::string m_DroppedFile = "";
|
std::string m_DroppedFile = "";
|
||||||
bool m_Paused = false;
|
bool m_Paused = false;
|
||||||
bool m_MouseLocked = false;
|
bool m_MouseLocked = false;
|
||||||
|
EntityWrapper m_CopyTarget = EntityWrapper::Invalid;
|
||||||
|
|
||||||
// Callbacks
|
// Callbacks
|
||||||
OnEntitySelectedCallback_t m_OnEntitySelected = nullptr;
|
OnEntitySelectedCallback_t m_OnEntitySelected = nullptr;
|
||||||
@@ -124,6 +131,7 @@ private:
|
|||||||
OnComponentDelete_t m_OnComponentDelete = nullptr;
|
OnComponentDelete_t m_OnComponentDelete = nullptr;
|
||||||
OnWidgetMode_t m_OnWidgetMode = nullptr;
|
OnWidgetMode_t m_OnWidgetMode = nullptr;
|
||||||
OnWidgetSpace_t m_OnWidgetSpace = nullptr;
|
OnWidgetSpace_t m_OnWidgetSpace = nullptr;
|
||||||
|
OnEntityPaste_t m_OnEntityPaste = nullptr;
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
EventRelay<EditorGUI, Events::KeyDown> m_EKeyDown;
|
EventRelay<EditorGUI, Events::KeyDown> m_EKeyDown;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ private:
|
|||||||
void OnEntityDelete(EntityWrapper entity);
|
void OnEntityDelete(EntityWrapper entity);
|
||||||
void OnEntityChangeParent(EntityWrapper entity, EntityWrapper parent);
|
void OnEntityChangeParent(EntityWrapper entity, EntityWrapper parent);
|
||||||
void OnEntityChangeName(EntityWrapper entity, const std::string& name);
|
void OnEntityChangeName(EntityWrapper entity, const std::string& name);
|
||||||
|
EntityWrapper OnEntityPaste(EntityWrapper entityToCopy, EntityWrapper parent);
|
||||||
void OnComponentAttach(EntityWrapper entity, const std::string& componentType);
|
void OnComponentAttach(EntityWrapper entity, const std::string& componentType);
|
||||||
void OnComponentDelete(EntityWrapper entity, const std::string& componentType);
|
void OnComponentDelete(EntityWrapper entity, const std::string& componentType);
|
||||||
void OnWidgetSpace(EditorGUI::WidgetSpace widgetSpace);
|
void OnWidgetSpace(EditorGUI::WidgetSpace widgetSpace);
|
||||||
|
|||||||
@@ -19,11 +19,26 @@
|
|||||||
#include "Core/World.h"
|
#include "Core/World.h"
|
||||||
#include "Core/EventBroker.h"
|
#include "Core/EventBroker.h"
|
||||||
#include "Core/ConfigFile.h"
|
#include "Core/ConfigFile.h"
|
||||||
|
#include "Core/EPlayerDeath.h"
|
||||||
#include "Input/EInputCommand.h"
|
#include "Input/EInputCommand.h"
|
||||||
#include "Core/EPlayerDamage.h"
|
#include "Core/EPlayerDamage.h"
|
||||||
|
#include "../Game/Events/EDoubleJump.h"
|
||||||
#include "Network/EInterpolate.h"
|
#include "Network/EInterpolate.h"
|
||||||
#include "Network/SnapshotFilter.h"
|
#include "Network/SnapshotFilter.h"
|
||||||
#include "Core/EPlayerSpawned.h"
|
#include "Core/EPlayerSpawned.h"
|
||||||
|
#include "Network/ESearchForServers.h"
|
||||||
|
|
||||||
|
struct ServerInfo
|
||||||
|
{
|
||||||
|
ServerInfo(std::string a, int b, std::string c, int d)
|
||||||
|
{
|
||||||
|
Address = a; Port = b; Name = c; PlayersConnected = d;
|
||||||
|
}
|
||||||
|
std::string Address = "";
|
||||||
|
int Port = 0;
|
||||||
|
std::string Name = "";
|
||||||
|
int PlayersConnected = 0;
|
||||||
|
};
|
||||||
|
|
||||||
class Client : public Network
|
class Client : public Network
|
||||||
{
|
{
|
||||||
@@ -34,7 +49,9 @@ public:
|
|||||||
|
|
||||||
void Connect(std::string address, int port);
|
void Connect(std::string address, int port);
|
||||||
void Update() override;
|
void Update() override;
|
||||||
|
private:
|
||||||
|
UDPClient m_Unreliable;
|
||||||
|
TCPClient m_Reliable;
|
||||||
std::vector<Events::PlayerSpawned> m_PlayerSpawnEvents;
|
std::vector<Events::PlayerSpawned> m_PlayerSpawnEvents;
|
||||||
void parseSpawnEvents();
|
void parseSpawnEvents();
|
||||||
// Save for children
|
// Save for children
|
||||||
@@ -82,10 +99,13 @@ public:
|
|||||||
void parseTCPConnect(Packet& packet);
|
void parseTCPConnect(Packet& packet);
|
||||||
void parsePlayerConnected(Packet& packet);
|
void parsePlayerConnected(Packet& packet);
|
||||||
void parsePing();
|
void parsePing();
|
||||||
|
void parseServerlist(Packet& packet);
|
||||||
void parseKick();
|
void parseKick();
|
||||||
void parsePlayersSpawned(Packet& packet);
|
void parsePlayersSpawned(Packet& packet);
|
||||||
void parseEntityDeletion(Packet& packet);
|
void parseEntityDeletion(Packet& packet);
|
||||||
|
void parsePlayerDamage(Packet& packet);
|
||||||
void parseComponentDeletion(Packet& packet);
|
void parseComponentDeletion(Packet& packet);
|
||||||
|
void parseDoubleJump(Packet& packet);
|
||||||
void InterpolateFields(Packet & packet, const ComponentInfo & componentInfo, const EntityID & entityID, const std::string & componentType);
|
void InterpolateFields(Packet & packet, const ComponentInfo & componentInfo, const EntityID & entityID, const std::string & componentType);
|
||||||
void parseSnapshot(Packet& packet);
|
void parseSnapshot(Packet& packet);
|
||||||
void identifyPacketLoss();
|
void identifyPacketLoss();
|
||||||
@@ -94,6 +114,7 @@ public:
|
|||||||
void sendInputCommands();
|
void sendInputCommands();
|
||||||
void sendLocalPlayerTransform();
|
void sendLocalPlayerTransform();
|
||||||
void becomePlayer();
|
void becomePlayer();
|
||||||
|
void displayServerlist();
|
||||||
// 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);
|
||||||
@@ -109,10 +130,15 @@ public:
|
|||||||
bool OnPlayerDamage(const Events::PlayerDamage& e);
|
bool OnPlayerDamage(const Events::PlayerDamage& e);
|
||||||
EventRelay<Client, Events::PlayerSpawned> m_EPlayerSpawned;
|
EventRelay<Client, Events::PlayerSpawned> m_EPlayerSpawned;
|
||||||
bool OnPlayerSpawned(const Events::PlayerSpawned& e);
|
bool OnPlayerSpawned(const Events::PlayerSpawned& e);
|
||||||
void parsePlayerDamage(Packet& packet);
|
EventRelay< Client, Events::SearchForServers> m_ESearchForServers;
|
||||||
private:
|
EventRelay<Client, Events::DoubleJump> m_EDoubleJump;
|
||||||
UDPClient m_Unreliable;
|
bool OnDoubleJump(Events::DoubleJump & e);
|
||||||
TCPClient m_Reliable;
|
bool OnSearchForServers(const Events::SearchForServers& e);
|
||||||
|
UDPClient m_ServerlistRequest;
|
||||||
|
std::vector<ServerInfo> m_Serverlist;
|
||||||
|
bool m_SearchingForServers = false;
|
||||||
|
std::clock_t m_StartSearchTime;
|
||||||
|
double m_SearchingTime = 2000; // Config I guess
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef Events_SearchForServers_h__
|
||||||
|
#define Events_SearchForServers_h__
|
||||||
|
|
||||||
|
#include "Core/Event.h"
|
||||||
|
|
||||||
|
namespace Events
|
||||||
|
{
|
||||||
|
|
||||||
|
struct SearchForServers : public Event { };
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#ifndef HybridClient_h__
|
|
||||||
#define HybridClient_h__
|
|
||||||
|
|
||||||
class HybridClient
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
HybridClient();
|
|
||||||
~HybridClient();
|
|
||||||
private:
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#ifndef HybridServer_h__
|
|
||||||
#define HybridServer_h__
|
|
||||||
|
|
||||||
class HybridServer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
HybridServer();
|
|
||||||
~HybridServer();
|
|
||||||
private:
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -19,6 +19,8 @@ enum class MessageType
|
|||||||
EntityDeleted,
|
EntityDeleted,
|
||||||
ComponentDeleted,
|
ComponentDeleted,
|
||||||
PlayerTransform,
|
PlayerTransform,
|
||||||
|
OnDoubleJump,
|
||||||
|
ServerlistRequest,
|
||||||
Invalid
|
Invalid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,16 @@ typedef unsigned int PacketID;
|
|||||||
class NetworkClient
|
class NetworkClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
NetworkClient();
|
||||||
|
virtual ~NetworkClient();
|
||||||
virtual void Connect(std::string playerName, std::string address, int port) = 0;
|
virtual void 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;
|
||||||
virtual bool IsSocketAvailable() = 0;
|
virtual bool IsSocketAvailable() = 0;
|
||||||
protected:
|
protected:
|
||||||
char m_ReadBuffer[BUFFERSIZE] = { 0 };
|
char* m_ReadBuffer;
|
||||||
|
unsigned int m_BufferSize = BUFFERSIZE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -10,12 +10,15 @@ typedef unsigned int PacketID;
|
|||||||
class NetworkServer
|
class NetworkServer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
NetworkServer();
|
||||||
|
virtual ~NetworkServer();
|
||||||
virtual void AcceptNewConnections(int& nextPlayerID, std::map<PlayerID, PlayerDefinition>& connectedPlayers) = 0;
|
virtual void AcceptNewConnections(int& nextPlayerID, std::map<PlayerID, PlayerDefinition>& connectedPlayers) = 0;
|
||||||
virtual void Receive(Packet & packet, PlayerDefinition & playerDefinition) = 0;
|
virtual void Receive(Packet & packet, PlayerDefinition & playerDefinition) = 0;
|
||||||
virtual void Send(Packet & packet, PlayerDefinition & playerDefinition) = 0;
|
virtual void Send(Packet & packet, PlayerDefinition & playerDefinition) = 0;
|
||||||
virtual void Send(Packet & packet) = 0;
|
virtual void Send(Packet & packet) = 0;
|
||||||
protected:
|
protected:
|
||||||
char m_ReadBuffer[BUFFERSIZE] = { 0 };
|
char* m_ReadBuffer;
|
||||||
|
unsigned int m_BufferSize = BUFFERSIZE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
#include "Core/EPlayerDamage.h"
|
#include "Core/EPlayerDamage.h"
|
||||||
#include "Network/EPlayerDisconnected.h"
|
#include "Network/EPlayerDisconnected.h"
|
||||||
#include "Core/EPlayerSpawned.h"
|
#include "Core/EPlayerSpawned.h"
|
||||||
|
#include "../Game/Events/EDoubleJump.h"
|
||||||
#include "Core/EEntityDeleted.h"
|
#include "Core/EEntityDeleted.h"
|
||||||
#include "Core/EComponentDeleted.h"
|
#include "Core/EComponentDeleted.h"
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ private:
|
|||||||
// Network channels
|
// Network channels
|
||||||
TCPServer m_Reliable;
|
TCPServer m_Reliable;
|
||||||
UDPServer m_Unreliable;
|
UDPServer m_Unreliable;
|
||||||
|
UDPServer m_ServerlistRequest;
|
||||||
// dont forget to set these in the childrens receive logic
|
// dont forget to set these in the childrens receive logic
|
||||||
boost::asio::ip::address m_Address;
|
boost::asio::ip::address m_Address;
|
||||||
int m_Port = 27666;
|
int m_Port = 27666;
|
||||||
@@ -64,6 +66,7 @@ private:
|
|||||||
void reliableBroadcast(Packet& packet);
|
void reliableBroadcast(Packet& packet);
|
||||||
void unreliableBroadcast(Packet& packet);
|
void unreliableBroadcast(Packet& packet);
|
||||||
void sendSnapshot();
|
void sendSnapshot();
|
||||||
|
void addPlayersToPacket(Packet& packet, EntityID entityID);
|
||||||
void addChildrenToPacket(Packet& packet, EntityID entityID);
|
void addChildrenToPacket(Packet& packet, EntityID entityID);
|
||||||
void addInputCommandsToPacket(Packet& packet);
|
void addInputCommandsToPacket(Packet& packet);
|
||||||
void sendPing();
|
void sendPing();
|
||||||
@@ -78,9 +81,11 @@ private:
|
|||||||
void parseOnInputCommand(Packet& packet);
|
void parseOnInputCommand(Packet& packet);
|
||||||
void parseClientPing();
|
void parseClientPing();
|
||||||
void parsePing();
|
void parsePing();
|
||||||
void parseUDPConnect(Packet & packet);
|
bool parseDoubleJump(Packet& packet);
|
||||||
void parseTCPConnect(Packet & packet);
|
void parseUDPConnect(Packet& packet);
|
||||||
|
void parseTCPConnect(Packet& packet);
|
||||||
void parseDisconnect();
|
void parseDisconnect();
|
||||||
|
void parseServerlistRequest(boost::asio::ip::udp::endpoint endpoint);
|
||||||
bool shouldSendToClient(EntityWrapper childEntity);
|
bool shouldSendToClient(EntityWrapper childEntity);
|
||||||
|
|
||||||
// Debug event
|
// Debug event
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ private:
|
|||||||
boost::asio::ip::tcp::endpoint m_Endpoint;
|
boost::asio::ip::tcp::endpoint m_Endpoint;
|
||||||
boost::asio::io_service m_IOService;
|
boost::asio::io_service m_IOService;
|
||||||
std::unique_ptr<boost::asio::ip::tcp::socket> m_Socket;
|
std::unique_ptr<boost::asio::ip::tcp::socket> m_Socket;
|
||||||
size_t readBuffer(char* data);
|
size_t readBuffer();
|
||||||
PacketID m_SendPacketID = 0;
|
PacketID m_SendPacketID = 0;
|
||||||
bool m_IsConnected = false;
|
bool m_IsConnected = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,16 +16,22 @@ public:
|
|||||||
void Send(Packet & packet, PlayerDefinition & playerDefinition);
|
void Send(Packet & packet, PlayerDefinition & playerDefinition);
|
||||||
void Send(Packet & packet);
|
void Send(Packet & packet);
|
||||||
void Disconnect();
|
void Disconnect();
|
||||||
|
int Port() { return m_Port; }
|
||||||
|
std::string Address() { return m_Address; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// TCP logic
|
// TCP logic
|
||||||
boost::asio::io_service m_IOService;
|
boost::asio::io_service m_IOService;
|
||||||
std::unique_ptr<boost::asio::ip::tcp::acceptor> acceptor;
|
std::unique_ptr<boost::asio::ip::tcp::acceptor> acceptor;
|
||||||
boost::shared_ptr<boost::asio::ip::tcp::socket> lastReceivedSocket;
|
boost::shared_ptr<boost::asio::ip::tcp::socket> lastReceivedSocket;
|
||||||
|
|
||||||
void handle_accept(boost::shared_ptr<boost::asio::ip::tcp::socket> socket,
|
int readBuffer(PlayerDefinition& playerDefinition);
|
||||||
int& nextPlayerID, std::map<PlayerID, PlayerDefinition>& connectedPlayers,
|
PlayerID getPlayerIDFromEndpoint(const std::map<PlayerID, PlayerDefinition>& connectedPlayers,
|
||||||
const boost::system::error_code& error);
|
boost::asio::ip::address address, unsigned short port);
|
||||||
int readBuffer(char* data, PlayerDefinition& playerDefinition);
|
int GetPort();
|
||||||
|
std::string GetAddress();
|
||||||
|
int m_Port = 0;
|
||||||
|
std::string m_Address = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -14,13 +14,14 @@ public:
|
|||||||
void Disconnect();
|
void Disconnect();
|
||||||
void Receive(Packet& packet);
|
void Receive(Packet& packet);
|
||||||
void Send(Packet & packet);
|
void Send(Packet & packet);
|
||||||
|
void Broadcast(Packet& packet, int port);
|
||||||
bool IsSocketAvailable();
|
bool IsSocketAvailable();
|
||||||
private:
|
private:
|
||||||
// Assio UDP logic
|
// Assio UDP logic
|
||||||
boost::asio::io_service m_IOService;
|
boost::asio::io_service m_IOService;
|
||||||
boost::asio::ip::udp::endpoint m_ReceiverEndpoint;
|
boost::asio::ip::udp::endpoint m_ReceiverEndpoint;
|
||||||
boost::shared_ptr<boost::asio::ip::udp::socket> m_Socket;
|
boost::shared_ptr<boost::asio::ip::udp::socket> m_Socket;
|
||||||
int readBuffer(char* data);
|
int readBuffer();
|
||||||
PacketID m_SendPacketID = 0;
|
PacketID m_SendPacketID = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,18 +8,21 @@ class UDPServer : public NetworkServer
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UDPServer();
|
UDPServer();
|
||||||
|
UDPServer(int port);
|
||||||
~UDPServer();
|
~UDPServer();
|
||||||
void AcceptNewConnections(int& nextPlayerID, std::map<PlayerID, PlayerDefinition>& connectedPlayers);
|
void AcceptNewConnections(int& nextPlayerID, std::map<PlayerID, PlayerDefinition>& connectedPlayers);
|
||||||
void Receive(Packet & packet, PlayerDefinition & playerDefinition);
|
void Receive(Packet & packet, PlayerDefinition & playerDefinition);
|
||||||
void Send(Packet & packet, PlayerDefinition & playerDefinition);
|
void Send(Packet & packet, PlayerDefinition & playerDefinition);
|
||||||
void Send(Packet & packet);
|
void Send(Packet & packet);
|
||||||
|
void Send(Packet & packet, boost::asio::ip::udp::endpoint endpoint);
|
||||||
|
void Broadcast(Packet & packet, int port);
|
||||||
bool IsSocketAvailable();
|
bool IsSocketAvailable();
|
||||||
private:
|
private:
|
||||||
// UDP logic
|
// UDP logic
|
||||||
boost::asio::io_service m_IOService;
|
boost::asio::io_service m_IOService;
|
||||||
boost::asio::ip::udp::endpoint m_ReceiverEndpoint;
|
boost::asio::ip::udp::endpoint m_ReceiverEndpoint;
|
||||||
std::unique_ptr<boost::asio::ip::udp::socket> m_Socket;
|
std::unique_ptr<boost::asio::ip::udp::socket> m_Socket;
|
||||||
int readBuffer(char* data);
|
int readBuffer();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef CubeMapPass_h__
|
||||||
|
#define CubeMapPass_h__
|
||||||
|
|
||||||
|
#include "IRenderer.h"
|
||||||
|
#include "ShaderProgram.h"
|
||||||
|
|
||||||
|
class CubeMapPass
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CubeMapPass(IRenderer* renderer);
|
||||||
|
~CubeMapPass() { }
|
||||||
|
|
||||||
|
void LoadTextures(std::string input);
|
||||||
|
void FillCubeMap(glm::vec3 originPosition);
|
||||||
|
void GenerateCubeMapTexture();
|
||||||
|
|
||||||
|
//GLuint CubeMapTexture() const { return m_CubeMapTexture; }
|
||||||
|
GLuint m_CubeMapTexture = -1;
|
||||||
|
|
||||||
|
private:
|
||||||
|
IRenderer* m_Renderer;
|
||||||
|
std::string m_PreviusCubeMapTexture;
|
||||||
|
|
||||||
|
std::vector<Texture*> m_CubeMapTextures;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
class DrawBloomPass
|
class DrawBloomPass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DrawBloomPass(IRenderer* renderer /* ,Texture or finalpass*/ );
|
DrawBloomPass(IRenderer* renderer, ConfigFile* config);
|
||||||
~DrawBloomPass() { }
|
~DrawBloomPass() { }
|
||||||
void InitializeTextures();
|
void InitializeTextures();
|
||||||
void InitializeFrameBuffers();
|
void InitializeFrameBuffers();
|
||||||
@@ -23,26 +23,33 @@ public:
|
|||||||
void FillGaussianBuffer(FrameBuffer* fb);
|
void FillGaussianBuffer(FrameBuffer* fb);
|
||||||
|
|
||||||
void Draw(GLuint texture);
|
void Draw(GLuint texture);
|
||||||
|
void ChangeQuality(int quality);
|
||||||
|
|
||||||
void OnWindowResize();
|
void OnWindowResize();
|
||||||
|
|
||||||
//Getters
|
//Getters
|
||||||
//Return the blurred result of the texture that was sent into draw
|
//Return the blurred result of the texture that was sent into draw
|
||||||
GLuint GaussianTexture() const { return m_GaussianTexture_vert; }
|
GLuint GaussianTexture() const {
|
||||||
|
if (m_Quality == 0) {
|
||||||
|
return m_BlackTexture->m_Texture;
|
||||||
|
} else {
|
||||||
|
return m_GaussianTexture_vert;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) const;
|
Texture* m_BlackTexture;
|
||||||
|
|
||||||
Texture* m_WhiteTexture;
|
|
||||||
Model* m_ScreenQuad;
|
Model* m_ScreenQuad;
|
||||||
|
|
||||||
const IRenderer* m_Renderer;
|
const IRenderer* m_Renderer;
|
||||||
|
ConfigFile* m_Config;
|
||||||
//const LightCullingPass* m_LightCullingPass
|
//const LightCullingPass* m_LightCullingPass
|
||||||
GLuint m_iterations = 9;
|
int m_Iterations;
|
||||||
|
int m_Quality = 0;
|
||||||
|
|
||||||
GLuint m_GaussianTexture_horiz;
|
GLuint m_GaussianTexture_horiz = 0;
|
||||||
GLuint m_GaussianTexture_vert;
|
GLuint m_GaussianTexture_vert = 0;
|
||||||
|
|
||||||
FrameBuffer m_GaussianFrameBuffer_horiz;
|
FrameBuffer m_GaussianFrameBuffer_horiz;
|
||||||
FrameBuffer m_GaussianFrameBuffer_vert;
|
FrameBuffer m_GaussianFrameBuffer_vert;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
#include "IRenderer.h"
|
#include "IRenderer.h"
|
||||||
#include "DrawFinalPassState.h"
|
#include "DrawFinalPassState.h"
|
||||||
#include "LightCullingPass.h"
|
#include "LightCullingPass.h"
|
||||||
|
#include "CubeMapPass.h"
|
||||||
|
#include "SSAOPass.h"
|
||||||
#include "FrameBuffer.h"
|
#include "FrameBuffer.h"
|
||||||
#include "ShaderProgram.h"
|
#include "ShaderProgram.h"
|
||||||
#include "Util/UnorderedMapVec2.h"
|
#include "Util/UnorderedMapVec2.h"
|
||||||
@@ -13,12 +15,12 @@
|
|||||||
class DrawFinalPass
|
class DrawFinalPass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass);
|
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass, GLuint* depthBuffer);
|
||||||
~DrawFinalPass() { }
|
~DrawFinalPass() { }
|
||||||
void InitializeTextures();
|
void InitializeTextures();
|
||||||
void InitializeFrameBuffers();
|
void InitializeFrameBuffers();
|
||||||
void InitializeShaderPrograms();
|
void InitializeShaderPrograms();
|
||||||
void Draw(RenderScene& scene, GLuint SSAOTexture);
|
void Draw(RenderScene& scene);
|
||||||
void ClearBuffer();
|
void ClearBuffer();
|
||||||
void OnWindowResize();
|
void OnWindowResize();
|
||||||
|
|
||||||
@@ -33,15 +35,14 @@ public:
|
|||||||
FrameBuffer* FinalPassFrameBufferLowRes() { return &m_FinalPassFrameBufferLowRes; }
|
FrameBuffer* FinalPassFrameBufferLowRes() { return &m_FinalPassFrameBufferLowRes; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) const;
|
|
||||||
void GenerateMipMapTexture(GLuint* texture, GLenum wrapping, glm::vec2 dimensions, GLint format, GLenum type, GLint numMipMaps) const;
|
|
||||||
|
|
||||||
void DrawSprites(std::list<std::shared_ptr<RenderJob>>&jobs, RenderScene& scene);
|
void DrawSprites(std::list<std::shared_ptr<RenderJob>>&jobs, RenderScene& scene);
|
||||||
void DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene, GLuint SSAOTexture);
|
void DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
||||||
void DrawShieldToStencilBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
void DrawShieldToStencilBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
||||||
void DrawShieldedModelRenderQueue(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
void DrawShieldedModelRenderQueue(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
||||||
void DrawToDepthBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
void DrawToDepthBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
||||||
|
|
||||||
|
void MergeLayers();
|
||||||
|
|
||||||
void BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene);
|
void BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene);
|
||||||
void BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene);
|
void BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene);
|
||||||
|
|
||||||
@@ -54,20 +55,28 @@ private:
|
|||||||
Texture* m_GreyTexture;
|
Texture* m_GreyTexture;
|
||||||
Texture* m_ErrorTexture;
|
Texture* m_ErrorTexture;
|
||||||
|
|
||||||
|
Model* m_ScreenQuad;
|
||||||
|
|
||||||
|
FrameBuffer m_MergeFrameBuffer;
|
||||||
FrameBuffer m_FinalPassFrameBuffer;
|
FrameBuffer m_FinalPassFrameBuffer;
|
||||||
FrameBuffer m_FinalPassFrameBufferLowRes;
|
FrameBuffer m_FinalPassFrameBufferLowRes;
|
||||||
GLuint m_BloomTexture;
|
GLuint m_BloomTexture;
|
||||||
GLuint m_SceneTexture;
|
GLuint m_SceneTexture;
|
||||||
GLuint m_BloomTextureLowRes;
|
GLuint m_BloomTextureLowRes;
|
||||||
GLuint m_SceneTextureLowRes;
|
GLuint m_SceneTextureLowRes;
|
||||||
GLuint m_DepthBuffer;
|
GLuint* m_DepthBuffer;
|
||||||
GLuint m_DepthBufferLowRes;
|
GLuint m_DepthBufferLowRes;
|
||||||
|
GLuint m_CubeMapTexture;
|
||||||
|
|
||||||
//maqke this component based i guess?
|
//maqke this component based i guess?
|
||||||
GLuint m_ShieldPixelRate = 16;
|
GLuint m_ShieldPixelRate = 16;
|
||||||
|
|
||||||
const IRenderer* m_Renderer;
|
const IRenderer* m_Renderer;
|
||||||
const LightCullingPass* m_LightCullingPass;
|
const LightCullingPass* m_LightCullingPass;
|
||||||
|
const CubeMapPass* m_CubeMapPass;
|
||||||
|
const SSAOPass* m_SSAOPass;
|
||||||
|
|
||||||
|
ShaderProgram* m_MergeProgram;
|
||||||
|
|
||||||
ShaderProgram* m_ForwardPlusProgram;
|
ShaderProgram* m_ForwardPlusProgram;
|
||||||
ShaderProgram* m_ExplosionEffectProgram;
|
ShaderProgram* m_ExplosionEffectProgram;
|
||||||
|
|||||||
@@ -5,11 +5,13 @@
|
|||||||
#include "../OpenGL.h"
|
#include "../OpenGL.h"
|
||||||
#include "../GLM.h"
|
#include "../GLM.h"
|
||||||
#include "../Core/Util/Rectangle.h"
|
#include "../Core/Util/Rectangle.h"
|
||||||
|
#include "../Core/ConfigFile.h"
|
||||||
#include "Util/ScreenCoords.h"
|
#include "Util/ScreenCoords.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "RenderQueue.h"
|
#include "RenderQueue.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
#include "../Core/World.h" //So temp
|
#include "../Core/World.h" //So temp
|
||||||
|
#include "Util/CommonFunctions.h"
|
||||||
|
|
||||||
|
|
||||||
struct PickData
|
struct PickData
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ struct ModelJob : RenderJob
|
|||||||
|
|
||||||
void CalculateHash() override
|
void CalculateHash() override
|
||||||
{
|
{
|
||||||
Hash = TextureID + ModelID << 10 + ShaderID << 20;
|
Hash = ShaderID << 20 + ModelID << 10 + TextureID;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,15 +28,13 @@ public:
|
|||||||
const ShaderProgram& PickingProgram() const { return *m_PickingProgram; }
|
const ShaderProgram& PickingProgram() const { return *m_PickingProgram; }
|
||||||
//const std::unordered_map<glm::ivec2, EntityID>& PickingColorsToEntity() const { return m_PickingColorsToEntity; }
|
//const std::unordered_map<glm::ivec2, EntityID>& PickingColorsToEntity() const { return m_PickingColorsToEntity; }
|
||||||
GLuint PickingTexture() const { return m_PickingTexture; }
|
GLuint PickingTexture() const { return m_PickingTexture; }
|
||||||
GLuint DepthBuffer() const { return m_DepthBuffer; }
|
GLuint* DepthBuffer() { return &m_DepthBuffer; }
|
||||||
const FrameBuffer& PickingBuffer() const { return m_PickingBuffer; }
|
const FrameBuffer& PickingBuffer() const { return m_PickingBuffer; }
|
||||||
|
|
||||||
|
|
||||||
PickData Pick(glm::vec2 screenCoord);
|
PickData Pick(glm::vec2 screenCoord);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) const;
|
|
||||||
|
|
||||||
EventBroker* m_EventBroker;
|
EventBroker* m_EventBroker;
|
||||||
|
|
||||||
const IRenderer* m_Renderer;
|
const IRenderer* m_Renderer;
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ public:
|
|||||||
bool StencilFunc(GLenum func, GLint ref, GLuint mask);
|
bool StencilFunc(GLenum func, GLint ref, GLuint mask);
|
||||||
bool StencilMask(GLuint mask);
|
bool StencilMask(GLuint mask);
|
||||||
bool DepthMask(GLboolean flag);
|
bool DepthMask(GLboolean flag);
|
||||||
|
bool DepthFunc(GLenum func);
|
||||||
|
bool AlphaFunc(GLenum func, GLclampf thresholder);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::function<void(void)>> m_ResetFunctions;
|
std::vector<std::function<void(void)>> m_ResetFunctions;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include "DrawBloomPass.h"
|
#include "DrawBloomPass.h"
|
||||||
#include "DrawColorCorrectionPass.h"
|
#include "DrawColorCorrectionPass.h"
|
||||||
#include "SSAOPass.h"
|
#include "SSAOPass.h"
|
||||||
|
#include "CubeMapPass.h"
|
||||||
#include "../Core/EventBroker.h"
|
#include "../Core/EventBroker.h"
|
||||||
#include "ImGuiRenderPass.h"
|
#include "ImGuiRenderPass.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
@@ -31,8 +32,9 @@ class Renderer : public IRenderer
|
|||||||
static void glfwFrameBufferCallback(GLFWwindow* window, int width, int height);
|
static void glfwFrameBufferCallback(GLFWwindow* window, int width, int height);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Renderer(EventBroker* eventBroker)
|
Renderer(EventBroker* eventBroker, ConfigFile* config)
|
||||||
: m_EventBroker(eventBroker)
|
: m_EventBroker(eventBroker)
|
||||||
|
, m_Config(config)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual void Initialize() override;
|
virtual void Initialize() override;
|
||||||
@@ -46,6 +48,7 @@ private:
|
|||||||
//----------------------Variables----------------------//
|
//----------------------Variables----------------------//
|
||||||
|
|
||||||
static std::unordered_map <GLFWwindow*, Renderer*> m_WindowToRenderer;
|
static std::unordered_map <GLFWwindow*, Renderer*> m_WindowToRenderer;
|
||||||
|
ConfigFile* m_Config;
|
||||||
|
|
||||||
EventBroker* m_EventBroker;
|
EventBroker* m_EventBroker;
|
||||||
TextPass* m_TextPass;
|
TextPass* m_TextPass;
|
||||||
@@ -58,13 +61,10 @@ private:
|
|||||||
Model* m_UnitSphere;
|
Model* m_UnitSphere;
|
||||||
|
|
||||||
int m_DebugTextureToDraw = 0;
|
int m_DebugTextureToDraw = 0;
|
||||||
|
int m_CubeMapTexture = 0;
|
||||||
bool m_ResizeWindow = false;
|
bool m_ResizeWindow = false;
|
||||||
float m_SSAO_Radius = 1.0f;
|
int m_SSAO_Quality = 0;
|
||||||
float m_SSAO_Bias = 0.05f;
|
int m_GLOW_Quality = 2;
|
||||||
float m_SSAO_Contrast = 1.5f;
|
|
||||||
float m_SSAO_IntensityScale = 1.0f;
|
|
||||||
int m_SSAO_NumOfSamples = 24;
|
|
||||||
int m_SSAO_NumOfTurns = 7;
|
|
||||||
|
|
||||||
PickingPass* m_PickingPass;
|
PickingPass* m_PickingPass;
|
||||||
LightCullingPass* m_LightCullingPass;
|
LightCullingPass* m_LightCullingPass;
|
||||||
@@ -74,6 +74,7 @@ private:
|
|||||||
DrawBloomPass* m_DrawBloomPass;
|
DrawBloomPass* m_DrawBloomPass;
|
||||||
DrawColorCorrectionPass* m_DrawColorCorrectionPass;
|
DrawColorCorrectionPass* m_DrawColorCorrectionPass;
|
||||||
SSAOPass* m_SSAOPass;
|
SSAOPass* m_SSAOPass;
|
||||||
|
CubeMapPass* m_CubeMapPass;
|
||||||
|
|
||||||
//----------------------Functions----------------------//
|
//----------------------Functions----------------------//
|
||||||
void InitializeWindow();
|
void InitializeWindow();
|
||||||
|
|||||||
@@ -13,15 +13,32 @@
|
|||||||
class SSAOPass
|
class SSAOPass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SSAOPass(IRenderer* rendere);
|
SSAOPass(IRenderer* renderer, ConfigFile* config);
|
||||||
~SSAOPass() { };
|
~SSAOPass() { };
|
||||||
|
|
||||||
|
void ChangeQuality(int quality);
|
||||||
|
|
||||||
void Draw(GLuint depthBuffer, Camera* camera);
|
void Draw(GLuint depthBuffer, Camera* camera);
|
||||||
void Setting(float radius, float bias, float contrast, float intensityScale, int numOfSamples, int NumOfTurns);
|
void Setting(float radius, float bias, float contrast, float intensityScale, int numOfSamples, int numOfTurns, int iterations, int quality);
|
||||||
void ClearBuffer();
|
void ClearBuffer();
|
||||||
|
void OnWindowResize();
|
||||||
|
|
||||||
//Return the SSAO of the texture sent to Draw
|
//Return the SSAO of the texture sent to Draw
|
||||||
GLuint SSAOTexture() const { return m_DrawBloomPass->GaussianTexture(); }
|
GLuint SSAOTexture() const {
|
||||||
|
if (m_Quality == 0) {
|
||||||
|
return m_WhiteTexture->m_Texture;
|
||||||
|
} else {
|
||||||
|
return m_Gaussian_vert;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int TextureQuality() const {
|
||||||
|
if (m_Quality == 0) {
|
||||||
|
return 13;
|
||||||
|
} else {
|
||||||
|
return m_TextureQuality;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InitializeTexture();
|
void InitializeTexture();
|
||||||
@@ -29,15 +46,13 @@ private:
|
|||||||
void InitializeShaderProgram();
|
void InitializeShaderProgram();
|
||||||
void InitializeBuffer();
|
void InitializeBuffer();
|
||||||
|
|
||||||
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) const;
|
|
||||||
|
|
||||||
void ComputeAO(GLuint depthBuffer, Camera* camera);
|
|
||||||
//void blurHorizontal(GLuint depthBuffer);
|
//void blurHorizontal(GLuint depthBuffer);
|
||||||
//void blurVertical(GLuint depthBuffer);
|
//void blurVertical(GLuint depthBuffer);
|
||||||
|
|
||||||
Model* m_ScreenQuad;
|
Model* m_ScreenQuad;
|
||||||
|
|
||||||
const IRenderer* m_Renderer;
|
const IRenderer* m_Renderer;
|
||||||
|
ConfigFile* m_Config;
|
||||||
|
|
||||||
float m_Radius;
|
float m_Radius;
|
||||||
float m_Bias;
|
float m_Bias;
|
||||||
@@ -45,17 +60,28 @@ private:
|
|||||||
float m_IntensityScale;
|
float m_IntensityScale;
|
||||||
int m_NumOfSamples;
|
int m_NumOfSamples;
|
||||||
int m_NumOfTurns;
|
int m_NumOfTurns;
|
||||||
|
int m_Iterations;
|
||||||
|
int m_TextureQuality;
|
||||||
|
int m_Quality = 0;
|
||||||
|
|
||||||
GLuint m_SSAOTexture;
|
Texture* m_WhiteTexture;
|
||||||
|
|
||||||
|
GLuint m_SSAOTexture = 0;
|
||||||
FrameBuffer m_SSAOFramBuffer;
|
FrameBuffer m_SSAOFramBuffer;
|
||||||
|
|
||||||
GLuint m_SSAOViewSpaceZTexture;
|
GLuint m_SSAOViewSpaceZTexture = 0;
|
||||||
FrameBuffer m_SSAOViewSpaceZFramBuffer;
|
FrameBuffer m_SSAOViewSpaceZFramBuffer;
|
||||||
|
|
||||||
|
GLuint m_Gaussian_horiz = 0;
|
||||||
|
GLuint m_Gaussian_vert = 0;
|
||||||
|
|
||||||
|
FrameBuffer m_GaussianFrameBuffer_horiz;
|
||||||
|
FrameBuffer m_GaussianFrameBuffer_vert;
|
||||||
|
|
||||||
ShaderProgram* m_SSAOProgram;
|
ShaderProgram* m_SSAOProgram;
|
||||||
ShaderProgram* m_SSAOViewSpaceZProgram;
|
ShaderProgram* m_SSAOViewSpaceZProgram;
|
||||||
|
ShaderProgram* m_GaussianProgram_horiz;
|
||||||
DrawBloomPass* m_DrawBloomPass;
|
ShaderProgram* m_GaussianProgram_vert;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
struct SpriteJob : RenderJob
|
struct SpriteJob : RenderJob
|
||||||
{
|
{
|
||||||
SpriteJob(ComponentWrapper cSprite, Camera* camera, glm::mat4 matrix, World* world, glm::vec4 fillColor, float fillPercentage, bool depthSorted)
|
SpriteJob(ComponentWrapper cSprite, Camera* camera, glm::mat4 matrix, World* world, glm::vec4 fillColor, float fillPercentage, bool depthSorted, bool isIndicator)
|
||||||
: RenderJob()
|
: RenderJob()
|
||||||
{
|
{
|
||||||
Model = ResourceManager::Load<::Model>("Models/Core/UnitQuad.mesh");
|
Model = ResourceManager::Load<::Model>("Models/Core/UnitQuad.mesh");
|
||||||
@@ -30,7 +30,7 @@ struct SpriteJob : RenderJob
|
|||||||
|
|
||||||
StartIndex = matProp.material->StartIndex;
|
StartIndex = matProp.material->StartIndex;
|
||||||
EndIndex = matProp.material->EndIndex;
|
EndIndex = matProp.material->EndIndex;
|
||||||
Matrix = matrix;
|
Matrix = matrix;
|
||||||
Color = cSprite["Color"];
|
Color = cSprite["Color"];
|
||||||
Entity = cSprite.EntityID;
|
Entity = cSprite.EntityID;
|
||||||
Position = Transform::AbsolutePosition(world, cSprite.EntityID);
|
Position = Transform::AbsolutePosition(world, cSprite.EntityID);
|
||||||
@@ -41,6 +41,7 @@ struct SpriteJob : RenderJob
|
|||||||
}
|
}
|
||||||
World = world;
|
World = world;
|
||||||
Pickable = world->HasComponent(cSprite.EntityID, "Button");
|
Pickable = world->HasComponent(cSprite.EntityID, "Button");
|
||||||
|
IsIndicator = isIndicator;
|
||||||
|
|
||||||
FillColor = fillColor;
|
FillColor = fillColor;
|
||||||
FillPercentage = fillPercentage;
|
FillPercentage = fillPercentage;
|
||||||
@@ -61,7 +62,9 @@ struct SpriteJob : RenderJob
|
|||||||
unsigned int StartIndex = 0;
|
unsigned int StartIndex = 0;
|
||||||
unsigned int EndIndex = 0;
|
unsigned int EndIndex = 0;
|
||||||
World* World;
|
World* World;
|
||||||
|
|
||||||
bool Pickable;
|
bool Pickable;
|
||||||
|
bool IsIndicator = false;
|
||||||
|
|
||||||
glm::vec4 FillColor = glm::vec4(0);
|
glm::vec4 FillColor = glm::vec4(0);
|
||||||
float FillPercentage = 0.0;
|
float FillPercentage = 0.0;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public:
|
|||||||
void Bind(GLenum textureUnit = GL_TEXTURE0);
|
void Bind(GLenum textureUnit = GL_TEXTURE0);
|
||||||
|
|
||||||
GLuint m_Texture = 0;
|
GLuint m_Texture = 0;
|
||||||
|
unsigned char* Data = nullptr;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
namespace CommonFunctions
|
namespace CommonFunctions
|
||||||
{
|
{
|
||||||
Texture* LoadTexture(std::string path, bool threaded);
|
Texture* LoadTexture(std::string path, bool threaded);
|
||||||
|
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 GenerateMipMapTexture(GLuint* texture, GLenum wrapping, glm::vec2 dimensions, GLint format, GLenum type, GLint numMipMaps);
|
||||||
|
void DeleteTexture(GLuint* texture);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#include "Core/EntitySystem.h"
|
|
||||||
#include "Rendering/IRenderer.h"
|
|
||||||
#include "Core/Octree.h"
|
|
||||||
#include "Collision/EntityAABB.h"
|
|
||||||
|
|
||||||
class CapturePointsEntitySystem : public EntitySystem<World>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CapturePointsEntitySystem(EventBroker* eventBroker, bool isClient, bool isServer, IRenderer* renderer, RenderFrame* renderFrame);
|
|
||||||
~CapturePointsEntitySystem();
|
|
||||||
|
|
||||||
private:
|
|
||||||
IRenderer* m_Renderer;
|
|
||||||
RenderFrame* m_RenderFrame;
|
|
||||||
Octree<EntityAABB>* m_OctreeCollision = nullptr;
|
|
||||||
Octree<EntityAABB>* m_OctreeTrigger = nullptr;
|
|
||||||
Octree<EntityAABB>* m_OctreeFrustrumCulling = nullptr;
|
|
||||||
};
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#ifndef EAmmoPickup_h__
|
|
||||||
#define EAmmoPickup_h__
|
|
||||||
|
|
||||||
#include "Core/EventBroker.h"
|
|
||||||
#include "Core/EntityWrapper.h"
|
|
||||||
|
|
||||||
namespace Events
|
|
||||||
{
|
|
||||||
|
|
||||||
struct AmmoPickup : Event
|
|
||||||
{
|
|
||||||
EntityWrapper Player;
|
|
||||||
int AmmoGain;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -8,7 +8,7 @@ namespace Events
|
|||||||
|
|
||||||
struct DoubleJump : public Event
|
struct DoubleJump : public Event
|
||||||
{
|
{
|
||||||
|
EntityID entityID;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
#ifndef EGameEnd_h__
|
|
||||||
#define EGameEnd_h__
|
|
||||||
|
|
||||||
#include "Core/Event.h"
|
|
||||||
|
|
||||||
namespace Events
|
|
||||||
{
|
|
||||||
|
|
||||||
struct GameEnd : Event
|
|
||||||
{
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#ifndef EGameStart_h__
|
|
||||||
#define EGameStart_h__
|
|
||||||
|
|
||||||
#include "Core/Event.h"
|
|
||||||
|
|
||||||
namespace Events
|
|
||||||
{
|
|
||||||
|
|
||||||
struct GameStart : Event
|
|
||||||
{
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#ifndef EPlayerHealthPickup_h__
|
|
||||||
#define EPlayerHealthPickup_h__
|
|
||||||
|
|
||||||
#include "Core/EventBroker.h"
|
|
||||||
#include "Core/EntityWrapper.h"
|
|
||||||
|
|
||||||
namespace Events
|
|
||||||
{
|
|
||||||
|
|
||||||
struct PlayerHealthPickup : Event
|
|
||||||
{
|
|
||||||
EntityWrapper Player;
|
|
||||||
double HealthAmount;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#ifndef EWin_h__
|
|
||||||
#define EWin_h__
|
|
||||||
|
|
||||||
#include "Core/EventBroker.h"
|
|
||||||
#include "Core/Entity.h"
|
|
||||||
|
|
||||||
namespace Events
|
|
||||||
{
|
|
||||||
|
|
||||||
//triggers when a team has captured all capturePoints
|
|
||||||
struct Win : Event
|
|
||||||
{
|
|
||||||
// The winning team corresponding to TeamEnum
|
|
||||||
ComponentInfo::EnumType Team;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
+9
-3
@@ -12,16 +12,18 @@
|
|||||||
#include "Input/InputProxy.h"
|
#include "Input/InputProxy.h"
|
||||||
#include "Input/KeyboardInputHandler.h"
|
#include "Input/KeyboardInputHandler.h"
|
||||||
#include "Input/MouseInputHandler.h"
|
#include "Input/MouseInputHandler.h"
|
||||||
|
#include "Core/EKeyDown.h"
|
||||||
#include "Core/EntityFilePreprocessor.h"
|
#include "Core/EntityFilePreprocessor.h"
|
||||||
#include "Core/EntitySystem.h"
|
#include "Core/SystemPipeline.h"
|
||||||
#include "Systems/ExplosionEffectSystem.h"
|
#include "Systems/ExplosionEffectSystem.h"
|
||||||
#include "Editor/EditorSystem.h"
|
#include "Editor/EditorSystem.h"
|
||||||
#include "Core/EntityFile.h"
|
#include "Core/EntityFile.h"
|
||||||
|
#include "Rendering/RenderSystem.h"
|
||||||
#include "Core/EntityFileParser.h"
|
#include "Core/EntityFileParser.h"
|
||||||
#include "Core/Octree.h"
|
#include "Core/Octree.h"
|
||||||
#include "Rendering/Font.h"
|
#include "Rendering/Font.h"
|
||||||
|
#include "Systems/InterpolationSystem.h"
|
||||||
#include "Collision/EntityAABB.h"
|
#include "Collision/EntityAABB.h"
|
||||||
|
|
||||||
// Network
|
// Network
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
#include "Network/Network.h"
|
#include "Network/Network.h"
|
||||||
@@ -53,7 +55,11 @@ private:
|
|||||||
IRenderer* m_Renderer;
|
IRenderer* m_Renderer;
|
||||||
InputManager* m_InputManager;
|
InputManager* m_InputManager;
|
||||||
InputProxy* m_InputProxy;
|
InputProxy* m_InputProxy;
|
||||||
EntitySystem<World>* m_EntitySystem;
|
World* m_World;
|
||||||
|
Octree<EntityAABB>* m_OctreeCollision;
|
||||||
|
Octree<EntityAABB>* m_OctreeTrigger;
|
||||||
|
Octree<EntityAABB>* m_OctreeFrustrumCulling;
|
||||||
|
SystemPipeline* m_SystemPipeline;
|
||||||
RenderFrame* m_RenderFrame;
|
RenderFrame* m_RenderFrame;
|
||||||
Client* m_NetworkClient = nullptr;
|
Client* m_NetworkClient = nullptr;
|
||||||
Server* m_NetworkServer = nullptr;
|
Server* m_NetworkServer = nullptr;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
#include "Core/Transform.h"
|
#include "Core/Transform.h"
|
||||||
#include "Core/ResourceManager.h"
|
#include "Core/ResourceManager.h"
|
||||||
#include "Core/EntityFileParser.h"
|
#include "Core/EntityFileParser.h"
|
||||||
#include "Events/EPickupSpawned.h"
|
#include "Core/EPickupSpawned.h"
|
||||||
#include "Events/EAmmoPickup.h"
|
#include "Core/EAmmoPickup.h"
|
||||||
#include "Engine/Collision/ETrigger.h"
|
#include "Engine/Collision/ETrigger.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
||||||
@@ -26,6 +26,7 @@ private:
|
|||||||
double AmmoGain;
|
double AmmoGain;
|
||||||
double RespawnTimer;
|
double RespawnTimer;
|
||||||
double DecreaseThisRespawnTimer;
|
double DecreaseThisRespawnTimer;
|
||||||
|
EntityID parentID;
|
||||||
};
|
};
|
||||||
std::vector<NewAmmoPickup> m_ETriggerTouchVector;
|
std::vector<NewAmmoPickup> m_ETriggerTouchVector;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "Core/System.h"
|
#include "Core/System.h"
|
||||||
#include "Engine/Collision/ETrigger.h"
|
#include "Engine/Collision/ETrigger.h"
|
||||||
#include "Events/ECaptured.h"
|
#include "Core/ECaptured.h"
|
||||||
|
#include "Core/EWin.h"
|
||||||
|
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
#include "Core/System.h"
|
|
||||||
#include "Events/EGameStart.h"
|
|
||||||
#include "Events/EGameEnd.h"
|
|
||||||
#include "Events/ECaptured.h"
|
|
||||||
#include "Events/EWin.h"
|
|
||||||
|
|
||||||
class CapturePointsGamemode : public ImpureSystem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CapturePointsGamemode(SystemParams params);
|
|
||||||
|
|
||||||
virtual void Update(double dt) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool m_GameRuning = false;
|
|
||||||
double m_GameTime = 0.0;
|
|
||||||
|
|
||||||
EventRelay<CapturePointsGamemode, Events::GameStart> m_EGameStart;
|
|
||||||
bool OnGameStart(const Events::GameStart& e);
|
|
||||||
EventRelay<CapturePointsGamemode, Events::Captured> m_ECaptured;
|
|
||||||
bool OnCaptured(const Events::Captured& e);
|
|
||||||
|
|
||||||
boost::optional<ComponentWrapper> currentGamemode();
|
|
||||||
bool isCurrentGamemode();
|
|
||||||
boost::optional<ComponentInfo::EnumType> winCondition();
|
|
||||||
void setRunning(bool running);
|
|
||||||
};
|
|
||||||
@@ -14,11 +14,13 @@
|
|||||||
#include <glm/gtx/vector_angle.hpp>
|
#include <glm/gtx/vector_angle.hpp>
|
||||||
|
|
||||||
#include "Rendering/Util/CommonFunctions.h"
|
#include "Rendering/Util/CommonFunctions.h"
|
||||||
|
//#define INDICATOR_TEST
|
||||||
|
|
||||||
class DamageIndicatorSystem : public System
|
class DamageIndicatorSystem : public ImpureSystem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DamageIndicatorSystem(SystemParams params);
|
DamageIndicatorSystem(SystemParams params);
|
||||||
|
virtual void Update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EventRelay<DamageIndicatorSystem, Events::PlayerDamage> m_EPlayerDamage;
|
EventRelay<DamageIndicatorSystem, Events::PlayerDamage> m_EPlayerDamage;
|
||||||
@@ -28,6 +30,20 @@ private:
|
|||||||
bool OnSetCamera(const Events::SetCamera& e);
|
bool OnSetCamera(const Events::SetCamera& e);
|
||||||
|
|
||||||
EntityID m_CurrentCamera = -1;
|
EntityID m_CurrentCamera = -1;
|
||||||
|
struct DamageIndicatorStruct {
|
||||||
|
EntityWrapper spriteEntity;
|
||||||
|
glm::vec3 enemyPosition;
|
||||||
|
DamageIndicatorStruct(EntityWrapper sprite, glm::vec3 pos)
|
||||||
|
: spriteEntity(sprite)
|
||||||
|
, enemyPosition(pos) {}
|
||||||
|
};
|
||||||
|
std::vector<DamageIndicatorStruct> updateDamageIndicatorVector;
|
||||||
|
float CalculateAngle(EntityWrapper player, glm::vec3 enemyPos);
|
||||||
|
|
||||||
|
//for tests
|
||||||
|
#ifdef INDICATOR_TEST
|
||||||
|
glm::vec3 DamageIndicatorTest(EntityWrapper player);
|
||||||
|
int m_TestVar = 0;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "Core/System.h"
|
#include "Core/System.h"
|
||||||
#include "Core/EPlayerDamage.h"
|
#include "Core/EPlayerDamage.h"
|
||||||
|
#include "Core/EPlayerHealthPickup.h"
|
||||||
#include "Core/EPlayerDeath.h"
|
#include "Core/EPlayerDeath.h"
|
||||||
#include "Events/EPlayerHealthPickup.h"
|
|
||||||
#include "Core/ConfigFile.h"
|
#include "Core/ConfigFile.h"
|
||||||
#include "Input/EInputCommand.h"
|
#include "Input/EInputCommand.h"
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
#include "Core/Transform.h"
|
#include "Core/Transform.h"
|
||||||
#include "Core/ResourceManager.h"
|
#include "Core/ResourceManager.h"
|
||||||
#include "Core/EntityFileParser.h"
|
#include "Core/EntityFileParser.h"
|
||||||
#include "Events/EPickupSpawned.h"
|
#include "Core/EPickupSpawned.h"
|
||||||
#include "Events/EPlayerHealthPickup.h"
|
#include "Core/EPlayerHealthPickup.h"
|
||||||
#include "Engine/Collision/ETrigger.h"
|
#include "Engine/Collision/ETrigger.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
@@ -27,6 +27,7 @@ private:
|
|||||||
double HealthGain;
|
double HealthGain;
|
||||||
double RespawnTimer;
|
double RespawnTimer;
|
||||||
double DecreaseThisRespawnTimer;
|
double DecreaseThisRespawnTimer;
|
||||||
|
EntityID parentID;
|
||||||
};
|
};
|
||||||
std::vector<NewHealthPickup> m_ETriggerTouchVector;
|
std::vector<NewHealthPickup> m_ETriggerTouchVector;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,10 +34,14 @@ private:
|
|||||||
glm::vec3 m_LastPosition = glm::vec3();
|
glm::vec3 m_LastPosition = glm::vec3();
|
||||||
// The logic for making the sound play when player is moving
|
// The logic for making the sound play when player is moving
|
||||||
void playerStep(double dt);
|
void playerStep(double dt);
|
||||||
|
// Spawn a hexagon at origin of an Entity
|
||||||
|
void spawnHexagon(EntityWrapper target);
|
||||||
|
|
||||||
EventRelay<PlayerMovementSystem, Events::PlayerSpawned> m_EPlayerSpawned;
|
EventRelay<PlayerMovementSystem, Events::PlayerSpawned> m_EPlayerSpawned;
|
||||||
bool OnPlayerSpawned(Events::PlayerSpawned& e);
|
bool OnPlayerSpawned(Events::PlayerSpawned& e);
|
||||||
|
EventRelay<PlayerMovementSystem, Events::DoubleJump> m_EDoubleJump;
|
||||||
|
bool PlayerMovementSystem::OnDoubleJump(Events::DoubleJump & e);
|
||||||
|
|
||||||
void updateMovementControllers(double dt);
|
void updateMovementControllers(double dt);
|
||||||
void updateVelocity(double dt);
|
void updateVelocity(EntityWrapper player, double dt);
|
||||||
};
|
};
|
||||||
@@ -13,10 +13,10 @@
|
|||||||
#include "../Engine/Core/EShoot.h"
|
#include "../Engine/Core/EShoot.h"
|
||||||
#include "../Engine/Core/EPlayerSpawned.h"
|
#include "../Engine/Core/EPlayerSpawned.h"
|
||||||
#include "../Engine/Input/EInputCommand.h"
|
#include "../Engine/Input/EInputCommand.h"
|
||||||
#include "Events/ECaptured.h"
|
#include "../Engine/Core/ECaptured.h"
|
||||||
#include "../Engine/Core/EPlayerDamage.h"
|
#include "../Engine/Core/EPlayerDamage.h"
|
||||||
#include "../Engine/Core/EPlayerDeath.h"
|
#include "../Engine/Core/EPlayerDeath.h"
|
||||||
#include "Events/EPlayerHealthPickup.h"
|
#include "../Engine/Core/EPlayerHealthPickup.h"
|
||||||
#include "../Engine/Collision/ETrigger.h"
|
#include "../Engine/Collision/ETrigger.h"
|
||||||
#include "../Engine/Sound/EPlaySoundOnEntity.h"
|
#include "../Engine/Sound/EPlaySoundOnEntity.h"
|
||||||
#include "../Engine/Sound/EPlayBackgroundMusic.h"
|
#include "../Engine/Sound/EPlayBackgroundMusic.h"
|
||||||
|
|||||||
@@ -1,37 +1,33 @@
|
|||||||
|
#ifndef AssaultWeaponBehaviour_h__
|
||||||
|
#define AssaultWeaponBehaviour_h__
|
||||||
|
|
||||||
#include "Sound/EPlaySoundOnEntity.h"
|
#include "Sound/EPlaySoundOnEntity.h"
|
||||||
#include "Collision/Collision.h"
|
#include "Collision/Collision.h"
|
||||||
#include "Rendering/AnimationSystem.h"
|
|
||||||
#include "Core/ConfigFile.h"
|
#include "Core/ConfigFile.h"
|
||||||
#include "WeaponBehaviour.h"
|
#include "WeaponBehaviour.h"
|
||||||
#include "../SpawnerSystem.h"
|
#include "../SpawnerSystem.h"
|
||||||
#include "Core/EPlayerDamage.h"
|
#include "Core/EPlayerDamage.h"
|
||||||
#include "Core/EShoot.h"
|
#include "Core/EShoot.h"
|
||||||
|
|
||||||
|
class AssaultWeaponBehaviour : public WeaponBehaviour<AssaultWeaponBehaviour>
|
||||||
class AssaultWeaponBehaviour : public WeaponBehaviour
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AssaultWeaponBehaviour(SystemParams systemParams, IRenderer* renderer, Octree<EntityAABB>* collisionOctree, EntityWrapper weaponEntity);
|
AssaultWeaponBehaviour(SystemParams systemParams, IRenderer* renderer, Octree<EntityAABB>* collisionOctree)
|
||||||
|
: WeaponBehaviour(systemParams, "AssaultWeapon", renderer, collisionOctree)
|
||||||
|
{ }
|
||||||
|
|
||||||
virtual void Fire() override;
|
protected:
|
||||||
virtual void CeaseFire() override;
|
virtual void OnPrimaryFire(WeaponInfo& wi) override;
|
||||||
virtual void Reload() override;
|
virtual void OnCeasePrimaryFire(WeaponInfo& wi) override;
|
||||||
|
virtual void OnReload(WeaponInfo& wi) override;
|
||||||
virtual void Update(double dt) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EntityWrapper m_FirstPersonModel;
|
|
||||||
EntityWrapper m_ThirdPersonModel;
|
|
||||||
// State
|
// State
|
||||||
bool m_Firing = false;
|
bool m_Firing = false;
|
||||||
bool m_Reloading = false;
|
bool m_Reloading = false;
|
||||||
double m_ReloadTimer = 0.0;
|
double m_ReloadTimer = 0.0;
|
||||||
EntityWrapper m_FirstPersonReloadImpersonator;
|
|
||||||
EntityWrapper m_ThirdPersonReloadImpersonator;
|
|
||||||
double m_TimeSinceLastFire = 0.0;
|
double m_TimeSinceLastFire = 0.0;
|
||||||
|
EntityWrapper m_FirstPersonReloadImpostor;
|
||||||
EventRelay<WeaponBehaviour, Events::AnimationComplete> m_EAnimationComplete;
|
|
||||||
bool OnAnimationComplete(Events::AnimationComplete& e);
|
|
||||||
|
|
||||||
bool hasAmmo();
|
bool hasAmmo();
|
||||||
void fireRound();
|
void fireRound();
|
||||||
@@ -47,3 +43,5 @@ private:
|
|||||||
bool shoot(double damage);
|
bool shoot(double damage);
|
||||||
void showHitMarker();
|
void showHitMarker();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#include "WeaponBehaviour.h"
|
||||||
|
#include "Collision/Collision.h"
|
||||||
|
#include "Core/EPlayerDamage.h"
|
||||||
|
#include "Rendering/ESetCamera.h"
|
||||||
|
|
||||||
|
class DefenderWeaponBehaviour : public WeaponBehaviour<DefenderWeaponBehaviour>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DefenderWeaponBehaviour(SystemParams systemParams, IRenderer* renderer, Octree<EntityAABB>* collisionOctree)
|
||||||
|
: System(systemParams)
|
||||||
|
, WeaponBehaviour(systemParams, "DefenderWeapon", renderer, collisionOctree)
|
||||||
|
, m_RandomEngine(m_RandomDevice())
|
||||||
|
{
|
||||||
|
EVENT_SUBSCRIBE_MEMBER(m_ESetCamera, &DefenderWeaponBehaviour::OnSetCamera);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override;
|
||||||
|
void UpdateWeapon(WeaponInfo& wi, double dt) override;
|
||||||
|
void OnPrimaryFire(WeaponInfo& wi) override;
|
||||||
|
void OnCeasePrimaryFire(WeaponInfo& wi) override;
|
||||||
|
bool OnInputCommand(WeaponInfo& wi, const Events::InputCommand& e) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::random_device m_RandomDevice;
|
||||||
|
std::mt19937 m_RandomEngine;
|
||||||
|
EntityWrapper m_CurrentCamera;
|
||||||
|
|
||||||
|
EventRelay<DefenderWeaponBehaviour, Events::SetCamera> m_ESetCamera;
|
||||||
|
bool OnSetCamera(const Events::SetCamera& e);
|
||||||
|
|
||||||
|
// Weapon functions
|
||||||
|
void fireShell(WeaponInfo& wi);
|
||||||
|
void dealDamage(WeaponInfo& wi, glm::vec3 direction, double damage);
|
||||||
|
|
||||||
|
// Utility
|
||||||
|
float traceRayDistance(glm::vec3 origin, glm::vec3 direction);
|
||||||
|
Camera cameraFromEntity(EntityWrapper camera);
|
||||||
|
};
|
||||||
@@ -5,30 +5,177 @@
|
|||||||
#include "Rendering/IRenderer.h"
|
#include "Rendering/IRenderer.h"
|
||||||
#include "Core/Octree.h"
|
#include "Core/Octree.h"
|
||||||
#include "Collision/EntityAABB.h"
|
#include "Collision/EntityAABB.h"
|
||||||
|
#include "Input/EInputCommand.h"
|
||||||
|
#include "Systems/SpawnerSystem.h"
|
||||||
|
|
||||||
class WeaponBehaviour : public System
|
template <typename ETYPE>
|
||||||
|
class WeaponBehaviour : public PureSystem
|
||||||
{
|
{
|
||||||
|
friend class WeaponSystem;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WeaponBehaviour(SystemParams systemParams, IRenderer* renderer, Octree<EntityAABB>* collisionOctree, EntityWrapper player)
|
WeaponBehaviour(SystemParams params, std::string componentType, IRenderer* renderer, Octree<EntityAABB>* collisionOctree)
|
||||||
: System(systemParams)
|
: System(params)
|
||||||
|
, PureSystem(componentType)
|
||||||
, m_Renderer(renderer)
|
, m_Renderer(renderer)
|
||||||
, m_CollisionOctree(collisionOctree)
|
, m_CollisionOctree(collisionOctree)
|
||||||
, m_Player(player)
|
{
|
||||||
{ }
|
EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &WeaponBehaviour::_OnInputCommand)
|
||||||
|
}
|
||||||
virtual ~WeaponBehaviour() = default;
|
virtual ~WeaponBehaviour() = default;
|
||||||
|
|
||||||
WeaponBehaviour(const WeaponBehaviour&) = delete;
|
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt) override
|
||||||
WeaponBehaviour& operator=(const WeaponBehaviour &) = delete;
|
{
|
||||||
|
auto weapon = getActiveWeapon(entity);
|
||||||
virtual void Fire() = 0;
|
if (!weapon) {
|
||||||
virtual void CeaseFire() { }
|
return;
|
||||||
virtual void Reload() { }
|
} else {
|
||||||
virtual void Update(double dt) { }
|
UpdateWeapon(*weapon, dt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
struct WeaponInfo
|
||||||
|
{
|
||||||
|
std::string WeaponComponent;
|
||||||
|
EntityWrapper Player;
|
||||||
|
EntityWrapper WeaponEntity;
|
||||||
|
EntityWrapper FirstPersonEntity;
|
||||||
|
EntityWrapper ThirdPersonEntity;
|
||||||
|
ComponentWrapper GetComponent() { return WeaponEntity[WeaponComponent]; }
|
||||||
|
};
|
||||||
|
|
||||||
IRenderer* m_Renderer;
|
IRenderer* m_Renderer;
|
||||||
Octree<EntityAABB>* m_CollisionOctree;
|
Octree<EntityAABB>* m_CollisionOctree;
|
||||||
EntityWrapper m_Player;
|
std::unordered_map<EntityWrapper, WeaponInfo> m_ActiveWeapons;
|
||||||
|
|
||||||
|
virtual void UpdateWeapon(WeaponInfo& wi, double dt) { }
|
||||||
|
virtual void OnPrimaryFire(WeaponInfo& wi) { }
|
||||||
|
virtual void OnCeasePrimaryFire(WeaponInfo& wi) { }
|
||||||
|
virtual void OnReload(WeaponInfo& wi) { }
|
||||||
|
virtual bool OnInputCommand(WeaponInfo& wi, const Events::InputCommand& e) { return false; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
EventRelay<ETYPE, Events::InputCommand> m_EInputCommand;
|
||||||
|
bool _OnInputCommand(const Events::InputCommand& e)
|
||||||
|
{
|
||||||
|
EntityWrapper player = e.Player;
|
||||||
|
if (e.PlayerID == -1) {
|
||||||
|
player = LocalPlayer;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure the player is alive
|
||||||
|
if (!player.Valid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure the player has this weapon
|
||||||
|
auto weapon = getWeaponComponent(player);
|
||||||
|
if (!weapon) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Weapon selection
|
||||||
|
if (e.Command == "SelectWeapon") {
|
||||||
|
if (static_cast<ComponentInfo::EnumType>(e.Value) == static_cast<ComponentInfo::EnumType>((*weapon)["Slot"])) {
|
||||||
|
selectWeapon(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only handle weapon actions if the weapon is active
|
||||||
|
auto activeWeapon = getActiveWeapon(player);
|
||||||
|
if (!activeWeapon) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fire
|
||||||
|
if (e.Command == "PrimaryFire") {
|
||||||
|
if (e.Value > 0) {
|
||||||
|
OnPrimaryFire(*activeWeapon);
|
||||||
|
} else {
|
||||||
|
OnCeasePrimaryFire(*activeWeapon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reload
|
||||||
|
if (e.Command == "Reload" && e.Value != 0) {
|
||||||
|
OnReload(*activeWeapon);
|
||||||
|
}
|
||||||
|
|
||||||
|
return OnInputCommand(*activeWeapon, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
boost::optional<ComponentWrapper> getWeaponComponent(EntityWrapper player)
|
||||||
|
{
|
||||||
|
if (!player.HasComponent(m_ComponentType)) {
|
||||||
|
return boost::none;
|
||||||
|
}
|
||||||
|
|
||||||
|
return player[m_ComponentType];
|
||||||
|
}
|
||||||
|
|
||||||
|
boost::optional<WeaponInfo&> getActiveWeapon(EntityWrapper player)
|
||||||
|
{
|
||||||
|
auto it = m_ActiveWeapons.find(player);
|
||||||
|
if (it == m_ActiveWeapons.end()) {
|
||||||
|
return boost::none;
|
||||||
|
}
|
||||||
|
WeaponInfo& activeWeapon = it->second;
|
||||||
|
|
||||||
|
if (!activeWeapon.FirstPersonEntity.Valid() && !activeWeapon.ThirdPersonEntity.Valid()) {
|
||||||
|
return boost::none;
|
||||||
|
}
|
||||||
|
|
||||||
|
return activeWeapon;
|
||||||
|
}
|
||||||
|
|
||||||
|
void selectWeapon(EntityWrapper player)
|
||||||
|
{
|
||||||
|
// Find the weapon attachments matching the weapon type
|
||||||
|
std::vector<EntityWrapper> weaponAttachments = player.ChildrenWithComponent("WeaponAttachment");
|
||||||
|
EntityWrapper firstPersonAttachment;
|
||||||
|
EntityWrapper thirdPersonAttachment;
|
||||||
|
for (auto& attachment : weaponAttachments) {
|
||||||
|
ComponentWrapper cWeaponAttachment = attachment["WeaponAttachment"];
|
||||||
|
if ((std::string&)cWeaponAttachment["Weapon"] == m_ComponentType) {
|
||||||
|
ComponentWrapper::SubscriptProxy person = cWeaponAttachment["Person"];
|
||||||
|
if ((ComponentInfo::EnumType)person == person.Enum("FirstPerson")) {
|
||||||
|
firstPersonAttachment = attachment;
|
||||||
|
} else if ((ComponentInfo::EnumType)person == person.Enum("ThirdPerson")) {
|
||||||
|
thirdPersonAttachment = attachment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!firstPersonAttachment.Valid() && !thirdPersonAttachment.Valid()) {
|
||||||
|
LOG_WARNING("No weapon attachment found for %s of player #%i", m_ComponentType.c_str(), player.ID);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Purge other weapon entities
|
||||||
|
for (auto& attachment : weaponAttachments) {
|
||||||
|
//if (attachment == firstPersonAttachment || attachment == thirdPersonAttachment) {
|
||||||
|
// continue;
|
||||||
|
//}
|
||||||
|
attachment.DeleteChildren();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spawn the weapon(s)
|
||||||
|
EntityWrapper firstPersonWeapon;
|
||||||
|
EntityWrapper thirdPersonWeapon;
|
||||||
|
if (firstPersonAttachment.Valid()) {
|
||||||
|
firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment);
|
||||||
|
}
|
||||||
|
if (thirdPersonAttachment.Valid()) {
|
||||||
|
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_ActiveWeapons[player].WeaponComponent = m_ComponentType;
|
||||||
|
m_ActiveWeapons[player].Player = player;
|
||||||
|
m_ActiveWeapons[player].WeaponEntity = player;
|
||||||
|
m_ActiveWeapons[player].FirstPersonEntity = firstPersonWeapon;
|
||||||
|
m_ActiveWeapons[player].ThirdPersonEntity = thirdPersonWeapon;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -37,3 +37,36 @@ ResourceLoading=true
|
|||||||
BGMVolume=1.0
|
BGMVolume=1.0
|
||||||
SFXVolume=1.0
|
SFXVolume=1.0
|
||||||
Announcer=female
|
Announcer=female
|
||||||
|
|
||||||
|
[SSAO]
|
||||||
|
Quality=0
|
||||||
|
|
||||||
|
[SSAO1]
|
||||||
|
Radius=1.0
|
||||||
|
Bias=0.02
|
||||||
|
Contrast=1.5
|
||||||
|
Intensity=1.0
|
||||||
|
NumSamples=8
|
||||||
|
NumTurns=3
|
||||||
|
NumIterations=5
|
||||||
|
TextureQuality=2
|
||||||
|
|
||||||
|
[SSAO2]
|
||||||
|
Radius=1.0
|
||||||
|
Bias=0.02
|
||||||
|
Contrast=1.5
|
||||||
|
Intensity=1.0
|
||||||
|
NumSamples=16
|
||||||
|
NumTurns=13
|
||||||
|
NumIterations=9
|
||||||
|
TextureQuality=1
|
||||||
|
|
||||||
|
[SSAO3]
|
||||||
|
Radius=1.0
|
||||||
|
Bias=0.02
|
||||||
|
Contrast=1.5
|
||||||
|
Intensity=1.0
|
||||||
|
NumSamples=24
|
||||||
|
NumTurns=17
|
||||||
|
NumIterations=13
|
||||||
|
TextureQuality=0
|
||||||
@@ -44,6 +44,8 @@
|
|||||||
<xs:include schemaLocation="Components/Menu.xsd"/>
|
<xs:include schemaLocation="Components/Menu.xsd"/>
|
||||||
<xs:include schemaLocation="Components/KillFeed.xsd"/>
|
<xs:include schemaLocation="Components/KillFeed.xsd"/>
|
||||||
<xs:include schemaLocation="Components/Page.xsd"/>
|
<xs:include schemaLocation="Components/Page.xsd"/>
|
||||||
|
<xs:include schemaLocation="Components/SpriteIndicator.xsd"/>
|
||||||
<xs:include schemaLocation="Components/Button.xsd"/>
|
<xs:include schemaLocation="Components/Button.xsd"/>
|
||||||
<xs:include schemaLocation="Components/Gamemode.xsd"/>
|
<xs:include schemaLocation="Components/WeaponAttachment.xsd"/>
|
||||||
|
<xs:include schemaLocation="Components/DefenderWeapon.xsd"/>
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
@@ -8,4 +8,5 @@
|
|||||||
<RPM>120</RPM>
|
<RPM>120</RPM>
|
||||||
<ViewPunch>0.01</ViewPunch>
|
<ViewPunch>0.01</ViewPunch>
|
||||||
<ReloadTime>2</ReloadTime>
|
<ReloadTime>2</ReloadTime>
|
||||||
|
<Slot><Primary/></Slot>
|
||||||
</AssaultWeapon>
|
</AssaultWeapon>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
<xs:include schemaLocation="../Types/WeaponSlotEnum.xsd"/>
|
||||||
|
|
||||||
<xs:element name="AssaultWeapon">
|
<xs:element name="AssaultWeapon">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
<xs:element name="ReloadTime" type="t:double" minOccurs="0">
|
<xs:element name="ReloadTime" type="t:double" minOccurs="0">
|
||||||
<xs:annotation><xs:documentation>Time it takes to reload the weapon in seconds</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>Time it takes to reload the weapon in seconds</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||||
</xs:all>
|
</xs:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<DefenderWeapon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DefenderWeapon.xsd">
|
||||||
|
<MagazineAmmo>8</MagazineAmmo>
|
||||||
|
<MagazineSize>8</MagazineSize>
|
||||||
|
<Ammo>64</Ammo>
|
||||||
|
<MaxAmmo>64</MaxAmmo>
|
||||||
|
<BaseDamage>90</BaseDamage>
|
||||||
|
<SpreadAngle>0.174533</SpreadAngle> <!-- 0.174533 = 10 degrees -->
|
||||||
|
<NumPellets>10</NumPellets>
|
||||||
|
<RPM>120</RPM>
|
||||||
|
<ViewPunch>0.01</ViewPunch>
|
||||||
|
<ReloadTime>0.5</ReloadTime>
|
||||||
|
<Slot><Primary/></Slot>
|
||||||
|
<IsFiring>false</IsFiring>
|
||||||
|
<TimeSinceLastFire>0</TimeSinceLastFire>
|
||||||
|
</DefenderWeapon>
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||||
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
<xs:include schemaLocation="../Types/WeaponSlotEnum.xsd"/>
|
||||||
|
|
||||||
|
<xs:element name="DefenderWeapon">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="MagazineAmmo" type="t:int" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Ammo currently loaded into the magazine</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="MagazineSize" type="t:int" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Max number of rounds in a magazine</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Ammo" type="t:int" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Current ammo carried</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="MaxAmmo" type="t:int" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Maximum ammo able to be carried</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="BaseDamage" type="t:double" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Damage dealt if all shotgun pellets hit</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="SpreadAngle" type="t:float" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Spread angle in radians</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="NumPellets" type="t:int" minOccurs="0"/>
|
||||||
|
<xs:element name="RPM" type="t:double" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Rate of fire in rounds per minute</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="ViewPunch" type="t:float" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>View punch in radians for each shell fired</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="ReloadTime" type="t:double" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Time it takes to load ONE SHELL into the weapon in seconds</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Slot" type="WeaponSlotEnum" minOccurs="0"/>
|
||||||
|
<xs:element name="IsFiring" type="t:bool" minOccurs="0"/>
|
||||||
|
<xs:element name="TimeSinceLastFire" type="t:double" minOccurs="0"/>
|
||||||
|
</xs:all>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
||||||
<Gamemode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Gamemode.xsd">
|
|
||||||
<Gamemode><CapturePoints/></Gamemode>
|
|
||||||
<RoundTime>0</RoundTime>
|
|
||||||
<Running>false</Running>
|
|
||||||
</Gamemode>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
|
||||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
|
||||||
|
|
||||||
<xs:complexType name="GamemodeEnum" mixed="true">
|
|
||||||
<xs:complexContent>
|
|
||||||
<xs:extension base="t:enum">
|
|
||||||
<xs:choice>
|
|
||||||
<xs:element name="CapturePoints" type="t:int" fixed="1" minOccurs="0"/>
|
|
||||||
</xs:choice>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:complexContent>
|
|
||||||
</xs:complexType>
|
|
||||||
|
|
||||||
<xs:element name="Gamemode">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:all>
|
|
||||||
<xs:element name="Gamemode" type="GamemodeEnum" minOccurs="0"/>
|
|
||||||
<xs:element name="RoundTime" type="t:double" minOccurs="0"/>
|
|
||||||
<xs:element name="Running" type="t:bool" minOccurs="0"/>
|
|
||||||
</xs:all>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
</xs:schema>
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
<Physics xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Physics.xsd">
|
<Physics xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Physics.xsd">
|
||||||
<Velocity X="0" Y="0" Z="0"/>
|
<Velocity X="0" Y="0" Z="0"/>
|
||||||
<Gravity>true</Gravity>
|
<Gravity>true</Gravity>
|
||||||
<PrevOrigin X="-9876.5" Y="-9876.5" Z="-9876.5"/>
|
|
||||||
<IsOnGround>false</IsOnGround>
|
<IsOnGround>false</IsOnGround>
|
||||||
<VerticalStepHeight>0.33</VerticalStepHeight>
|
<VerticalStepHeight>0.33</VerticalStepHeight>
|
||||||
</Physics>
|
</Physics>
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
<xs:annotation><xs:documentation>m/s^2</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>m/s^2</xs:documentation></xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="Gravity" type="t:bool" minOccurs="0"/>
|
<xs:element name="Gravity" type="t:bool" minOccurs="0"/>
|
||||||
<xs:element name="PrevOrigin" type="t:Vector" minOccurs="0"/>
|
|
||||||
<xs:element name="IsOnGround" type="t:bool" minOccurs="0"/>
|
<xs:element name="IsOnGround" type="t:bool" minOccurs="0"/>
|
||||||
<xs:element name="VerticalStepHeight" type="t:double" minOccurs="0">
|
<xs:element name="VerticalStepHeight" type="t:double" minOccurs="0">
|
||||||
<xs:annotation><xs:documentation>The largest height of a "stair-step" that can be walked over</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>The largest height of a "stair-step" that can be walked over</xs:documentation></xs:annotation>
|
||||||
|
|||||||
@@ -3,4 +3,5 @@
|
|||||||
<MovementSpeed>3</MovementSpeed>
|
<MovementSpeed>3</MovementSpeed>
|
||||||
<CrouchSpeed>1.5</CrouchSpeed>
|
<CrouchSpeed>1.5</CrouchSpeed>
|
||||||
<CurrentWishDirection X="0" Y="0" Z="0"/>
|
<CurrentWishDirection X="0" Y="0" Z="0"/>
|
||||||
|
<CurrentWeapon></CurrentWeapon>
|
||||||
</Player>
|
</Player>
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
<xs:element name="MovementSpeed" type="t:float" minOccurs="0"/>
|
<xs:element name="MovementSpeed" type="t:float" minOccurs="0"/>
|
||||||
<xs:element name="CrouchSpeed" type="t:float" minOccurs="0"/>
|
<xs:element name="CrouchSpeed" type="t:float" minOccurs="0"/>
|
||||||
<xs:element name="CurrentWishDirection" type="t:Vector" minOccurs="0"/>
|
<xs:element name="CurrentWishDirection" type="t:Vector" minOccurs="0"/>
|
||||||
|
<xs:element name="CurrentWeapon" type="t:string" minOccurs="0"/>
|
||||||
</xs:all>
|
</xs:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<SpriteIndicator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SpriteIndicator.xsd">
|
||||||
|
<MinScale>10</MinScale>
|
||||||
|
<VisibleForSingleTeamOnly>false</VisibleForSingleTeamOnly>
|
||||||
|
</SpriteIndicator>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||||
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
|
||||||
|
<xs:element name="SpriteIndicator">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Billbord a Sprite around global Y axis</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="MinScale" type="t:double" minOccurs="0"/>
|
||||||
|
<xs:element name="VisibleForSingleTeamOnly" type="t:bool" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>Add a Team component to this Entity or Parent to make it visible only for that team</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
</xs:all>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
|
||||||
<Trigger xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Trigger.xsd">
|
|
||||||
</Trigger>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
|
||||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
|
||||||
|
|
||||||
<xs:element name="Weapon">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:all>
|
|
||||||
<xs:element name="MagSize" type="t:int" minOccurs="0"/>
|
|
||||||
<xs:element name="MaxAmmo" type="t:int" minOccurs="0"/>
|
|
||||||
<xs:element name="CurrentAmmoInMag" type="t:int" minOccurs="0"/>
|
|
||||||
<xs:element name="CurrentAmmo" type="t:int" minOccurs="0"/>
|
|
||||||
<xs:element name="RPM" type="t:double" minOccurs="0"/>
|
|
||||||
</xs:all>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
</xs:schema>
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<WeaponAttachment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WeaponAttachment.xsd">
|
||||||
|
<Weapon></Weapon>
|
||||||
|
<Person><FirstPerson/></Person>
|
||||||
|
</WeaponAttachment>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||||
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
|
||||||
|
<xs:complexType name="PersonEnum" mixed="true">
|
||||||
|
<xs:complexContent>
|
||||||
|
<xs:extension base="t:enum">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="FirstPerson" type="t:int" fixed="0" minOccurs="0"/>
|
||||||
|
<xs:element name="ThirdPerson" type="t:int" fixed="1" minOccurs="0"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:complexContent>
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
|
<xs:element name="WeaponAttachment">
|
||||||
|
<xs:annotation><xs:documentation>Combine with a spawner to define a weapon attachment point</xs:documentation></xs:annotation>
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="Weapon" type="t:string" minOccurs="0">
|
||||||
|
<xs:annotation><xs:documentation>The weapon component type this attachment refers to</xs:documentation></xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Person" type="PersonEnum" minOccurs="0"/>
|
||||||
|
</xs:all>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
@@ -2,18 +2,18 @@
|
|||||||
<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:AABB/>
|
|
||||||
<c:AmmoPickup/>
|
<c:AmmoPickup/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
|
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:RaptorCopter>
|
<c:RaptorCopter>
|
||||||
<Speed>0.1</Speed>
|
<Speed>8</Speed>
|
||||||
<Axis X="0" Y="1" Z="0"/>
|
<Axis X="0" Y="0.100000001" Z="0"/>
|
||||||
</c:RaptorCopter>
|
</c:RaptorCopter>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="1" Z="0"/>
|
<Position X="0" Y="2.36784196" Z="0"/>
|
||||||
<Scale X="0.3" Y="0.3" Z="0.3"/>
|
<Scale X="0.600000024" Y="0.600000024" Z="0.600000024"/>
|
||||||
|
<Orientation X="0" Y="18717.9453" Z="0"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
<c:Trigger/>
|
<c:Trigger/>
|
||||||
</Components>
|
</Components>
|
||||||
|
|||||||
+99
@@ -0,0 +1,99 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:BoneAttachment>
|
||||||
|
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||||
|
</c:BoneAttachment>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.12043038" Y="-0.244988307" Z="-0.181454808"/>
|
||||||
|
<Orientation X="0.010404544" Y="-0.00268173823" Z="0.0428441577"/>
|
||||||
|
</c:Transform>
|
||||||
|
</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>
|
||||||
|
<Entity name="FirstPersonReloadSpawner">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="AmmunitionHUD">
|
||||||
|
<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>
|
||||||
|
<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: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>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:BoneAttachment>
|
||||||
|
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||||
|
</c:BoneAttachment>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.163429111" Y="1.0235405" Z="-0.215489209"/>
|
||||||
|
<Orientation X="-0.0631071255" Y="-0.0576644838" Z="0.118255548"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="WeaponMuzzle">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="ThirdPersonReloadSpawner">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
Executable
+40
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Entity name="Shield" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="Shield">
|
||||||
|
<Components>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Core/UnitPlane.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Shield/>
|
||||||
|
<c:Transform>
|
||||||
|
<Scale X="1.11800003" Y="0.0320000015" Z="1.9180001"/>
|
||||||
|
<Orientation X="-1.57079995" Y="0" Z="0"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="VisibleSide">
|
||||||
|
<Components>
|
||||||
|
<c:Shielded/>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Core/UnitHexagon.mesh</Resource>
|
||||||
|
<Color A="0" B="1" G="0" R="0"/>
|
||||||
|
<Transparent>true</Transparent>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0" Z="0.0179871861"/>
|
||||||
|
<Scale X="1.01900005" Y="0.0120000001" Z="1.91000009"/>
|
||||||
|
<Orientation X="-1.57079995" Y="0" Z="0"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
+99
@@ -0,0 +1,99 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:BoneAttachment>
|
||||||
|
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||||
|
<PositionOffset X="0" Y="0.0480000004" Z="-0.183000013"/>
|
||||||
|
</c:BoneAttachment>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.120430306" Y="0.775375426" Z="1.36542225"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="WeaponMuzzle">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.00191565475" Y="0.0324025005" Z="-0.2021029"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="FirstPersonReloadSpawner">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="AmmunitionHUD">
|
||||||
|
<Components>
|
||||||
|
<c:AmmunitionHUD/>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="-0.0490000024" Y="0.0520000011" Z="-0.063000001"/>
|
||||||
|
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<Entity name="AmmunitionHUDBackground">
|
||||||
|
<Components>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||||
|
</c:Sprite>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0" Z="-0.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: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>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
+99
@@ -0,0 +1,99 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:BoneAttachment>
|
||||||
|
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||||
|
<PositionOffset X="0" Y="0.0480000004" Z="-0.183000013"/>
|
||||||
|
</c:BoneAttachment>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/Red/DefenderGunRed.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.120430306" Y="0.775375426" Z="1.36542225"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="WeaponMuzzle">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.00191565475" Y="0.0324025005" Z="-0.2021029"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="FirstPersonReloadSpawner">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="AmmunitionHUD">
|
||||||
|
<Components>
|
||||||
|
<c:AmmunitionHUD/>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="-0.0490000024" Y="0.0520000011" Z="-0.063000001"/>
|
||||||
|
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children>
|
||||||
|
<Entity name="AmmunitionHUDBackground">
|
||||||
|
<Components>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||||
|
</c:Sprite>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0" Z="-0.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: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>
|
||||||
|
</Children>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:BoneAttachment>
|
||||||
|
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||||
|
<PositionOffset X="0" Y="0.0320000015" Z="-0.165000007"/>
|
||||||
|
</c:BoneAttachment>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.162026152" Y="1.05794585" Z="-0.380744517"/>
|
||||||
|
<Orientation X="-0.0628969446" Y="-0.0509683639" Z="0.118739031"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="WeaponMuzzle">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.000284185546" Y="0.0318552479" Z="-0.193328083"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="ThirdPersonReloadSpawner">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||||
|
|
||||||
|
<Components>
|
||||||
|
<c:BoneAttachment>
|
||||||
|
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||||
|
<PositionOffset X="0" Y="0.0320000015" Z="-0.165000007"/>
|
||||||
|
</c:BoneAttachment>
|
||||||
|
<c:Model>
|
||||||
|
<Resource>Models/Weapons/Red/DefenderGunRed.mesh</Resource>
|
||||||
|
</c:Model>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.162026152" Y="1.05794585" Z="-0.380744517"/>
|
||||||
|
<Orientation X="-0.0628969446" Y="-0.0509683639" Z="0.118739031"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
|
||||||
|
<Children>
|
||||||
|
<Entity name="WeaponMuzzle">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform>
|
||||||
|
<Position X="0.000284185546" Y="0.0318552479" Z="-0.193328083"/>
|
||||||
|
</c:Transform>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="ThirdPersonReloadSpawner">
|
||||||
|
<Components>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
</Children>
|
||||||
|
|
||||||
|
</Entity>
|
||||||
@@ -2,18 +2,18 @@
|
|||||||
<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:AABB/>
|
|
||||||
<c:HealthPickup/>
|
<c:HealthPickup/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
|
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
|
||||||
</c:Model>
|
</c:Model>
|
||||||
<c:RaptorCopter>
|
<c:RaptorCopter>
|
||||||
<Speed>0.1</Speed>
|
<Speed>8</Speed>
|
||||||
<Axis X="0" Y="1" Z="0"/>
|
<Axis X="0" Y="0.100000001" Z="0"/>
|
||||||
</c:RaptorCopter>
|
</c:RaptorCopter>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="1" Z="0"/>
|
<Position X="0" Y="2.36784196" Z="0"/>
|
||||||
<Scale X="0.3" Y="0.3" Z="0.3"/>
|
<Scale X="0.600000024" Y="0.600000024" Z="0.600000024"/>
|
||||||
|
<Orientation X="0" Y="18767.0273" Z="0"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
<c:Trigger/>
|
<c:Trigger/>
|
||||||
</Components>
|
</Components>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:PlayerSpawn/>
|
<c:PlayerSpawn/>
|
||||||
<c:Spawner>
|
<c:Spawner>
|
||||||
<EntityFile>Schema/Entities/Player.xml</EntityFile>
|
<EntityFile>Schema/Entities/PlayerRed.xml</EntityFile>
|
||||||
</c:Spawner>
|
</c:Spawner>
|
||||||
<c:Team>
|
<c:Team>
|
||||||
<Team>
|
<Team>
|
||||||
@@ -118,257 +118,6 @@
|
|||||||
</Entity>
|
</Entity>
|
||||||
</Children>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="Player">
|
|
||||||
<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>1.9569972344146196</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.120748013" Y="-0.228470564" Z="-0.151475638"/>
|
|
||||||
<Orientation X="0.010404693" Y="-0.00268176314" Z="0.0428441502"/>
|
|
||||||
</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>1.8055945618467364</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.158578917" Y="1.02878916" Z="-0.215411991"/>
|
|
||||||
<Orientation X="-0.0626687407" Y="-0.0361274257" Z="0.120101407"/>
|
|
||||||
</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>
|
|
||||||
</Children>
|
</Children>
|
||||||
|
|
||||||
</Entity>
|
</Entity>
|
||||||
|
|||||||
@@ -7,23 +7,30 @@
|
|||||||
<Size X="1" Y="1.60000002" Z="1"/>
|
<Size X="1" Y="1.60000002" Z="1"/>
|
||||||
</c:AABB>
|
</c:AABB>
|
||||||
<c:AssaultWeapon>
|
<c:AssaultWeapon>
|
||||||
<RPM>600</RPM>
|
<Slot>
|
||||||
|
<Secondary/>
|
||||||
|
</Slot>
|
||||||
</c:AssaultWeapon>
|
</c:AssaultWeapon>
|
||||||
<c:Collidable/>
|
<c:Collidable/>
|
||||||
<c:DashAbility/>
|
<c:DefenderWeapon>
|
||||||
|
<TimeSinceLastFire>1.6944730461160304</TimeSinceLastFire>
|
||||||
|
</c:DefenderWeapon>
|
||||||
<c:Health/>
|
<c:Health/>
|
||||||
<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>
|
||||||
<c:Player>
|
<c:Player>
|
||||||
<MovementSpeed>5</MovementSpeed>
|
<MovementSpeed>5</MovementSpeed>
|
||||||
|
<CurrentWeapon></CurrentWeapon>
|
||||||
</c:Player>
|
</c:Player>
|
||||||
<c:Team>
|
<c:Team>
|
||||||
<Team>
|
<Team>
|
||||||
<Blue/>
|
<Blue/>
|
||||||
</Team>
|
</Team>
|
||||||
</c:Team>
|
</c:Team>
|
||||||
<c:Transform/>
|
<c:Transform>
|
||||||
|
<Position X="-1.42731023" Y="0.0288832653" Z="3.63052702"/>
|
||||||
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
|
|
||||||
<Children>
|
<Children>
|
||||||
@@ -60,6 +67,7 @@
|
|||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
|
||||||
<DepthSort>false</DepthSort>
|
<DepthSort>false</DepthSort>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.200000003"/>
|
<Position X="0" Y="0" Z="0.200000003"/>
|
||||||
@@ -110,6 +118,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
|
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.588235319" B="0" G="0" R="0"/>
|
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:HealthHUD/>
|
<c:HealthHUD/>
|
||||||
@@ -135,6 +144,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -152,6 +162,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -167,6 +178,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -185,6 +197,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -200,6 +213,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -217,6 +231,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -232,6 +247,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -249,6 +265,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -264,6 +281,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.699999988" B="0" G="0.200000003" R="1"/>
|
<Color A="0.699999988" B="0" G="0.200000003" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -279,6 +297,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -304,6 +323,7 @@
|
|||||||
<Entity name="KillFeed1">
|
<Entity name="KillFeed1">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
|
<Content></Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Alignment>
|
<Alignment>
|
||||||
<Right/>
|
<Right/>
|
||||||
@@ -316,6 +336,7 @@
|
|||||||
<Entity name="KillFeed2">
|
<Entity name="KillFeed2">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
|
<Content></Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Alignment>
|
<Alignment>
|
||||||
<Right/>
|
<Right/>
|
||||||
@@ -330,6 +351,7 @@
|
|||||||
<Entity name="KillFeed3">
|
<Entity name="KillFeed3">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
|
<Content></Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Alignment>
|
<Alignment>
|
||||||
<Right/>
|
<Right/>
|
||||||
@@ -349,8 +371,10 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
<Time1>1.8314163732853146</Time1>
|
<Time1>0.67172915251515519</Time1>
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
|
<AnimationName2></AnimationName2>
|
||||||
|
<AnimationName3></AnimationName3>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
|
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
|
||||||
@@ -359,99 +383,29 @@
|
|||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children>
|
||||||
<Entity name="WeaponModel">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:BoneAttachment>
|
<c:Spawner>
|
||||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
<EntityFile>Schema/Entities/DefenderWeaponView.xml</EntityFile>
|
||||||
</c:BoneAttachment>
|
</c:Spawner>
|
||||||
<c:Model>
|
<c:Transform/>
|
||||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
<c:WeaponAttachment>
|
||||||
</c:Model>
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
<c:Transform>
|
</c:WeaponAttachment>
|
||||||
<Position X="0.120430619" Y="-0.229687244" Z="-0.181454629"/>
|
|
||||||
<Orientation X="0.0104048112" Y="-0.0026817855" Z="0.0428442657"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children/>
|
||||||
<Entity name="WeaponMuzzle">
|
</Entity>
|
||||||
<Components>
|
<Entity name="SecondaryAttachment">
|
||||||
<c:Spawner>
|
<Components>
|
||||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
<c:Spawner>
|
||||||
</c:Spawner>
|
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
||||||
<c:Transform>
|
</c:Spawner>
|
||||||
<Position X="0.00325386273" Y="0.0970000029" Z="-0.843000054"/>
|
<c:Transform/>
|
||||||
</c:Transform>
|
<c:WeaponAttachment>
|
||||||
</Components>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
<Children/>
|
</c:WeaponAttachment>
|
||||||
</Entity>
|
</Components>
|
||||||
<Entity name="FirstPersonReloadSpawner">
|
<Children/>
|
||||||
<Components>
|
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
<Entity name="AmmunitionHUD">
|
|
||||||
<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 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: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>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
</Entity>
|
||||||
</Children>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
@@ -475,13 +429,15 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
<Time1>0.16333512901638159</Time1>
|
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
|
<AnimationName2></AnimationName2>
|
||||||
|
<AnimationName3></AnimationName3>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:AnimationOffset>
|
<c:AnimationOffset>
|
||||||
<AnimationName>AimRifle</AnimationName>
|
<AnimationName>AimRifle</AnimationName>
|
||||||
<Time>0.5</Time>
|
<Time>0.5</Time>
|
||||||
</c:AnimationOffset>
|
</c:AnimationOffset>
|
||||||
|
<c:Shielded/>
|
||||||
<c:HiddenForLocalPlayer/>
|
<c:HiddenForLocalPlayer/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
|
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
|
||||||
@@ -490,41 +446,35 @@
|
|||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children>
|
||||||
<Entity name="ThirdPersonWeaponModel">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:BoneAttachment>
|
<c:Spawner>
|
||||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
<EntityFile>Schema/Entities/DefenderWeaponWorld.xml</EntityFile>
|
||||||
</c:BoneAttachment>
|
</c:Spawner>
|
||||||
<c:Model>
|
<c:Transform/>
|
||||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
<c:WeaponAttachment>
|
||||||
</c:Model>
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
<c:Transform>
|
<Person>
|
||||||
<Position X="0.158296332" Y="1.03131664" Z="-0.21615544"/>
|
<ThirdPerson/>
|
||||||
<Orientation X="-0.0626514703" Y="-0.0352048129" Z="0.12013837"/>
|
</Person>
|
||||||
</c:Transform>
|
</c:WeaponAttachment>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children/>
|
||||||
<Entity name="ThirdPersonWeaponMuzzle">
|
</Entity>
|
||||||
<Components>
|
<Entity name="SecondaryAttachment">
|
||||||
<c:Spawner>
|
<Components>
|
||||||
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
|
<c:Spawner>
|
||||||
</c:Spawner>
|
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||||
<c:Transform>
|
</c:Spawner>
|
||||||
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
|
<c:Transform/>
|
||||||
</c:Transform>
|
<c:WeaponAttachment>
|
||||||
</Components>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
<Children/>
|
<Person>
|
||||||
</Entity>
|
<ThirdPerson/>
|
||||||
<Entity name="ThirdPersonReloadSpawner">
|
</Person>
|
||||||
<Components>
|
</c:WeaponAttachment>
|
||||||
<c:Spawner>
|
</Components>
|
||||||
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
|
<Children/>
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
</Entity>
|
||||||
</Children>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
@@ -570,6 +520,37 @@
|
|||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
|
<Entity name="Indicator">
|
||||||
|
<Components>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Icons/Arrow.png</DiffuseTexture>
|
||||||
|
<DepthSort>false</DepthSort>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
<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>
|
</Children>
|
||||||
|
|
||||||
</Entity>
|
</Entity>
|
||||||
|
|||||||
Regular → Executable
+111
-130
@@ -7,23 +7,30 @@
|
|||||||
<Size X="1" Y="1.60000002" Z="1"/>
|
<Size X="1" Y="1.60000002" Z="1"/>
|
||||||
</c:AABB>
|
</c:AABB>
|
||||||
<c:AssaultWeapon>
|
<c:AssaultWeapon>
|
||||||
<RPM>600</RPM>
|
<Slot>
|
||||||
|
<Secondary/>
|
||||||
|
</Slot>
|
||||||
</c:AssaultWeapon>
|
</c:AssaultWeapon>
|
||||||
<c:Collidable/>
|
<c:Collidable/>
|
||||||
<c:DashAbility/>
|
<c:DefenderWeapon>
|
||||||
|
<TimeSinceLastFire>1.6944730461160304</TimeSinceLastFire>
|
||||||
|
</c:DefenderWeapon>
|
||||||
<c:Health/>
|
<c:Health/>
|
||||||
<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>
|
||||||
<c:Player>
|
<c:Player>
|
||||||
<MovementSpeed>5</MovementSpeed>
|
<MovementSpeed>5</MovementSpeed>
|
||||||
|
<CurrentWeapon></CurrentWeapon>
|
||||||
</c:Player>
|
</c:Player>
|
||||||
<c:Team>
|
<c:Team>
|
||||||
<Team>
|
<Team>
|
||||||
<Red/>
|
<Red/>
|
||||||
</Team>
|
</Team>
|
||||||
</c:Team>
|
</c:Team>
|
||||||
<c:Transform/>
|
<c:Transform>
|
||||||
|
<Position X="0" Y="0.0288832653" Z="3.63052702"/>
|
||||||
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
|
|
||||||
<Children>
|
<Children>
|
||||||
@@ -60,6 +67,7 @@
|
|||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
|
||||||
<DepthSort>false</DepthSort>
|
<DepthSort>false</DepthSort>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.200000003"/>
|
<Position X="0" Y="0" Z="0.200000003"/>
|
||||||
@@ -110,6 +118,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
|
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.588235319" B="0" G="0" R="0"/>
|
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:HealthHUD/>
|
<c:HealthHUD/>
|
||||||
@@ -135,6 +144,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -152,6 +162,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -167,6 +178,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -185,6 +197,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -200,6 +213,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -217,6 +231,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -232,6 +247,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -249,6 +265,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -264,6 +281,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
<Color A="0.699999988" B="0" G="0.200000003" R="1"/>
|
<Color A="0.699999988" B="0" G="0.200000003" R="1"/>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
@@ -279,6 +297,7 @@
|
|||||||
</c:Fill>
|
</c:Fill>
|
||||||
<c:Sprite>
|
<c:Sprite>
|
||||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
</c:Sprite>
|
</c:Sprite>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||||
@@ -304,6 +323,7 @@
|
|||||||
<Entity name="KillFeed1">
|
<Entity name="KillFeed1">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
|
<Content></Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Alignment>
|
<Alignment>
|
||||||
<Right/>
|
<Right/>
|
||||||
@@ -316,6 +336,7 @@
|
|||||||
<Entity name="KillFeed2">
|
<Entity name="KillFeed2">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
|
<Content></Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Alignment>
|
<Alignment>
|
||||||
<Right/>
|
<Right/>
|
||||||
@@ -330,6 +351,7 @@
|
|||||||
<Entity name="KillFeed3">
|
<Entity name="KillFeed3">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Text>
|
<c:Text>
|
||||||
|
<Content></Content>
|
||||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||||
<Alignment>
|
<Alignment>
|
||||||
<Right/>
|
<Right/>
|
||||||
@@ -349,8 +371,10 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
<Time1>0.018170670865885086</Time1>
|
<Time1>0.67172915251515519</Time1>
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
|
<AnimationName2></AnimationName2>
|
||||||
|
<AnimationName3></AnimationName3>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
|
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
|
||||||
@@ -359,99 +383,29 @@
|
|||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children>
|
||||||
<Entity name="WeaponModel">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:BoneAttachment>
|
<c:Spawner>
|
||||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
<EntityFile>Schema/Entities/DefenderWeaponViewRed.xml</EntityFile>
|
||||||
</c:BoneAttachment>
|
</c:Spawner>
|
||||||
<c:Model>
|
<c:Transform/>
|
||||||
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
|
<c:WeaponAttachment>
|
||||||
</c:Model>
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
<c:Transform>
|
</c:WeaponAttachment>
|
||||||
<Position X="0.120430693" Y="-0.2284486" Z="-0.181454509"/>
|
|
||||||
<Orientation X="0.0104046017" Y="-0.00268172775" Z="0.0428442247"/>
|
|
||||||
</c:Transform>
|
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children/>
|
||||||
<Entity name="WeaponMuzzle">
|
</Entity>
|
||||||
<Components>
|
<Entity name="SecondaryAttachment">
|
||||||
<c:Spawner>
|
<Components>
|
||||||
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
|
<c:Spawner>
|
||||||
</c:Spawner>
|
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
||||||
<c:Transform>
|
</c:Spawner>
|
||||||
<Position X="0.00325386273" Y="0.0970000029" Z="-0.843000054"/>
|
<c:Transform/>
|
||||||
</c:Transform>
|
<c:WeaponAttachment>
|
||||||
</Components>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
<Children/>
|
</c:WeaponAttachment>
|
||||||
</Entity>
|
</Components>
|
||||||
<Entity name="FirstPersonReloadSpawner">
|
<Children/>
|
||||||
<Components>
|
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/ReloadEffectViewRed.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
<Entity name="AmmunitionHUD">
|
|
||||||
<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 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: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>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
</Entity>
|
||||||
</Children>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
@@ -475,13 +429,15 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
<Time1>0.11675631578762591</Time1>
|
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
|
<AnimationName2></AnimationName2>
|
||||||
|
<AnimationName3></AnimationName3>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:AnimationOffset>
|
<c:AnimationOffset>
|
||||||
<AnimationName>AimRifle</AnimationName>
|
<AnimationName>AimRifle</AnimationName>
|
||||||
<Time>0.5</Time>
|
<Time>0.5</Time>
|
||||||
</c:AnimationOffset>
|
</c:AnimationOffset>
|
||||||
|
<c:Shielded/>
|
||||||
<c:HiddenForLocalPlayer/>
|
<c:HiddenForLocalPlayer/>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
|
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
|
||||||
@@ -490,41 +446,35 @@
|
|||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children>
|
||||||
<Entity name="ThirdPersonWeaponModel">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:BoneAttachment>
|
<c:Spawner>
|
||||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
<EntityFile>Schema/Entities/DefenderWeaponWorldRed.xml</EntityFile>
|
||||||
</c:BoneAttachment>
|
</c:Spawner>
|
||||||
<c:Model>
|
<c:Transform/>
|
||||||
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
|
<c:WeaponAttachment>
|
||||||
</c:Model>
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
<c:Transform>
|
<Person>
|
||||||
<Position X="0.157842755" Y="1.03184748" Z="-0.216178894"/>
|
<ThirdPerson/>
|
||||||
<Orientation X="-0.0626459867" Y="-0.0335309952" Z="0.120309927"/>
|
</Person>
|
||||||
</c:Transform>
|
</c:WeaponAttachment>
|
||||||
</Components>
|
</Components>
|
||||||
<Children>
|
<Children/>
|
||||||
<Entity name="ThirdPersonWeaponMuzzle">
|
</Entity>
|
||||||
<Components>
|
<Entity name="SecondaryAttachment">
|
||||||
<c:Spawner>
|
<Components>
|
||||||
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
|
<c:Spawner>
|
||||||
</c:Spawner>
|
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||||
<c:Transform>
|
</c:Spawner>
|
||||||
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
|
<c:Transform/>
|
||||||
</c:Transform>
|
<c:WeaponAttachment>
|
||||||
</Components>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
<Children/>
|
<Person>
|
||||||
</Entity>
|
<ThirdPerson/>
|
||||||
<Entity name="ThirdPersonReloadSpawner">
|
</Person>
|
||||||
<Components>
|
</c:WeaponAttachment>
|
||||||
<c:Spawner>
|
</Components>
|
||||||
<EntityFile>Schema/Entities/ReloadEffectWorldRed.xml</EntityFile>
|
<Children/>
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
</Components>
|
|
||||||
<Children/>
|
|
||||||
</Entity>
|
|
||||||
</Children>
|
|
||||||
</Entity>
|
</Entity>
|
||||||
</Children>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
@@ -563,13 +513,44 @@
|
|||||||
<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.50199997" Z="-0.248000011"/>
|
<Position X="0.100000001" Y="1.50176644" Z="-0.248000011"/>
|
||||||
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
|
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
|
||||||
<Orientation X="0" Y="3.14199996" Z="0"/>
|
<Orientation X="0" Y="3.14199996" Z="0"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
|
<Entity name="Indicator">
|
||||||
|
<Components>
|
||||||
|
<c:Sprite>
|
||||||
|
<DiffuseTexture>Textures/Icons/Arrow.png</DiffuseTexture>
|
||||||
|
<DepthSort>false</DepthSort>
|
||||||
|
<GlowMap></GlowMap>
|
||||||
|
<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>
|
</Children>
|
||||||
|
|
||||||
</Entity>
|
</Entity>
|
||||||
|
|||||||
@@ -50,7 +50,8 @@
|
|||||||
<xs:element ref="c:Menu" minOccurs="0"/>
|
<xs:element ref="c:Menu" minOccurs="0"/>
|
||||||
<xs:element ref="c:Page" minOccurs="0"/>
|
<xs:element ref="c:Page" minOccurs="0"/>
|
||||||
<xs:element ref="c:Button" minOccurs="0"/>
|
<xs:element ref="c:Button" minOccurs="0"/>
|
||||||
<xs:element ref="c:Gamemode" minOccurs="0"/>
|
<xs:element ref="c:WeaponAttachment" minOccurs="0"/>
|
||||||
|
<xs:element ref="c:DefenderWeapon" minOccurs="0"/>
|
||||||
</xs:all>
|
</xs:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" xmlns:t="types">
|
||||||
|
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||||
|
|
||||||
|
<xs:complexType name="WeaponSlotEnum" mixed="true">
|
||||||
|
<xs:complexContent>
|
||||||
|
<xs:extension base="t:enum">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Primary" type="t:int" fixed="1" minOccurs="0"/>
|
||||||
|
<xs:element name="Secondary" type="t:int" fixed="2" minOccurs="0"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:complexContent>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:schema>
|
||||||
@@ -12,6 +12,8 @@ uniform vec4 FillColor;
|
|||||||
uniform vec4 AmbientColor;
|
uniform vec4 AmbientColor;
|
||||||
uniform float FillPercentage;
|
uniform float FillPercentage;
|
||||||
uniform float GlowIntensity = 10;
|
uniform float GlowIntensity = 10;
|
||||||
|
uniform vec3 CameraPosition;
|
||||||
|
uniform int SSAOQuality;
|
||||||
|
|
||||||
uniform vec2 DiffuseUVRepeat;
|
uniform vec2 DiffuseUVRepeat;
|
||||||
uniform vec2 NormalUVRepeat;
|
uniform vec2 NormalUVRepeat;
|
||||||
@@ -22,6 +24,7 @@ layout (binding = 1) uniform sampler2D DiffuseTexture;
|
|||||||
layout (binding = 2) uniform sampler2D NormalMapTexture;
|
layout (binding = 2) uniform sampler2D NormalMapTexture;
|
||||||
layout (binding = 3) uniform sampler2D SpecularMapTexture;
|
layout (binding = 3) uniform sampler2D SpecularMapTexture;
|
||||||
layout (binding = 4) uniform sampler2D GlowMapTexture;
|
layout (binding = 4) uniform sampler2D GlowMapTexture;
|
||||||
|
layout (binding = 5) uniform samplerCube CubeMap;
|
||||||
|
|
||||||
#define TILE_SIZE 16
|
#define TILE_SIZE 16
|
||||||
|
|
||||||
@@ -76,7 +79,7 @@ struct LightResult {
|
|||||||
};
|
};
|
||||||
|
|
||||||
float CalcAttenuation(float radius, float dist, float falloff) {
|
float CalcAttenuation(float radius, float dist, float falloff) {
|
||||||
return 1.0 - smoothstep(radius * 0.3, radius, dist);
|
return 1.0 - smoothstep(radius * falloff, radius, dist);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 CalcSpecular(vec4 lightColor, vec4 viewVec, vec4 lightVec, vec4 normal) {
|
vec4 CalcSpecular(vec4 lightColor, vec4 viewVec, vec4 lightVec, vec4 normal) {
|
||||||
@@ -123,7 +126,7 @@ vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textu
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float ao = texelFetch(AOTexture, ivec2(gl_FragCoord.xy), 0).r;
|
float ao = texelFetch(AOTexture, ivec2(gl_FragCoord.xy) >> int(SSAOQuality), 0).r;
|
||||||
ao = (clamp(1.0 - (1.0 - ao), 0.0, 1.0) + MIN_AMBIENT_LIGHT) / (1.0 + MIN_AMBIENT_LIGHT);
|
ao = (clamp(1.0 - (1.0 - ao), 0.0, 1.0) + MIN_AMBIENT_LIGHT) / (1.0 + MIN_AMBIENT_LIGHT);
|
||||||
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);
|
||||||
@@ -133,6 +136,10 @@ void main()
|
|||||||
normal = normalize(normal);
|
normal = normalize(normal);
|
||||||
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
|
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
|
||||||
vec4 viewVec = normalize(-position);
|
vec4 viewVec = normalize(-position);
|
||||||
|
vec3 I = normalize(vec3(M * vec4(Input.Position, 1.0)) - CameraPosition);
|
||||||
|
vec3 R = reflect(-I, Input.Normal);
|
||||||
|
//R = vec3(P * vec4(R, 1.0));
|
||||||
|
vec4 reflectionColor = texture(CubeMap, R);
|
||||||
|
|
||||||
vec2 tilePos;
|
vec2 tilePos;
|
||||||
tilePos.x = int(gl_FragCoord.x/TILE_SIZE);
|
tilePos.x = int(gl_FragCoord.x/TILE_SIZE);
|
||||||
@@ -163,6 +170,8 @@ void main()
|
|||||||
|
|
||||||
vec4 color_result = mix((Color * diffuseTexel * DiffuseColor), Input.ExplosionColor, Input.ExplosionPercentageElapsed);
|
vec4 color_result = mix((Color * diffuseTexel * DiffuseColor), Input.ExplosionColor, Input.ExplosionPercentageElapsed);
|
||||||
color_result = color_result * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel));
|
color_result = color_result * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel));
|
||||||
|
float specularResult = (specularTexel.r + specularTexel.g + specularTexel.b)/3.0;
|
||||||
|
color_result = color_result * clamp(1/specularTexel, 0, 1)*2 + reflectionColor * clamp(specularTexel, 0, 1)/2;
|
||||||
//vec4 color_result = (DiffuseColor + Input.ExplosionColor) * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)) * diffuseTexel * Color;
|
//vec4 color_result = (DiffuseColor + Input.ExplosionColor) * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)) * diffuseTexel * Color;
|
||||||
|
|
||||||
|
|
||||||
@@ -172,9 +181,10 @@ 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 = vec4(reflectionColor.xyz, 1);
|
||||||
color_result += glowTexel*GlowIntensity;
|
color_result += glowTexel*GlowIntensity;
|
||||||
|
|
||||||
bloomColor = vec4(clamp(color_result.xyz - 1.0, 0, 100), 1.0);
|
bloomColor = vec4(clamp(color_result.xyz - 1.0, 0, 100), clamp(color_result.a, 0, 1));
|
||||||
|
|
||||||
//Tiled Debug Code
|
//Tiled Debug Code
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ out VertexData{
|
|||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = P*V*M * vec4(Position, 1.0);
|
gl_Position = P*V*M * vec4(Position, 1.0);
|
||||||
|
mat4 TIM = transpose(inverse(M));
|
||||||
Output.Position = Position;
|
Output.Position = Position;
|
||||||
Output.TextureCoordinate = TextureCoords;
|
Output.TextureCoordinate = TextureCoords;
|
||||||
Output.Normal = vec3(M * vec4(Normal, 0.0));
|
Output.Normal = vec3(TIM * vec4(Normal, 0.0));
|
||||||
Output.Tangent = vec3(M * vec4(Tangent, 0.0));
|
Output.Tangent = vec3(TIM * vec4(Tangent, 0.0));
|
||||||
Output.BiTangent = vec3(M * vec4(BiTangent, 0.0));
|
Output.BiTangent = vec3(TIM * vec4(BiTangent, 0.0));
|
||||||
Output.ExplosionColor = vec4(1.0);
|
Output.ExplosionColor = vec4(1.0);
|
||||||
Output.ExplosionPercentageElapsed = 0.0;
|
Output.ExplosionPercentageElapsed = 0.0;
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@ uniform vec4 DiffuseColor;
|
|||||||
uniform vec4 FillColor;
|
uniform vec4 FillColor;
|
||||||
uniform vec4 Color;
|
uniform vec4 Color;
|
||||||
uniform vec4 AmbientColor;
|
uniform vec4 AmbientColor;
|
||||||
|
uniform int SSAOQuality;
|
||||||
|
|
||||||
//Get bineded at the same time as the textures
|
//Get bineded at the same time as the textures
|
||||||
uniform vec2 DiffuseUVRepeat1;
|
uniform vec2 DiffuseUVRepeat1;
|
||||||
@@ -177,7 +178,7 @@ vec4 CalcBlendedNormal(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B,
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float ao = texelFetch(AOTexture, ivec2(gl_FragCoord.xy), 0).r;
|
float ao = texelFetch(AOTexture, ivec2(gl_FragCoord.xy) >> int(SSAOQuality), 0).r;
|
||||||
ao = (clamp(1.0 - (1.0 - ao), 0.0, 1.0) + MIN_AMBIENT_LIGHT) / (1.0 + MIN_AMBIENT_LIGHT);
|
ao = (clamp(1.0 - (1.0 - ao), 0.0, 1.0) + MIN_AMBIENT_LIGHT) / (1.0 + MIN_AMBIENT_LIGHT);
|
||||||
|
|
||||||
vec4 splatTexel = texture2D(SplatMapTexture, Input.TextureCoordinate);
|
vec4 splatTexel = texture2D(SplatMapTexture, Input.TextureCoordinate);
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#version 430
|
||||||
|
|
||||||
|
layout (binding = 1) uniform sampler2D DepthStencilTexture;
|
||||||
|
layout (binding = 2) uniform sampler2D SceneTexture;
|
||||||
|
layout (binding = 3) uniform sampler2D BloomTexture;
|
||||||
|
|
||||||
|
in VertexData{
|
||||||
|
vec2 TextureCoordinate;
|
||||||
|
}Input;
|
||||||
|
|
||||||
|
out vec4 sceneColor;
|
||||||
|
out vec4 bloomColor;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
float texel = texelFetch(DepthStencilTexture, ivec2(gl_FragCoord.xy / 8.0f), 0).g;
|
||||||
|
if(texel >= 0.9f)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
sceneColor = vec4(texture2D(SceneTexture, Input.TextureCoordinate).rgb * texel, 1.0f);
|
||||||
|
bloomColor = vec4(texture2D(BloomTexture, Input.TextureCoordinate).rgb * texel, 1.0f);
|
||||||
|
//sceneColor = texel;
|
||||||
|
//bloomColor = vec4(1,0.5,0.7,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
//Number of samples per pixel
|
//Number of samples per pixel
|
||||||
uniform int uNumOfSamples;
|
uniform int uNumOfSamples;
|
||||||
//#define NUM_SAMPLES (11)
|
//#define uNumOfSamples (11)
|
||||||
|
|
||||||
//Number of turns around the cirle
|
//Number of turns around the cirle
|
||||||
uniform int uNumOfTurns;
|
uniform int uNumOfTurns;
|
||||||
//#define NUM_TURNS (7)
|
//#define uNumOfTurns (7)
|
||||||
|
|
||||||
layout (binding = 0) uniform sampler2D ViewSpaceZ;
|
layout (binding = 0) uniform sampler2D ViewSpaceZ;
|
||||||
|
|
||||||
@@ -16,15 +16,16 @@ uniform float uProjScale;
|
|||||||
//#define ProjScale 500
|
//#define ProjScale 500
|
||||||
|
|
||||||
uniform float uRadius;
|
uniform float uRadius;
|
||||||
//#define Radius 1.0f
|
//#define uRadius 1.0f
|
||||||
|
|
||||||
uniform float uBias;
|
uniform float uBias;
|
||||||
//#define Bias 0.012f
|
//#define uBias 0.05f
|
||||||
|
|
||||||
uniform float uContrast;
|
uniform float uContrast;
|
||||||
//#define IntensityDivR6 1
|
//#define uContrast 1.5f
|
||||||
|
|
||||||
uniform float uIntensityScale;
|
uniform float uIntensityScale;
|
||||||
|
//#define uIntensityScale 1.0f
|
||||||
|
|
||||||
out float AO;
|
out float AO;
|
||||||
|
|
||||||
@@ -88,13 +89,7 @@ void main() {
|
|||||||
|
|
||||||
vec3 origin = getVSPosition(originScreenCoord);
|
vec3 origin = getVSPosition(originScreenCoord);
|
||||||
|
|
||||||
float radius;
|
float radius = min(origin.z, uRadius);
|
||||||
if(origin.z < uRadius){
|
|
||||||
radius = origin.z;
|
|
||||||
} else {
|
|
||||||
radius = uRadius;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
vec3 originNormal = getVSFaceNormal(origin);
|
vec3 originNormal = getVSFaceNormal(origin);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,12 @@
|
|||||||
|
|
||||||
layout (location = 0) in vec3 Position;
|
layout (location = 0) in vec3 Position;
|
||||||
|
|
||||||
|
out VertexData{
|
||||||
|
vec2 TextureCoordinate;
|
||||||
|
}Output;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = vec4(Position, 1.0);
|
gl_Position = vec4(Position, 1.0);
|
||||||
|
Output.TextureCoordinate = (vec2(Position) + 1) / 2;
|
||||||
}
|
}
|
||||||
@@ -3,11 +3,15 @@
|
|||||||
layout (binding = 0) uniform sampler2D DepthBuffer;
|
layout (binding = 0) uniform sampler2D DepthBuffer;
|
||||||
uniform vec3 ClipInfo;
|
uniform vec3 ClipInfo;
|
||||||
|
|
||||||
|
in VertexData{
|
||||||
|
vec2 TextureCoordinate;
|
||||||
|
}Input;
|
||||||
|
|
||||||
out float depthLinear;
|
out float depthLinear;
|
||||||
//Just for Debug, should be depthLinear
|
//Just for Debug, should be depthLinear
|
||||||
//out vec4 fragmentColor;
|
//out vec4 fragmentColor;
|
||||||
void main() {
|
void main() {
|
||||||
float depthSample = texelFetch(DepthBuffer, ivec2(gl_FragCoord.xy), 0).r;
|
float depthSample = texture2D(DepthBuffer, Input.TextureCoordinate).r;
|
||||||
depthLinear = ClipInfo[0] / (ClipInfo[1] * depthSample + ClipInfo[2]);
|
depthLinear = ClipInfo[0] / (ClipInfo[1] * depthSample + ClipInfo[2]);
|
||||||
//float depthLinear = (NearClip) / ( -depthSample + 1.0f);
|
//float depthLinear = (NearClip) / ( -depthSample + 1.0f);
|
||||||
//fragmentColor = vec4(depthLinear, depthLinear, depthLinear, 1.0f);
|
//fragmentColor = vec4(depthLinear, depthLinear, depthLinear, 1.0f);
|
||||||
|
|||||||
@@ -16,51 +16,51 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
|
|||||||
EntityAABB& boxA = *boundingBox;
|
EntityAABB& boxA = *boundingBox;
|
||||||
bool everHitTheGround = false;
|
bool everHitTheGround = false;
|
||||||
|
|
||||||
glm::vec3 size = boxA.Size();
|
auto prevPosIt = m_PrevPositions.find(entity);
|
||||||
float diameter = std::min(size.x, size.z);
|
if (prevPosIt != m_PrevPositions.end()) {
|
||||||
glm::vec3 prevOrigin = (glm::vec3)cPhysics["PrevOrigin"];
|
glm::vec3 size = boxA.Size();
|
||||||
glm::vec3 toCurrentPos = boxA.Origin() - prevOrigin;
|
float diameter = std::min(size.x, size.z);
|
||||||
float rayLength = glm::length(toCurrentPos) + 0.5f*diameter;
|
glm::vec3 prevOrigin = prevPosIt->second;
|
||||||
//If the entity has moved farther than the size of its box, we need to handle it specially.
|
glm::vec3 toCurrentPos = boxA.Origin() - prevOrigin;
|
||||||
bool traceCollision = rayLength > diameter;
|
float rayLength = glm::length(toCurrentPos) + 0.5f*diameter;
|
||||||
//hack solution: If prevOrigin is less than -9000 in all dimensions,
|
//If the entity has moved farther than the size of its box, we need to handle it specially.
|
||||||
//then it means it is not set, i.e. this is the first collision check for the entity.
|
if (rayLength > diameter) {
|
||||||
if (traceCollision && glm::any(glm::greaterThan((glm::vec3)cPhysics["PrevOrigin"], glm::vec3(-9000.f)))) {
|
Ray ray(prevOrigin, toCurrentPos);
|
||||||
Ray ray(prevOrigin, toCurrentPos);
|
m_OctreeResult.clear();
|
||||||
m_OctreeResult.clear();
|
m_Octree->ObjectsPossiblyHitByRay(ray, m_OctreeResult);
|
||||||
m_Octree->ObjectsPossiblyHitByRay(ray, m_OctreeResult);
|
for (auto& boxB : m_OctreeResult) {
|
||||||
for (auto& boxB : m_OctreeResult) {
|
if (boxA.Entity == boxB.Entity) {
|
||||||
if (boxA.Entity == boxB.Entity) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
bool hit;
|
|
||||||
float dist;
|
|
||||||
if (boxB.Entity.HasComponent("Model")) {
|
|
||||||
RawModel* model;
|
|
||||||
std::string res = (std::string)boxB.Entity["Model"]["Resource"];
|
|
||||||
try {
|
|
||||||
model = ResourceManager::Load<RawModel, true>(res);
|
|
||||||
} catch (const std::exception&) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
float u, v;
|
bool hit;
|
||||||
hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, Transform::ModelMatrix(boxB.Entity), dist, u, v);
|
float dist;
|
||||||
} else {
|
if (boxB.Entity.HasComponent("Model")) {
|
||||||
hit = Collision::RayVsAABB(ray, boxB, dist);
|
RawModel* model;
|
||||||
}
|
std::string res = (std::string)boxB.Entity["Model"]["Resource"];
|
||||||
if (hit && dist < rayLength) {
|
try {
|
||||||
//Set the entity to where it was colliding, minus the maximum box size.
|
model = ResourceManager::Load<RawModel, true>(res);
|
||||||
//TODO: Perhaps this should be done slightly more properly.
|
} catch (const std::exception&) {
|
||||||
glm::vec3 newOriginPos = ray.Origin() + (dist - 0.707107f*diameter) * ray.Direction();
|
continue;
|
||||||
glm::vec3 resolve = newOriginPos - boxA.Origin();
|
}
|
||||||
(glm::vec3&)cTransform["Position"] += resolve;
|
float u, v;
|
||||||
boxA = *Collision::EntityAbsoluteAABB(entity);
|
hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, Transform::ModelMatrix(boxB.Entity), dist, u, v);
|
||||||
if (resolve.y > 0) {
|
} else {
|
||||||
everHitTheGround = true;
|
hit = Collision::RayVsAABB(ray, boxB, dist);
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
}
|
||||||
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
if (hit && dist < rayLength) {
|
||||||
|
//Set the entity to where it was colliding, minus the maximum box size.
|
||||||
|
//TODO: Perhaps this should be done slightly more properly.
|
||||||
|
glm::vec3 newOriginPos = ray.Origin() + (dist - 0.707107f*diameter) * ray.Direction();
|
||||||
|
glm::vec3 resolve = newOriginPos - boxA.Origin();
|
||||||
|
(glm::vec3&)cTransform["Position"] += resolve;
|
||||||
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
|
if (resolve.y > 0) {
|
||||||
|
everHitTheGround = true;
|
||||||
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
|
((glm::vec3&)cPhysics["Velocity"]).y = 0.f;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,6 +90,7 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
|
|||||||
float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"];
|
float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"];
|
||||||
if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) {
|
if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) {
|
||||||
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
||||||
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
cPhysics["Velocity"] = inOutVelocity;
|
cPhysics["Velocity"] = inOutVelocity;
|
||||||
if (isOnGround) {
|
if (isOnGround) {
|
||||||
everHitTheGround = true;
|
everHitTheGround = true;
|
||||||
@@ -99,6 +100,7 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
|
|||||||
} else if (Collision::AABBVsAABB(boxA, boxB, resolutionVector)) {
|
} else if (Collision::AABBVsAABB(boxA, boxB, resolutionVector)) {
|
||||||
//Enter here if boxB has no Model.
|
//Enter here if boxB has no Model.
|
||||||
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
(glm::vec3&)cTransform["Position"] += resolutionVector;
|
||||||
|
boxA = *Collision::EntityAbsoluteAABB(entity);
|
||||||
if (resolutionVector.y > 0) {
|
if (resolutionVector.y > 0) {
|
||||||
everHitTheGround = true;
|
everHitTheGround = true;
|
||||||
(bool)cPhysics["IsOnGround"] = true;
|
(bool)cPhysics["IsOnGround"] = true;
|
||||||
@@ -112,5 +114,5 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
|
|||||||
(bool)cPhysics["IsOnGround"] = false;
|
(bool)cPhysics["IsOnGround"] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
(glm::vec3&)cPhysics["PrevOrigin"] = boxA.Origin();
|
m_PrevPositions[entity] = boxA.Origin();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,40 @@ EntityWrapper EntityWrapper::FirstParentWithComponent(const std::string& compone
|
|||||||
return EntityWrapper::Invalid;
|
return EntityWrapper::Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EntityWrapper EntityWrapper::Clone(EntityWrapper parent /*= Invalid*/)
|
||||||
|
{
|
||||||
|
if (!Valid()) {
|
||||||
|
return EntityWrapper::Invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
EntityWrapper clone = cloneRecursive(*this, EntityWrapper::Invalid);
|
||||||
|
this->World->SetParent(clone.ID, parent.ID);
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<EntityWrapper> EntityWrapper::ChildrenWithComponent(const std::string& componentType)
|
||||||
|
{
|
||||||
|
std::vector<EntityWrapper> childrenWithComponent;
|
||||||
|
childrenWithComponentRecursive(componentType, *this, childrenWithComponent);
|
||||||
|
return childrenWithComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EntityWrapper::DeleteChildren()
|
||||||
|
{
|
||||||
|
auto itPair = this->World->GetDirectChildren(this->ID);
|
||||||
|
if (itPair.first == itPair.second) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<EntityID> entitiesToDelete;
|
||||||
|
for (auto it = itPair.first; it != itPair.second; it++) {
|
||||||
|
entitiesToDelete.push_back(it->second);
|
||||||
|
}
|
||||||
|
for (auto& e : entitiesToDelete) {
|
||||||
|
this->World->DeleteEntity(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool EntityWrapper::IsChildOf(EntityWrapper potentialParent)
|
bool EntityWrapper::IsChildOf(EntityWrapper potentialParent)
|
||||||
{
|
{
|
||||||
EntityWrapper entity = *this;
|
EntityWrapper entity = *this;
|
||||||
@@ -90,6 +124,11 @@ ComponentWrapper EntityWrapper::operator[](const char* componentName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentWrapper EntityWrapper::operator[](const std::string& componentName)
|
||||||
|
{
|
||||||
|
return this->operator[](componentName.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
bool EntityWrapper::operator==(const EntityWrapper& e) const
|
bool EntityWrapper::operator==(const EntityWrapper& e) const
|
||||||
{
|
{
|
||||||
return (this->ID == e.ID) && (this->World == e.World);
|
return (this->ID == e.ID) && (this->World == e.World);
|
||||||
@@ -111,7 +150,7 @@ EntityWrapper EntityWrapper::firstChildByNameRecursive(const std::string& name,
|
|||||||
return EntityWrapper::Invalid;
|
return EntityWrapper::Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto itPair = this->World->GetChildren(parent);
|
auto itPair = this->World->GetDirectChildren(parent);
|
||||||
if (itPair.first == itPair.second) {
|
if (itPair.first == itPair.second) {
|
||||||
return EntityWrapper::Invalid;
|
return EntityWrapper::Invalid;
|
||||||
}
|
}
|
||||||
@@ -131,3 +170,42 @@ EntityWrapper EntityWrapper::firstChildByNameRecursive(const std::string& name,
|
|||||||
return EntityWrapper::Invalid;
|
return EntityWrapper::Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EntityWrapper EntityWrapper::cloneRecursive(EntityWrapper entity, EntityWrapper parent)
|
||||||
|
{
|
||||||
|
EntityWrapper clone = EntityWrapper(entity.World, entity.World->CreateEntity(parent.ID));
|
||||||
|
entity.World->SetName(clone.ID, entity.Name());
|
||||||
|
|
||||||
|
// Clone components
|
||||||
|
for (auto& kv : entity.World->GetComponentPools()) {
|
||||||
|
if (kv.second->KnowsEntity(entity.ID)) {
|
||||||
|
ComponentWrapper c1 = kv.second->GetByEntity(entity.ID);
|
||||||
|
ComponentWrapper c2 = entity.World->AttachComponent(clone.ID, kv.first);
|
||||||
|
c1.Copy(c2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clone children
|
||||||
|
auto children = entity.World->GetDirectChildren(entity.ID);
|
||||||
|
for (auto it = children.first; it != children.second; ++it) {
|
||||||
|
EntityWrapper child(entity.World, it->second);
|
||||||
|
cloneRecursive(child, clone);
|
||||||
|
}
|
||||||
|
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EntityWrapper::childrenWithComponentRecursive(const std::string& componentType, EntityWrapper& entity, std::vector<EntityWrapper>& childrenWithComponent)
|
||||||
|
{
|
||||||
|
auto itPair = this->World->GetDirectChildren(entity.ID);
|
||||||
|
if (itPair.first == itPair.second) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto it = itPair.first; it != itPair.second; ++it) {
|
||||||
|
EntityWrapper child = EntityWrapper(entity.World, it->second);
|
||||||
|
if (child.HasComponent(componentType)) {
|
||||||
|
childrenWithComponent.push_back(child);
|
||||||
|
}
|
||||||
|
childrenWithComponentRecursive(componentType, child, childrenWithComponent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ void _LOG(_LOG_LEVEL logLevel, const char* file, const char* func, unsigned int
|
|||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
if (logLevel == LOG_LEVEL_ERROR) {
|
if (logLevel == LOG_LEVEL_ERROR) {
|
||||||
std::cerr << file << ":" << line << " " << func << std::endl;
|
//std::cerr << file << ":" << line << " " << func << std::endl;
|
||||||
std::cerr << _LOG_LEVEL_PREFIX[logLevel] << message << std::endl;
|
//std::cerr << _LOG_LEVEL_PREFIX[logLevel] << message << std::endl;
|
||||||
} else {
|
} else {
|
||||||
std::cout << _LOG_LEVEL_PREFIX[logLevel] << message << std::endl;
|
std::cout << _LOG_LEVEL_PREFIX[logLevel] << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ void World::SetParent(EntityID entity, EntityID parent)
|
|||||||
m_EntityChildren.insert(std::make_pair(parent, entity));
|
m_EntityChildren.insert(std::make_pair(parent, entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::pair<std::unordered_multimap<EntityID, EntityID>::const_iterator, std::unordered_multimap<EntityID, EntityID>::const_iterator> World::GetChildren(EntityID entity)
|
const std::pair<std::unordered_multimap<EntityID, EntityID>::const_iterator, std::unordered_multimap<EntityID, EntityID>::const_iterator> World::GetDirectChildren(EntityID entity)
|
||||||
{
|
{
|
||||||
return m_EntityChildren.equal_range(entity);
|
return m_EntityChildren.equal_range(entity);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user