From 8a04e874945e73ceb0259de5f95101e4b7510f0a Mon Sep 17 00:00:00 2001 From: stiffly Date: Tue, 23 Feb 2016 14:31:35 +0100 Subject: [PATCH 01/40] The serverlist is displayed when pressing connect button. --- include/Engine/GUI/MainMenuSystem.h | 5 +++- include/Engine/Network/Client.h | 13 +-------- include/Engine/Network/EDisplayServerlist.h | 29 +++++++++++++++++++++ src/Engine/GUI/MainMenuSystem.cpp | 20 ++++++++++++-- src/Engine/Network/Client.cpp | 12 +++------ 5 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 include/Engine/Network/EDisplayServerlist.h diff --git a/include/Engine/GUI/MainMenuSystem.h b/include/Engine/GUI/MainMenuSystem.h index ba69ff0d..dbba55ad 100644 --- a/include/Engine/GUI/MainMenuSystem.h +++ b/include/Engine/GUI/MainMenuSystem.h @@ -5,7 +5,8 @@ #include "../Rendering/IRenderer.h" #include "../Core/ResourceManager.h" #include "../Core/Event.h" - +#include "../Network/ESearchForServers.h" +#include "../Network/EDisplayServerlist.h" #include "EButtonClicked.h" #include "EButtonPressed.h" @@ -27,6 +28,8 @@ private: bool OnButtonRelease(const Events::ButtonReleased& e); EventRelay m_EPressed; bool OnButtonPress(const Events::ButtonPressed& e); + EventRelay m_EDisplayServerlist; + bool OnDisplayServerlist(const Events::DisplayServerlist& e); }; diff --git a/include/Engine/Network/Client.h b/include/Engine/Network/Client.h index d08b863a..a7ac89fa 100644 --- a/include/Engine/Network/Client.h +++ b/include/Engine/Network/Client.h @@ -25,18 +25,7 @@ #include "Network/SnapshotFilter.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; -}; +#include "Network/EDisplayServerlist.h" class Client : public Network { diff --git a/include/Engine/Network/EDisplayServerlist.h b/include/Engine/Network/EDisplayServerlist.h new file mode 100644 index 00000000..d80ad1ba --- /dev/null +++ b/include/Engine/Network/EDisplayServerlist.h @@ -0,0 +1,29 @@ +#ifndef Events_DisplayServerlist_h__ +#define Events_DisplayServerlist_h__ + +#include +#include +#include "Core/Event.h" + +struct ServerInfo +{ + ServerInfo(std::string address, int port, std::string name, int players) + { + Address = address; Port = port; Name = name; PlayersConnected = players; + } + std::string Address = ""; + int Port = 0; + std::string Name = ""; + int PlayersConnected = 0; +}; + +namespace Events +{ + +struct DisplayServerlist : public Event +{ + std::vector Serverlist; +}; + +} +#endif diff --git a/src/Engine/GUI/MainMenuSystem.cpp b/src/Engine/GUI/MainMenuSystem.cpp index f8bf032b..946decde 100644 --- a/src/Engine/GUI/MainMenuSystem.cpp +++ b/src/Engine/GUI/MainMenuSystem.cpp @@ -8,6 +8,7 @@ MainMenuSystem::MainMenuSystem(SystemParams params, IRenderer* renderer) EVENT_SUBSCRIBE_MEMBER(m_EPressed, &MainMenuSystem::OnButtonPress); EVENT_SUBSCRIBE_MEMBER(m_EReleased, &MainMenuSystem::OnButtonRelease); EVENT_SUBSCRIBE_MEMBER(m_EClicked, &MainMenuSystem::OnButtonClick); + EVENT_SUBSCRIBE_MEMBER(m_EDisplayServerlist, &MainMenuSystem::OnDisplayServerlist); } void MainMenuSystem::Update(double dt) @@ -19,8 +20,9 @@ bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e) { if(e.EntityName == "Play") { //Run play code - } else if(e.EntityName == "Connect") { - //Run connect code + } else if(e.EntityName == "Connecting") { + LOG_INFO("Searching for LAN servers..."); + m_EventBroker->Publish(Events::SearchForServers()); } else if(e.EntityName == "Host") { //Run host code } else if(e.EntityName == "Quit") { @@ -55,3 +57,17 @@ bool MainMenuSystem::OnButtonPress(const Events::ButtonPressed& e) return true; } +bool MainMenuSystem::OnDisplayServerlist(const Events::DisplayServerlist& e) +{ + LOG_INFO("This is a serverlist V2!"); + for (int i = 0; i < e.Serverlist.size(); i++) { + LOG_INFO("%s:%i\t%s\t%i/8" + , e.Serverlist[i].Address + , e.Serverlist[i].Port + , e.Serverlist[i].Name + , e.Serverlist[i].PlayersConnected + ); + } + return true; +} + diff --git a/src/Engine/Network/Client.cpp b/src/Engine/Network/Client.cpp index 903cd929..5dbeaf30 100644 --- a/src/Engine/Network/Client.cpp +++ b/src/Engine/Network/Client.cpp @@ -80,7 +80,10 @@ void Client::Update() if (m_SearchingForServers) { if (m_SearchingTime < (1000* (std::clock() - m_StartSearchTime) / (double)CLOCKS_PER_SEC)) { m_SearchingForServers = false; - displayServerlist(); + //displayServerlist(); + Events::DisplayServerlist e; + e.Serverlist = m_Serverlist; + m_EventBroker->Publish(e); } } @@ -419,12 +422,6 @@ void Client::disconnect() bool Client::OnInputCommand(const Events::InputCommand & e) { - // TEMP - if (e.Command == "SearchForServers" && e.Value > 0) { - Events::SearchForServers e; - m_EventBroker->Publish(e); - } - if (e.PlayerID != -1) { return false; } @@ -492,7 +489,6 @@ bool Client::OnSearchForServers(const Events::SearchForServers& e) m_SearchingForServers = true; m_StartSearchTime = std::clock(); m_Serverlist.clear(); - LOG_INFO("Searching for LAN servers...\n"); Packet packet(MessageType::ServerlistRequest); m_ServerlistRequest.Broadcast(packet, 13); // TODO: Config return true; From 06614aa9078f3facedcf1ea02d9dc9e39b612d92 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Fri, 4 Mar 2016 05:41:29 +0100 Subject: [PATCH 02/40] SpectatorCameraSystem handles the overwatch cameras. Set camera to a class pick screen when connecting. Cannot spawn until both team and class has been picked. Preparations for class aware PlayerSpawnSystem. --- include/Game/Systems/PlayerSpawnSystem.h | 1 + include/Game/Systems/SpectatorCameraSystem.h | 22 + resources/DefaultInput.ini | 3 +- .../Schema/Entities/NewMapWSpectatorCam.xml | 3473 +++++++++-------- resources/Schema/Entities/OverwatchCamera.xml | 99 +- src/Game/Game.cpp | 2 + src/Game/Systems/PlayerSpawnSystem.cpp | 71 +- src/Game/Systems/SpectatorCameraSystem.cpp | 66 + 8 files changed, 1995 insertions(+), 1742 deletions(-) create mode 100644 include/Game/Systems/SpectatorCameraSystem.h create mode 100644 src/Game/Systems/SpectatorCameraSystem.cpp diff --git a/include/Game/Systems/PlayerSpawnSystem.h b/include/Game/Systems/PlayerSpawnSystem.h index 70f94807..17364a81 100644 --- a/include/Game/Systems/PlayerSpawnSystem.h +++ b/include/Game/Systems/PlayerSpawnSystem.h @@ -19,6 +19,7 @@ private: { int PlayerID; ComponentInfo::EnumType Team; + ComponentInfo::EnumType Class; }; bool m_NetworkEnabled = false; diff --git a/include/Game/Systems/SpectatorCameraSystem.h b/include/Game/Systems/SpectatorCameraSystem.h new file mode 100644 index 00000000..5a00279b --- /dev/null +++ b/include/Game/Systems/SpectatorCameraSystem.h @@ -0,0 +1,22 @@ +#ifndef SpectatorCameraSystem_h__ +#define SpectatorCameraSystem_h__ + +#include "Core/System.h" +#include "Input/EInputCommand.h" + +class SpectatorCameraSystem : public ImpureSystem +{ +public: + SpectatorCameraSystem(SystemParams params); + + virtual void Update(double dt) override; + +private: + int m_PickedTeam; + bool m_CamSetToTeamPick; + + EventRelay m_EInputCommand; + bool OnInputCommand(const Events::InputCommand& e); +}; + +#endif \ No newline at end of file diff --git a/resources/DefaultInput.ini b/resources/DefaultInput.ini index b47c1e9b..18fb943f 100644 --- a/resources/DefaultInput.ini +++ b/resources/DefaultInput.ini @@ -28,4 +28,5 @@ P=SwitchToPlayer K=TakeDamage,1500 F2=PerformanceTimingResetAllTimers F3=PerformanceTimingCreateExcelData -F4=SwapToClassPick \ No newline at end of file +Comma=SwapToClassPick +Period=SwapToTeamPick \ No newline at end of file diff --git a/resources/Schema/Entities/NewMapWSpectatorCam.xml b/resources/Schema/Entities/NewMapWSpectatorCam.xml index 395eb1de..2305c008 100644 --- a/resources/Schema/Entities/NewMapWSpectatorCam.xml +++ b/resources/Schema/Entities/NewMapWSpectatorCam.xml @@ -23,6 +23,18 @@ + + + + + Models/Props/Highground2.mesh + + + + + + + @@ -75,18 +87,6 @@ - - - - - Models/Props/Highground2.mesh - - - - - - - @@ -1843,6 +1843,1006 @@ + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + @@ -3229,88 +4229,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - @@ -3366,6 +4284,60 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + @@ -3380,6 +4352,34 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + @@ -3396,1011 +4396,24 @@ - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + @@ -4479,19 +4492,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -4519,35 +4519,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - + + @@ -4574,36 +4547,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - + + @@ -4629,36 +4574,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - + + @@ -4677,47 +4594,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -4732,6 +4608,130 @@ + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + @@ -4750,434 +4750,11 @@ - - - - - - - - - 10 - - - - - - - - - - - 1 - - - - - - - - - 10 - - - - - - - - - - - 10 - - - - - - - - - - 10 - - - - - - - - - - - - - 10 - - - - - - - - - - - 1 - - - - - - - - - - - - - - Schema/Entities/Player.xml - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 2 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointRed.mesh - - - - - - - - - - - - - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 3 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 1.5498908015879351 - 1 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointBlue.mesh - - - - - - - - - - - - - 4 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - - - - - - - Schema/Entities/PlayerRed.xml - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - @@ -5209,8 +4786,8 @@ Models/Props/PickUps/AmmoPickUp.mesh - - + + @@ -5228,27 +4805,8 @@ Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - + + @@ -5285,8 +4843,8 @@ Models/Props/PickUps/HealthPickUp.mesh - - + + @@ -5304,13 +4862,455 @@ Models/Props/PickUps/AmmoPickUp.mesh - - + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + + + + + + 10 + + + + + + + + + + 10 + + + + + + + + + + + + + 1 + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointRed.mesh + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 3 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1.5498908015879351 + 1 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointBlue.mesh + + + + + + + + + + + + + 4 + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/PlayerRed.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + @@ -5367,12 +5367,12 @@ - - 2 - + + 2 + Textures/Core/UnitHexagon_Rotated.png @@ -5401,12 +5401,12 @@ - - 3 - + + 3 + Textures/Core/UnitHexagon_Rotated.png @@ -5435,12 +5435,12 @@ - - 4 - + + 4 + Textures/Core/UnitHexagon_Rotated.png @@ -5469,13 +5469,13 @@ - - 1 - 0.10332605343919568 + + 1 + Textures/Core/UnitHexagon_Rotated.png @@ -5504,10 +5504,10 @@ - + Textures/Core/UnitHexagon_Rotated.png @@ -5613,6 +5613,79 @@ + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 2 + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 3 + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + PickTeam + 1 + + + + + + + + + + + + diff --git a/resources/Schema/Entities/OverwatchCamera.xml b/resources/Schema/Entities/OverwatchCamera.xml index a2b774d3..a6ef1f74 100644 --- a/resources/Schema/Entities/OverwatchCamera.xml +++ b/resources/Schema/Entities/OverwatchCamera.xml @@ -55,12 +55,12 @@ - - 2 - + + 2 + Textures/Core/UnitHexagon_Rotated.png @@ -89,12 +89,12 @@ - - 3 - + + 3 + Textures/Core/UnitHexagon_Rotated.png @@ -123,12 +123,12 @@ - - 4 - + + 4 + Textures/Core/UnitHexagon_Rotated.png @@ -157,13 +157,13 @@ - - 1 - 0.10332605343919568 + + 1 + Textures/Core/UnitHexagon_Rotated.png @@ -192,10 +192,10 @@ - + Textures/Core/UnitHexagon_Rotated.png @@ -301,6 +301,79 @@ + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 2 + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 3 + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + PickTeam + 1 + + + + + + + + + + + + diff --git a/src/Game/Game.cpp b/src/Game/Game.cpp index 0629fbd5..d3972f94 100644 --- a/src/Game/Game.cpp +++ b/src/Game/Game.cpp @@ -34,6 +34,7 @@ #include "Game/Systems/KillFeedSystem.h" #include "Game/Systems/BoostSystem.h" #include "Game/Systems/BoostIconsHUDSystem.h" +#include "Game/Systems/SpectatorCameraSystem.h" #include "GUI/ButtonSystem.h" #include "GUI/MainMenuSystem.h" @@ -155,6 +156,7 @@ Game::Game(int argc, char* argv[]) m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); m_SystemPipeline->AddSystem(updateOrderLevel); + m_SystemPipeline->AddSystem(updateOrderLevel); // Populate Octree with collidables ++updateOrderLevel; m_SystemPipeline->AddSystem(updateOrderLevel, m_OctreeCollision, "Collidable"); diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 39fa1606..56ace14c 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -59,7 +59,7 @@ void PlayerSpawnSystem::Update(double dt) } int numSpawnedPlayers = 0; - for (auto& req : m_SpawnRequests) { + for (auto it = m_SpawnRequests.begin(); it != m_SpawnRequests.end(); ++it) { for (auto& cPlayerSpawn : *playerSpawns) { EntityWrapper spawner(m_World, cPlayerSpawn.EntityID); if (!spawner.HasComponent("Spawner")) { @@ -69,10 +69,12 @@ void PlayerSpawnSystem::Update(double dt) // If the spawner has a team affiliation, check it if (spawner.HasComponent("Team")) { auto cSpawnerTeam = spawner["Team"]; - if ((int)cSpawnerTeam["Team"] != req.Team) { - // Increase num spawned players if someone picks spectator, since it is valid to pick spectator + if ((int)cSpawnerTeam["Team"] != it->Team) { + // Increase num spawned players if someone picks spectator or didn't + // pick a class yet, since it is valid // but don't spawn anything, goto next spawnrequest. - if (req.Team == (int)cSpawnerTeam["Team"].Enum("Spectator")) { + // TODO: -1 Signifies no class picked, enum here later? + if (it->Class == -1 || it->Team == (int)cSpawnerTeam["Team"].Enum("Spectator")) { ++numSpawnedPlayers; break; } @@ -80,18 +82,24 @@ void PlayerSpawnSystem::Update(double dt) } } + // TODO: Choose a different spawner depending on class picked? + // Spawn the player! EntityWrapper player = SpawnerSystem::Spawn(spawner, EntityWrapper::Invalid, "Player"); // Set the player team affiliation - player["Team"]["Team"] = req.Team; + player["Team"]["Team"] = it->Team; // Publish a PlayerSpawned event Events::PlayerSpawned e; - e.PlayerID = req.PlayerID; + e.PlayerID = it->PlayerID; e.Player = player; e.Spawner = spawner; m_EventBroker->Publish(e); ++numSpawnedPlayers; + it = m_SpawnRequests.erase(it); + break; + } + if (it == m_SpawnRequests.end()) { break; } } @@ -100,12 +108,12 @@ void PlayerSpawnSystem::Update(double dt) } else { LOG_DEBUG("%i players were spawned or set as spectator.", numSpawnedPlayers); } - m_SpawnRequests.clear(); } bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) { - if (e.Command != "PickTeam" && e.Command != "SwapToClassPick") { + bool removeRequest = e.Command == "SwapToClassPick" || e.Command == "SwapToTeamPick"; + if (e.Command != "PickTeam" && e.Command != "PickClass" && !removeRequest) { return false; } @@ -113,19 +121,6 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) return false; } - // A dead client should be able to swap to the overwatch camera. - if (IsClient && !LocalPlayer.Valid()) { - // Set the camera as active, if it exists. - // Find the respawn camera or class pick camera. - std::string camName = e.Command == "SwapToClassPick" ? "PickClassCamera" : "SpectatorCamera"; - EntityWrapper spectatorCam = m_World->GetFirstEntityByName(camName); - if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) { - Events::SetCamera eSetCamera; - eSetCamera.CameraEntity = spectatorCam; - m_EventBroker->Publish(eSetCamera); - } - } - // Team picks should be processed ONLY server-side! // Don't make a spawn request if we're the client. if (!IsServer && m_NetworkEnabled) { @@ -137,26 +132,38 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) for (; iter != m_SpawnRequests.end(); ++iter) { if (iter->PlayerID == e.PlayerID) { // If player wants to switch class, remove their spawn request. - if (e.Command == "SwapToClassPick") { + if (removeRequest) { m_SpawnRequests.erase(iter); } break; } } - if (e.Command == "SwapToClassPick") { + // Return if we were only supposed to remove a request, not add one. + if (removeRequest) { return true; } + //If we get here, add or alter a spawn request. if (iter != m_SpawnRequests.end()) { - // If player is in queue to spawn, then change their team affiliation in the request. - iter->Team = (ComponentInfo::EnumType)e.Value; + // If player is in queue to spawn, then change their team affiliation or class in the request. + if (e.Command == "PickTeam") { + iter->Team = (ComponentInfo::EnumType)e.Value; + } else { + iter->Class = (ComponentInfo::EnumType)e.Value; + } } else if (m_PlayerEntities.count(e.PlayerID) == 0 || !m_PlayerEntities[e.PlayerID].Valid()) { // If player is not in queue to spawn, then create a spawn request, // but only if they are spectating and/or just connected. SpawnRequest req; req.PlayerID = e.PlayerID; - req.Team = (ComponentInfo::EnumType)e.Value; + if (e.Command == "PickTeam") { + req.Team = (ComponentInfo::EnumType)e.Value; + req.Class = -1; // TODO: -1 Signifies no class picked, enum here later? + } else { + req.Team = 1; // TODO: 1 Signifies spectator, should probably have real enum here later. + req.Class = (ComponentInfo::EnumType)e.Value; + } m_SpawnRequests.push_back(req); } else { return false; @@ -210,7 +217,7 @@ bool PlayerSpawnSystem::OnPlayerSpawned(Events::PlayerSpawned& e) bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e) { - //Only spawn request if network is disabled or we are server. + // Only spawn request if network is disabled or we are server. if (!IsServer && m_NetworkEnabled) { return false; } @@ -218,7 +225,7 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e) return false; } ComponentWrapper cTeam = e.Player["Team"]; - //A spectator can't die anyway + // A spectator can't die anyway if ((ComponentInfo::EnumType)cTeam["Team"] == cTeam["Team"].Enum("Spectator")) { return false; } @@ -230,6 +237,14 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e) SpawnRequest req; req.PlayerID = m_PlayerIDs.at(e.Player.ID); req.Team = cTeam["Team"]; + // TODO: Better than temp class state code. + if (e.Player.HasComponent("DashAbility")) { + req.Class = 1; // Assault + } else if (e.Player.HasComponent("SprintAbility")) { + req.Class = 3; // Sniper + } else { + req.Class = 2; // Defender + } m_SpawnRequests.push_back(req); return true; diff --git a/src/Game/Systems/SpectatorCameraSystem.cpp b/src/Game/Systems/SpectatorCameraSystem.cpp new file mode 100644 index 00000000..bf78cfb0 --- /dev/null +++ b/src/Game/Systems/SpectatorCameraSystem.cpp @@ -0,0 +1,66 @@ +#include "Systems/SpectatorCameraSystem.h" +#include "Rendering/ESetCamera.h" + +SpectatorCameraSystem::SpectatorCameraSystem(SystemParams params) + : System(params) + , m_CamSetToTeamPick(false) + , m_PickedTeam(-1) +{ + EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &SpectatorCameraSystem::OnInputCommand); +} + +void SpectatorCameraSystem::Update(double dt) +{ + if (!m_CamSetToTeamPick && IsClient) { + // Find the class pick camera and set them to it, since they need to pick a team before they can leave the screen. + EntityWrapper spectatorCam = m_World->GetFirstEntityByName("PickTeamCamera"); + if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) { + m_CamSetToTeamPick = true; + Events::SetCamera eSetCamera; + eSetCamera.CameraEntity = spectatorCam; + m_EventBroker->Publish(eSetCamera); + } + } +} + +bool SpectatorCameraSystem::OnInputCommand(const Events::InputCommand& e) +{ + // Only the client should do this, and only if player is not spawned. + if (!IsClient || LocalPlayer.Valid()) { + return false; + } + bool swapToClass = e.Command == "PickTeam" || e.Command == "SwapToClassPick"; + if (e.Value == 0 || !swapToClass && e.Command != "SwapToTeamPick" && e.Command != "PickClass") { + return false; + } + + if (e.Command == "PickTeam") { + m_PickedTeam = e.Value; + } + + // If a team has not been picked, they may not exit the pick team screen. + if (m_PickedTeam == -1) { + return false; + } + + // A dead client should be able to swap to and between the overwatch cameras. + std::string camName; + // TODO: 1 Signifies spectator, should probably have real enum here later. + // Spectators should never end up at the class select, instead put them at the SpectatorCamera. + if (swapToClass && m_PickedTeam != 1) { + camName = "PickClassCamera"; + } else if (e.Command == "SwapToTeamPick") { + camName = "PickTeamCamera"; + } else { + camName = "SpectatorCamera"; + } + EntityWrapper spectatorCam = m_World->GetFirstEntityByName(camName); + // Set the camera as active, if it exists. + if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) { + Events::SetCamera eSetCamera; + eSetCamera.CameraEntity = spectatorCam; + m_EventBroker->Publish(eSetCamera); + } + + return true; +} \ No newline at end of file From 03843774d7d8f4adb4ace9f825efc275bd5a8e25 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Fri, 4 Mar 2016 07:01:47 +0100 Subject: [PATCH 03/40] Moved buttons and fixed so you can't spawn with no class. --- .../Schema/Entities/NewMapWSpectatorCam.xml | 2332 +++++++++-------- resources/Schema/Entities/OverwatchCamera.xml | 372 ++- src/Game/Systems/PlayerSpawnSystem.cpp | 17 +- 3 files changed, 1481 insertions(+), 1240 deletions(-) diff --git a/resources/Schema/Entities/NewMapWSpectatorCam.xml b/resources/Schema/Entities/NewMapWSpectatorCam.xml index 2305c008..fc4dd9a1 100644 --- a/resources/Schema/Entities/NewMapWSpectatorCam.xml +++ b/resources/Schema/Entities/NewMapWSpectatorCam.xml @@ -23,6 +23,18 @@ + + + + + Models/Props/Highground1.mesh + + + + + + + @@ -75,18 +87,6 @@ - - - - - Models/Props/Highground1.mesh - - - - - - - @@ -2843,6 +2843,178 @@ + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + @@ -3229,6 +3401,125 @@ + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + @@ -3283,96 +3574,6 @@ - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - @@ -3441,21 +3642,6 @@ - - - - Models/Core/UnitPlane.mesh - - true - - - - - - - - - @@ -3499,20 +3685,6 @@ - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - @@ -3520,6 +3692,35 @@ + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + @@ -3533,119 +3734,6 @@ - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - - Models/Props/Flora/TreeLog.mesh - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - @@ -3664,7 +3752,7 @@ true - + @@ -3676,7 +3764,7 @@ true - + @@ -3695,57 +3783,6 @@ - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - @@ -3757,18 +3794,6 @@ - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - @@ -3788,7 +3813,7 @@ true - + @@ -3800,7 +3825,19 @@ true - + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + @@ -3826,7 +3863,7 @@ true - + @@ -3837,11 +3874,37 @@ true - + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + @@ -3854,6 +3917,18 @@ + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + @@ -3868,6 +3943,20 @@ + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + @@ -3889,9 +3978,37 @@ true - - - + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + @@ -3931,9 +4048,135 @@ true - - - + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/TreeLog.mesh + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + @@ -3952,20 +4195,6 @@ - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - @@ -3980,20 +4209,6 @@ - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - @@ -4007,20 +4222,6 @@ - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - @@ -4036,21 +4237,6 @@ - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - @@ -4066,20 +4252,6 @@ - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - @@ -4107,36 +4279,8 @@ Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - + + @@ -4173,8 +4317,50 @@ Models/Props/PickUps/PickUpHolder.mesh - - + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + @@ -4194,20 +4380,6 @@ - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - @@ -4224,183 +4396,24 @@ - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + @@ -4479,19 +4492,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -4519,13 +4519,53 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + @@ -4547,8 +4587,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - + + @@ -4561,75 +4601,8 @@ Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - + + @@ -4656,8 +4629,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - + + @@ -4670,8 +4643,63 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + @@ -4691,20 +4719,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -4718,20 +4732,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -4750,6 +4750,159 @@ + + + + + + + + + + Schema/Entities/PlayerRed.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + + + + + + 10 + + + + + + + + + + + 1 + + + + + + + + + 1 + + + + + + + + + + + 10 + + + + + + + + + + 10 + + + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + @@ -4757,18 +4910,37 @@ - + 0.10000000149011612 - Models/Props/PickUps/AmmoPickUp.mesh + Models/Props/PickUps/HealthPickUp.mesh - - + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + @@ -4805,8 +4977,8 @@ Models/Props/PickUps/AmmoPickUp.mesh - - + + @@ -4814,18 +4986,37 @@ - + 0.10000000149011612 - Models/Props/PickUps/HealthPickUp.mesh + Models/Props/PickUps/AmmoPickUp.mesh - - + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + @@ -4850,25 +5041,6 @@ - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - @@ -4888,25 +5060,6 @@ - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - @@ -4946,7 +5099,7 @@ false - + @@ -4959,7 +5112,7 @@ false - + @@ -4979,89 +5132,6 @@ - - - - - - - - - 10 - - - - - - - - - - 10 - - - - - - - - - - - - - 1 - - - - - - - - - 10 - - - - - - - - - - - 10 - - - - - - - - - - - 10 - - - - - - - - - - - 1 - - - - - - - - - @@ -5071,28 +5141,35 @@ - Models/Props/CapturePoint/CapturePointNeutral.mesh + Models/Props/CapturePoint/CapturePointBlue.mesh - + - 2 + + + + 4 - + + + + + Models/Core/UnitCylinder.mesh - + true - - + + @@ -5137,6 +5214,39 @@ + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1.5498908015879351 + 1 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + @@ -5176,15 +5286,14 @@ Models/Props/CapturePoint/CapturePointNeutral.mesh - + - 1.5498908015879351 - 1 + 2 @@ -5194,123 +5303,14 @@ true - - + + - - - - - Models/Props/CapturePoint/CapturePointBlue.mesh - - - - - - - - - - - - - 4 - - - - - - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - - - - - - - Schema/Entities/PlayerRed.xml - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - @@ -5332,6 +5332,136 @@ + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 1 + + + + + + + + + + + Spectator + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 2 + + + + + + + + + + + Red + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 3 + + + + + + + + + + + Blue + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Pick Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + @@ -5358,10 +5488,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -5371,7 +5501,7 @@ - 2 + 4 Textures/Core/UnitHexagon_Rotated.png @@ -5426,10 +5556,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -5439,7 +5569,7 @@ - 4 + 2 Textures/Core/UnitHexagon_Rotated.png @@ -5455,6 +5585,38 @@ + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + @@ -5490,38 +5652,6 @@ - - - - Textures/Core/UnitHexagon.png - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - @@ -5551,28 +5681,10 @@ - + - - - - - Textures/Core/UnitHexagon.png - - - - PickClass - 2 - - - - - - - - @@ -5585,11 +5697,59 @@ 1 - + - + + + + + Assault + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + PickClass + 2 + + + + + + + + + + + Defender + Fonts/DroidSans.ttf,64 + + + + + + + + + + @@ -5603,81 +5763,37 @@ 3 - + - + + + + + Sniper + Fonts/DroidSans.ttf,64 + + + + + + + + + + - - - - - - - - - - - - - - - - - - + - - - Textures/Core/UnitHexagon.png - - - - - PickTeam - 2 - + + Pick Class + Fonts/DroidSans.ttf,64 + + - - - - - - - - - - - Textures/Core/UnitHexagon.png - - - - - PickTeam - 3 - - - - - - - - - - - - - Textures/Core/UnitHexagon.png - - - - PickTeam - 1 - - - - + + diff --git a/resources/Schema/Entities/OverwatchCamera.xml b/resources/Schema/Entities/OverwatchCamera.xml index a6ef1f74..ee3c1cb1 100644 --- a/resources/Schema/Entities/OverwatchCamera.xml +++ b/resources/Schema/Entities/OverwatchCamera.xml @@ -20,6 +20,136 @@ + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 1 + + + + + + + + + + + Spectator + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 2 + + + + + + + + + + + Red + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + PickTeam + 3 + + + + + + + + + + + Blue + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Pick Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + @@ -46,10 +176,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -59,7 +189,7 @@ - 2 + 4 Textures/Core/UnitHexagon_Rotated.png @@ -114,10 +244,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -127,7 +257,7 @@ - 4 + 2 Textures/Core/UnitHexagon_Rotated.png @@ -143,6 +273,38 @@ + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + @@ -178,38 +340,6 @@ - - - - Textures/Core/UnitHexagon.png - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - @@ -239,28 +369,10 @@ - + - - - - - Textures/Core/UnitHexagon.png - - - - PickClass - 2 - - - - - - - - @@ -273,11 +385,59 @@ 1 - + - + + + + + Assault + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + PickClass + 2 + + + + + + + + + + + Defender + Fonts/DroidSans.ttf,64 + + + + + + + + + + @@ -291,81 +451,37 @@ 3 - + - + + + + + Sniper + Fonts/DroidSans.ttf,64 + + + + + + + + + + - - - - - - - - - - - - - - - - - - + - - - Textures/Core/UnitHexagon.png - - - - - PickTeam - 2 - + + Pick Class + Fonts/DroidSans.ttf,64 + + - - - - - - - - - - - Textures/Core/UnitHexagon.png - - - - - PickTeam - 3 - - - - - - - - - - - - - Textures/Core/UnitHexagon.png - - - - PickTeam - 1 - - - - + + diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 56ace14c..10632c0a 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -60,6 +60,13 @@ void PlayerSpawnSystem::Update(double dt) int numSpawnedPlayers = 0; for (auto it = m_SpawnRequests.begin(); it != m_SpawnRequests.end(); ++it) { + // TODO: -1 Signifies no class picked, enum here later? + // Increase num spawned players if they didn't pick class yet since it is valid + // but don't spawn anything, goto next spawnrequest. + if (it->Class == -1) { + ++numSpawnedPlayers; + break; + } for (auto& cPlayerSpawn : *playerSpawns) { EntityWrapper spawner(m_World, cPlayerSpawn.EntityID); if (!spawner.HasComponent("Spawner")) { @@ -70,11 +77,9 @@ void PlayerSpawnSystem::Update(double dt) if (spawner.HasComponent("Team")) { auto cSpawnerTeam = spawner["Team"]; if ((int)cSpawnerTeam["Team"] != it->Team) { - // Increase num spawned players if someone picks spectator or didn't - // pick a class yet, since it is valid + // Increase num spawned players if someone picks spectator since it is valid // but don't spawn anything, goto next spawnrequest. - // TODO: -1 Signifies no class picked, enum here later? - if (it->Class == -1 || it->Team == (int)cSpawnerTeam["Team"].Enum("Spectator")) { + if (it->Team == (int)cSpawnerTeam["Team"].Enum("Spectator")) { ++numSpawnedPlayers; break; } @@ -149,8 +154,10 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) // If player is in queue to spawn, then change their team affiliation or class in the request. if (e.Command == "PickTeam") { iter->Team = (ComponentInfo::EnumType)e.Value; + LOG_INFO("old request swap Team"); } else { iter->Class = (ComponentInfo::EnumType)e.Value; + LOG_INFO("old request swap Class"); } } else if (m_PlayerEntities.count(e.PlayerID) == 0 || !m_PlayerEntities[e.PlayerID].Valid()) { // If player is not in queue to spawn, then create a spawn request, @@ -160,9 +167,11 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) if (e.Command == "PickTeam") { req.Team = (ComponentInfo::EnumType)e.Value; req.Class = -1; // TODO: -1 Signifies no class picked, enum here later? + LOG_INFO("new request set Team"); } else { req.Team = 1; // TODO: 1 Signifies spectator, should probably have real enum here later. req.Class = (ComponentInfo::EnumType)e.Value; + LOG_INFO("new request set Class"); } m_SpawnRequests.push_back(req); } else { From 0dfe00b406c92e3696e613f046c0bef58aae92b8 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Fri, 4 Mar 2016 09:49:27 +0100 Subject: [PATCH 04/40] Unlocks mouse when changing to SpectatorCamera and locking when respawning. --- include/Game/Systems/PlayerDeathSystem.h | 1 + src/Game/Systems/PlayerDeathSystem.cpp | 24 ++++++++++++++-------- src/Game/Systems/PlayerSpawnSystem.cpp | 3 +++ src/Game/Systems/SpectatorCameraSystem.cpp | 5 +++++ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/include/Game/Systems/PlayerDeathSystem.h b/include/Game/Systems/PlayerDeathSystem.h index e4f96114..5a82f999 100644 --- a/include/Game/Systems/PlayerDeathSystem.h +++ b/include/Game/Systems/PlayerDeathSystem.h @@ -25,6 +25,7 @@ private: EventRelay m_EEntityDeleted; bool OnEntityDeleted(Events::EntityDeleted& e); + void setSpectatorCamera(); void createDeathEffect(EntityWrapper player); }; diff --git a/src/Game/Systems/PlayerDeathSystem.cpp b/src/Game/Systems/PlayerDeathSystem.cpp index cbf0927f..bb9a807c 100644 --- a/src/Game/Systems/PlayerDeathSystem.cpp +++ b/src/Game/Systems/PlayerDeathSystem.cpp @@ -1,4 +1,5 @@ #include "Systems/PlayerDeathSystem.h" +#include "Core/ELockMouse.h" PlayerDeathSystem::PlayerDeathSystem(SystemParams params) : System(params) @@ -33,10 +34,10 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) //components that we need from player auto playerModel = player.FirstChildByName("PlayerModel"); - if (!playerModel.Valid()) { - return; - } - if (!playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { + if (!playerModel.Valid() || !playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { + if (player == LocalPlayer) { + setSpectatorCamera(); + } return; } auto playerEntityModel = playerModel["Model"]; @@ -46,9 +47,7 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) playerEntityModel.Copy(deathEffectEW["Model"]); playerEntityAnimation.Copy(deathEffectEW["Animation"]); //freeze the animation - deathEffectEW["Animation"]["Speed1"] = 0.0; - deathEffectEW["Animation"]["Speed2"] = 0.0; - deathEffectEW["Animation"]["Speed3"] = 0.0; + deathEffectEW["Animation"]["Speed"] = 0.0; //copy the models position,orientation deathEffectEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"]; @@ -73,13 +72,20 @@ bool PlayerDeathSystem::OnEntityDeleted(Events::EntityDeleted& e) return false; } + setSpectatorCamera(); + return true; +} + +void PlayerDeathSystem::setSpectatorCamera() +{ // Look for the spectator camera entity in the level. EntityWrapper spectatorCam = m_World->GetFirstEntityByName("SpectatorCamera"); if (!spectatorCam.Valid() || !spectatorCam.HasComponent("Camera") || LocalPlayer.Valid()) { - return false; + return; } Events::SetCamera eSetCamera; eSetCamera.CameraEntity = spectatorCam; m_EventBroker->Publish(eSetCamera); - return true; + Events::UnlockMouse unlock; + m_EventBroker->Publish(unlock); } diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 10632c0a..7692b0a7 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -1,4 +1,5 @@ #include "Systems/PlayerSpawnSystem.h" +#include "Core/ELockMouse.h" PlayerSpawnSystem::PlayerSpawnSystem(SystemParams params) : System(params) @@ -100,6 +101,8 @@ void PlayerSpawnSystem::Update(double dt) e.Player = player; e.Spawner = spawner; m_EventBroker->Publish(e); + Events::LockMouse lock; + m_EventBroker->Publish(lock); ++numSpawnedPlayers; it = m_SpawnRequests.erase(it); break; diff --git a/src/Game/Systems/SpectatorCameraSystem.cpp b/src/Game/Systems/SpectatorCameraSystem.cpp index bf78cfb0..58f25155 100644 --- a/src/Game/Systems/SpectatorCameraSystem.cpp +++ b/src/Game/Systems/SpectatorCameraSystem.cpp @@ -1,5 +1,6 @@ #include "Systems/SpectatorCameraSystem.h" #include "Rendering/ESetCamera.h" +#include "Core/ELockMouse.h" SpectatorCameraSystem::SpectatorCameraSystem(SystemParams params) : System(params) @@ -19,6 +20,8 @@ void SpectatorCameraSystem::Update(double dt) Events::SetCamera eSetCamera; eSetCamera.CameraEntity = spectatorCam; m_EventBroker->Publish(eSetCamera); + Events::UnlockMouse unlock; + m_EventBroker->Publish(unlock); } } } @@ -60,6 +63,8 @@ bool SpectatorCameraSystem::OnInputCommand(const Events::InputCommand& e) Events::SetCamera eSetCamera; eSetCamera.CameraEntity = spectatorCam; m_EventBroker->Publish(eSetCamera); + Events::UnlockMouse unlock; + m_EventBroker->Publish(unlock); } return true; From a8f2d0a8e6edddca2ece78fc2538aea5001fb836 Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 7 Mar 2016 10:48:46 +0100 Subject: [PATCH 05/40] Some assets, some fixes to the scoreboard --- assets | 2 +- resources/Schema/Entities/CP_Rocky.xml | 2288 ++++++++--------- resources/Schema/Entities/ScoreBoard_Main.xml | 4 +- src/Game/Systems/ScoreScreenSystem.cpp | 2 +- 4 files changed, 1148 insertions(+), 1148 deletions(-) diff --git a/assets b/assets index 7a6d7078..0ae73657 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 7a6d70787b036d8ae8763b69ae6ad098bf221c22 +Subproject commit 0ae736570b5600c2ad05f556ccaec4f5341c2b06 diff --git a/resources/Schema/Entities/CP_Rocky.xml b/resources/Schema/Entities/CP_Rocky.xml index a9c4aaac..d034be78 100644 --- a/resources/Schema/Entities/CP_Rocky.xml +++ b/resources/Schema/Entities/CP_Rocky.xml @@ -21,6 +21,27 @@ + + + + + Models/Props/Highground5.mesh + + + + + + + + + + Models/Props/Highground6.mesh + + + + + + @@ -46,11 +67,9 @@ - Models/Props/Walls/SciFiWallBig.mesh + Models/Props/Walls/SciFiWallSmall1.mesh - - - + @@ -69,9 +88,11 @@ - Models/Props/Walls/SciFiWallMedium.mesh + Models/Props/Walls/SciFiWallBig.mesh - + + + @@ -79,7 +100,7 @@ - Models/Props/Walls/SciFiWallSmall1.mesh + Models/Props/Walls/SciFiWallMedium.mesh @@ -149,8 +170,8 @@ Models/Core/UnitCube.mesh - - + + @@ -462,8 +483,8 @@ Models/Core/UnitCube.mesh - - + + @@ -494,23 +515,23 @@ - Schema/Entities/ScoreBoard_Blue.xml + Schema/Entities/ScoreBoard_Red.xml - + - + - + Models/Core/UnitCube.mesh - + @@ -519,14 +540,14 @@ - + - + @@ -623,23 +644,23 @@ - Schema/Entities/ScoreBoard_Red.xml + Schema/Entities/ScoreBoard_Blue.xml - + - + - + Models/Core/UnitCube.mesh - + @@ -648,14 +669,14 @@ - + - + @@ -798,27 +819,6 @@ - - - - - Models/Props/Highground5.mesh - - - - - - - - - - Models/Props/Highground6.mesh - - - - - - @@ -944,6 +944,20 @@ + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + @@ -1103,20 +1117,6 @@ - - - - - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - @@ -1430,11 +1430,11 @@ 2 - + - + @@ -1451,7 +1451,7 @@ - + @@ -1477,11 +1477,11 @@ 2 - + - + @@ -1498,7 +1498,7 @@ - + @@ -1524,11 +1524,11 @@ 2 - + - + @@ -1545,7 +1545,7 @@ - + @@ -1571,11 +1571,11 @@ 2 - + - + @@ -1592,7 +1592,7 @@ - + @@ -1618,11 +1618,11 @@ 2 - + - + @@ -1639,7 +1639,7 @@ - + @@ -1665,11 +1665,11 @@ 2 - + - + @@ -1686,7 +1686,7 @@ - + @@ -1712,11 +1712,11 @@ 2 - + - + @@ -1733,7 +1733,7 @@ - + @@ -2981,11 +2981,11 @@ 2 - + - + @@ -3002,7 +3002,7 @@ - + @@ -3028,11 +3028,11 @@ 2 - + - + @@ -3049,7 +3049,7 @@ - + @@ -3301,19 +3301,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -3382,237 +3369,21 @@ - - - - - - - - Models/Props/Walls/SmallWall3.mesh + Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall2.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall2.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Walls/MediumWall2.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - - Models/Props/Walls/MediumWall2.mesh - - - - + + - - - - Models/Core/UnitPlane.mesh - - true - - - - - - - - - @@ -3630,58 +3401,6 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - @@ -3734,6 +3453,58 @@ + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + @@ -3826,6 +3597,235 @@ + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + @@ -3855,37 +3855,11 @@ - Models/Props/Stones/BigStone.mesh + Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - + + @@ -3917,6 +3891,164 @@ + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + @@ -3948,11 +4080,103 @@ - Models/Props/Stones/SmallStone1.mesh + Models/Props/Stones/BigStone.mesh - - + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + @@ -3970,6 +4194,19 @@ + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + @@ -4038,98 +4275,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -4144,151 +4289,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -4304,9 +4304,59 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + @@ -4347,47 +4397,27 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - + + + - - - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - - - - - - + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + @@ -4403,21 +4433,6 @@ - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4433,6 +4448,18 @@ + + + + + 3 + + + + + + + @@ -4458,18 +4485,6 @@ - - - - - 3 - - - - - - - @@ -4487,21 +4502,6 @@ - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4509,6 +4509,53 @@ + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + @@ -4525,11 +4572,11 @@ 2 - + - + @@ -4546,54 +4593,7 @@ - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - + @@ -4619,11 +4619,11 @@ 2 - + - + @@ -4640,148 +4640,7 @@ - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - + @@ -4807,11 +4666,11 @@ 2 - + - + @@ -4828,7 +4687,148 @@ - + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + @@ -4845,21 +4845,6 @@ - - - - - 6 - Models/Props/Pillars/SciFiPillar1Blue.mesh - - - - - - - - - @@ -4888,6 +4873,21 @@ + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + @@ -4906,84 +4906,70 @@ - + - + + + Schema/Entities/Player.xml + + + + + + + + + - + - - 10 - + + + Models/Characters/Assault/AssaultTPose.mesh + false + - + - + - - 1 - - - - - - - - - - 10 - + + + Models/Characters/Assault/AssaultTPose.mesh + false + - + - + - - - 10 - + + + Models/Characters/Assault/AssaultTPose.mesh + false + - + - + - - 10 - + + + Models/Characters/Assault/AssaultTPose.mesh + false + - - - - - - - - - 10 - - - - - - - - - - - 0.40000000596046448 - - - + @@ -5006,19 +4992,6 @@ - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - @@ -5032,19 +5005,6 @@ - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - @@ -5058,6 +5018,116 @@ + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + + + + + + + 10 + + + + + + + + + + + 0.40000000596046448 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + + 10 + + + + + + + + + + + 1 + + + + + + + + + 10 + + + + + + + @@ -5065,6 +5135,38 @@ + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1 + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + @@ -5105,38 +5207,6 @@ - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 3 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - @@ -5169,38 +5239,6 @@ - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 1 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - @@ -5240,75 +5278,37 @@ - - - - - - - Schema/Entities/Player.xml - - - - - - - - - - - - + - + - Models/Characters/Assault/AssaultTPose.mesh - false + Models/Props/CapturePoint/CapturePointNeutral.mesh - + - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - + + + + + 3 + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + diff --git a/resources/Schema/Entities/ScoreBoard_Main.xml b/resources/Schema/Entities/ScoreBoard_Main.xml index 565fb57b..ccc1df68 100644 --- a/resources/Schema/Entities/ScoreBoard_Main.xml +++ b/resources/Schema/Entities/ScoreBoard_Main.xml @@ -21,11 +21,11 @@ - + - + diff --git a/src/Game/Systems/ScoreScreenSystem.cpp b/src/Game/Systems/ScoreScreenSystem.cpp index 6166e892..94674432 100644 --- a/src/Game/Systems/ScoreScreenSystem.cpp +++ b/src/Game/Systems/ScoreScreenSystem.cpp @@ -78,7 +78,7 @@ void ScoreScreenSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& if (it == m_PlayerIdentities.end()) { break; - } + } if(found == false) { if(it->second.Team != currentTeam) { From 388fe7c259fd71418fbe67c101a14d0b45f44eeb Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 7 Mar 2016 11:28:10 +0100 Subject: [PATCH 06/40] Fixed some stuff on the player HUD --- resources/Schema/Entities/PlayerHUD.xml | 356 +++++++++++++----------- 1 file changed, 195 insertions(+), 161 deletions(-) diff --git a/resources/Schema/Entities/PlayerHUD.xml b/resources/Schema/Entities/PlayerHUD.xml index e3e9165b..cf07bc56 100644 --- a/resources/Schema/Entities/PlayerHUD.xml +++ b/resources/Schema/Entities/PlayerHUD.xml @@ -31,116 +31,6 @@ - - - - - - - - - 1 - - - - - Textures/HUD/HealthHudTriMain.png - - - - - - - - - - - - - - - - - - - - - - - Textures/Core/White.png - - false - - - - - - - - - - - - - - - - Textures/Core/White.png - - false - - - - - - - - - - - - - - - - Textures/Core/White.png - - false - - - - - - - - - - - - - - - - - 1 - - - - 100/100 - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - @@ -154,40 +44,7 @@ Textures/Core/UnitHexagon.png - - - - - - - - - - - 2 - - - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon.png - + false @@ -197,15 +54,16 @@ - - 3 - + + 3 + Textures/Core/UnitHexagon_Rotated.png + false @@ -222,6 +80,7 @@ Textures/Core/UnitHexagon.png + false @@ -231,16 +90,17 @@ - - 4 - 1 + + 4 + Textures/Core/UnitHexagon_Rotated.png + false @@ -257,6 +117,43 @@ Textures/Core/UnitHexagon.png + false + + + + + + + + + + + + + + 2 + + + Textures/Core/UnitHexagon_Rotated.png + + false + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false @@ -266,15 +163,16 @@ - - 1 - + + 1 + Textures/Core/UnitHexagon_Rotated.png + false @@ -291,6 +189,7 @@ Textures/Core/UnitHexagon.png + false @@ -300,14 +199,15 @@ - 1 + Textures/Core/UnitHexagon_Rotated.png + false @@ -377,23 +277,157 @@ - - - Models/Widgets/Arrows/Arrow5.mesh - + + + Models/Widgets/Arrows/Arrow5.mesh + - - - + + + + + + + + + + + + + + 1 + + + + 100/100 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + 1 + + + + + Textures/HealthHUD3.png + + + + + + + + + + + + + + + + + + + + + + + + Textures/Icons/Boosts/Assault-01.png + + false + + + + + + + + + + + + + + + + + Textures/Icons/Boosts/Defender-01.png + + false + + + + + + + + + + + + + + + + + Textures/Icons/Boosts/Sniper-01.png + + false + + + + + + + + + + + + + + + + + + + + Textures/Icons/Abilities/Superman-01.png + + false + + + + + + + + + + + + From 99d663d5a226866d431a09e3e128f28f8acd718e Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 7 Mar 2016 13:55:37 +0100 Subject: [PATCH 07/40] ShiftIcon should now track ability depending on what ability the player has and change icon accordingly. --- .../Game/Systems/AbilityCooldownHUDSystem.h | 1 + src/Game/Systems/AbilityCooldownHUDSystem.cpp | 48 +++++++++++++++---- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/include/Game/Systems/AbilityCooldownHUDSystem.h b/include/Game/Systems/AbilityCooldownHUDSystem.h index 610b4dc2..f2710ce3 100644 --- a/include/Game/Systems/AbilityCooldownHUDSystem.h +++ b/include/Game/Systems/AbilityCooldownHUDSystem.h @@ -12,6 +12,7 @@ public: { } virtual void Update(double dt) override; +private: }; #endif \ No newline at end of file diff --git a/src/Game/Systems/AbilityCooldownHUDSystem.cpp b/src/Game/Systems/AbilityCooldownHUDSystem.cpp index ccb12a97..e2734b47 100644 --- a/src/Game/Systems/AbilityCooldownHUDSystem.cpp +++ b/src/Game/Systems/AbilityCooldownHUDSystem.cpp @@ -11,21 +11,53 @@ void AbilityCooldownHUDSystem::Update(double dt) for (auto& abilityHUDC : *abilityHUDs) { EntityWrapper entity = EntityWrapper(m_World, abilityHUDC.EntityID); EntityWrapper abilityEntity = entity.FirstParentWithComponent("DashAbility"); - if (!abilityEntity.Valid()) - return; + std::string abilityName = ""; + + if (!abilityEntity.Valid()) { + //If we dont have a dash ability on player, we check for Sprint ability + abilityEntity = entity.FirstParentWithComponent("SprintAbility"); + + if (!abilityEntity.Valid()) { + //If we dont have a sprint ability on player, we check for shield ability + abilityEntity = entity.FirstParentWithComponent("ShieldAbility"); + + if (!abilityEntity.Valid()) { + //If we dont have a shield ability, we return, since we cannot do anything. + return; + } else { + //If we have a shield ability, we set the right icon + abilityName = "ShieldAbility"; + if (entity.HasComponent("Sprite")) { + (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\SheildDots-01.png"; + } + } + } else { + //If we do have a sprint ability, we change the icon + abilityName = "SprintAbility"; + if (entity.HasComponent("Sprite")) { + (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\Dash-01.png"; + } + } + } else { + //If we have a dash ability, we set the icon to the correct one. + abilityName = "DashAbility"; + if (entity.HasComponent("Sprite")) { + (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\Superman-01.png"; + } + } + EntityWrapper cooldownTextEntity = entity.FirstChildByName("Cooldown"); - double maxAbilityCD = (double)abilityEntity["DashAbility"]["CoolDownMaxTimer"]; - double currentAbilityCD = (double)abilityEntity["DashAbility"]["CoolDownTimer"]; - + double maxAbilityCD = (double)abilityEntity[abilityName]["CoolDownMaxTimer"]; + double currentAbilityCD = (double)abilityEntity[abilityName]["CoolDownTimer"]; currentAbilityCD = currentAbilityCD >= 0.0 ? currentAbilityCD : 0.0; - if(cooldownTextEntity.Valid()) { - if(cooldownTextEntity.HasComponent("Text")) - { + if (cooldownTextEntity.Valid()) { + if (cooldownTextEntity.HasComponent("Text")) { std::string t = (std::string&)cooldownTextEntity["Text"]["Content"] = std::to_string(currentAbilityCD).substr(0, 3); } } + if (entity.HasComponent("Fill")) { entity["Fill"]["Percentage"] = currentAbilityCD/maxAbilityCD; } From 64df3fd7ad4e78d66634a9c703eec9fef49256a2 Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Mon, 7 Mar 2016 14:27:12 +0100 Subject: [PATCH 08/40] CapturePoints now have red/blue/spectator model-children --- resources/Schema/Entities/CP_RockHard.xml | 7936 ++++++++--------- resources/Schema/Entities/CapturePoint.xml | 35 +- resources/Schema/Entities/aim_rays.xml | 40 +- .../Entities/aim_rays_with_capturep.xml | 336 + src/Game/Systems/CapturePointSystem.cpp | 12 + 5 files changed, 4362 insertions(+), 3997 deletions(-) create mode 100644 resources/Schema/Entities/aim_rays_with_capturep.xml diff --git a/resources/Schema/Entities/CP_RockHard.xml b/resources/Schema/Entities/CP_RockHard.xml index 2231df59..9f11d052 100644 --- a/resources/Schema/Entities/CP_RockHard.xml +++ b/resources/Schema/Entities/CP_RockHard.xml @@ -3,8 +3,8 @@ - 1.2059834585982117 - 4 + 0.58443805362486501 + 3 @@ -34,27 +34,6 @@ - - - - - Models/Props/Walls/SciFiWallBig.mesh - true - - - - - - - - - - Models/Props/Walls/SciFiWallMedium.mesh - - - - - @@ -87,6 +66,27 @@ + + + + + Models/Props/Walls/SciFiWallBig.mesh + true + + + + + + + + + + Models/Props/Walls/SciFiWallMedium.mesh + + + + + @@ -708,6 +708,43 @@ + + + + + Models/Highgrounds/Hg7.mesh + + + + + + + + + + + + Models/Highgrounds/Hg17.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg19.mesh + + + + + + + @@ -758,43 +795,6 @@ - - - - - Models/Highgrounds/Hg7.mesh - - - - - - - - - - - - Models/Highgrounds/Hg17.mesh - - - - - - - - - - - - - Models/Highgrounds/Hg19.mesh - - - - - - - @@ -1930,6 +1930,78 @@ + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + @@ -2309,7 +2381,7 @@ - + @@ -2318,11 +2390,38 @@ - Models/Props/Bridges/SciFiBridge1Red.mesh + Models/Props/Stones/SmallStone2.mesh - - + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + @@ -2330,116 +2429,12 @@ - Models/Props/Bridges/SciFiBridge1Red.mesh + Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - + + + @@ -2450,16 +2445,1521 @@ - Models/Props/Pillars/SciFiBridgePillar1.mesh + Models/Props/Stones/SmallStone1.mesh - - - + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + + + @@ -2578,6 +4078,152 @@ + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + @@ -2594,95 +4240,6 @@ - - - - - - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar1Red.mesh - - - - - - - - - - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - - - - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - - - @@ -2701,6 +4258,20 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + @@ -2741,1575 +4312,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - - - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Core/UnitPlane.mesh - - true - - - - - - - - - - - - - - - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -4324,78 +4326,13 @@ Models/Props/Walls/SmallWall3.mesh - + + - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - @@ -4403,53 +4340,13 @@ Models/Props/Walls/SmallWall3.mesh - + - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - @@ -4467,12 +4364,11 @@ - Models/Props/Walls/SmallWall3.mesh + Models/Props/Walls/MediumWall3.mesh - - - + + @@ -4484,7 +4380,21 @@ Models/Props/Walls/BigWallRed.mesh - + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + @@ -4494,12 +4404,24 @@ - Models/Props/Walls/SmallWall3.mesh + Models/Props/Walls/MediumWall3.mesh - - - + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + @@ -4511,8 +4433,8 @@ Models/Props/Walls/SmallWall3.mesh - - + + @@ -4538,26 +4460,13 @@ Models/Props/Walls/SmallWall3.mesh - + - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - @@ -4565,54 +4474,13 @@ Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - + + - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - @@ -4620,22 +4488,8 @@ Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - + + @@ -4670,11 +4524,11 @@ - Models/Props/Walls/MediumWall3.mesh + Models/Props/Walls/BigWallRed.mesh - - + + @@ -4686,13 +4540,188 @@ Models/Props/Walls/SmallWall3.mesh - - + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + @@ -4706,36 +4735,9 @@ - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - + @@ -4744,12 +4746,11 @@ - Models/Props/Walls/SpecialWall1.mesh + Models/Props/Stones/AssaultHolder.mesh - - - + + @@ -4758,12 +4759,11 @@ - Models/Props/Walls/SpecialWall1.mesh + Models/Props/Stones/AssaultHolder.mesh - - - + + @@ -4772,32 +4772,32 @@ - Models/Props/Walls/SpecialWall1.mesh + Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Walls/SpecialWall1.mesh - - - - - + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + @@ -4805,6 +4805,43 @@ + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + @@ -4817,8 +4854,8 @@ Models/Props/Stones/AssaultHolder.mesh - - + + @@ -4844,21 +4881,8 @@ Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - + + @@ -4884,8 +4908,8 @@ Models/Props/Stones/AssaultHolder.mesh - - + + @@ -4897,89 +4921,8 @@ Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - + + @@ -4997,33 +4940,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -5045,8 +4961,129 @@ Models/Props/Stones/AssaultHolder.mesh - - + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + @@ -5058,6 +5095,60 @@ + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + @@ -5075,11 +5166,12 @@ - Models/Props/Walls/MediumWall3.mesh + Models/Props/Walls/SmallWall3.mesh - - + + + @@ -5098,6 +5190,19 @@ + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + @@ -5132,22 +5237,29 @@ Models/Props/Walls/SmallWall3.mesh - - + + + + + + + + + - Models/Props/Walls/BigWallRed.mesh + Models/Props/Stones/BigStone.mesh - - + + @@ -5156,11 +5268,11 @@ - Models/Props/Walls/BigWallBlue.mesh + Models/Props/Stones/MediumStone2.mesh - - + + @@ -5169,12 +5281,11 @@ - Models/Props/Walls/SmallWall3.mesh + Models/Props/Pillars/StonePillar.mesh - - - + + @@ -5183,11 +5294,52 @@ - Models/Props/Walls/SmallWall3.mesh + Models/Props/Stones/SmallStone1.mesh - - + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + @@ -5197,12 +5349,226 @@ - Models/Props/Walls/SmallWall3.mesh + Models/Props/Stones/MediumStone2.mesh - - - + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + @@ -5246,7 +5612,7 @@ - + @@ -5288,7 +5654,7 @@ - + @@ -5300,372 +5666,6 @@ - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - @@ -5688,24 +5688,9 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - + + + @@ -5739,9 +5724,10 @@ + 2 - + @@ -5750,10 +5736,9 @@ - 2 - + @@ -5764,27 +5749,13 @@ - 5 + 4 Models/Props/Stones/ShinyStoneCrystalBlue.mesh + - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - + + @@ -5818,6 +5789,21 @@ + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + @@ -5833,36 +5819,6 @@ - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -5878,6 +5834,19 @@ + + + + + 2 + 1 + + + + + + + @@ -5902,32 +5871,63 @@ - - - - - 2 - 1 - - - - - - - - 4 + 6 Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - + + + + + + + + + + + + 5 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + @@ -5959,37 +5959,11 @@ - Models/Props/Stones/SmallStone1.mesh + Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - + + @@ -5999,11 +5973,25 @@ - Models/Props/Stones/MediumStone2.mesh + Models/Props/Stones/SmallStone1.mesh - - + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + @@ -6035,193 +6023,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -6249,6 +6050,32 @@ + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + @@ -6256,9 +6083,8 @@ Models/Props/Stones/SmallStone2.mesh - - - + + @@ -6267,51 +6093,11 @@ - Models/Props/Stones/SmallStone1.mesh + Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - + + @@ -6336,106 +6122,13 @@ Models/Props/Stones/SmallStone1.mesh - - + + - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -6450,20 +6143,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - @@ -6471,54 +6150,13 @@ Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - + + - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -6526,22 +6164,8 @@ Models/Props/Stones/BigStone.mesh - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - + + @@ -6567,8 +6191,128 @@ Models/Props/Stones/SmallStone2.mesh - - + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + @@ -6586,6 +6330,112 @@ + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + @@ -6607,9 +6457,9 @@ Models/Props/Stones/SmallStone1.mesh - - - + + + @@ -6618,10 +6468,11 @@ - Models/Props/Stones/SmallStone2.mesh + Models/Props/Stones/BigStone.mesh - + + @@ -6633,26 +6484,26 @@ Models/Props/Stones/SmallStone1.mesh - - + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -6660,8 +6511,9 @@ Models/Props/Stones/SmallStone2.mesh - - + + + @@ -6670,37 +6522,12 @@ - Models/Props/Stones/SmallStone2.mesh + Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - + + + @@ -6732,33 +6559,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -6780,13 +6580,213 @@ Models/Props/Stones/SmallStone1.mesh - - + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + @@ -6822,90 +6822,6 @@ - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - @@ -6938,7 +6854,7 @@ - + @@ -6980,7 +6896,7 @@ - + @@ -7022,7 +6938,91 @@ - + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + @@ -7064,7 +7064,7 @@ - + @@ -7106,7 +7106,7 @@ - + @@ -7193,7 +7193,37 @@ Models/Props/Pillars/StonePillar.mesh - + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + @@ -7212,6 +7242,18 @@ + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + @@ -7226,48 +7268,6 @@ - - - - - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar1Blue.mesh - - - - - - - - - @@ -7548,9 +7548,8 @@ Models/Props/Flora/SpecialRoot.mesh - - - + + @@ -7562,8 +7561,9 @@ Models/Props/Flora/SpecialRoot.mesh - - + + + @@ -7610,7 +7610,7 @@ Models/Props/Walls/SmallWall3.mesh - + @@ -7624,7 +7624,8 @@ Models/Props/Walls/SmallWall3.mesh - + + @@ -7637,61 +7638,9 @@ Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - + + + @@ -7717,88 +7666,7 @@ Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - + @@ -7851,13 +7719,38 @@ Models/Props/Walls/SmallWall3.mesh - - + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + @@ -7865,27 +7758,13 @@ Models/Props/Walls/SmallWall3.mesh - - + + - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - @@ -7899,6 +7778,32 @@ + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + @@ -7906,7 +7811,89 @@ Models/Props/Walls/SmallWall3.mesh - + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + @@ -7939,6 +7926,59 @@ + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + @@ -7952,46 +7992,6 @@ - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - @@ -8151,12 +8151,11 @@ 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh + Models/Props/Pillars/SciFiPillar1Blue.mesh - - - + + @@ -8180,12 +8179,12 @@ 4 - Models/Props/Pillars/SciFiPillar2Red.mesh + Models/Props/Pillars/SciFiPillar3Blue.mesh - - - + + + @@ -8198,8 +8197,8 @@ Models/Props/Pillars/SciFiPillar2Blue.mesh - - + + @@ -8222,12 +8221,13 @@ - Models/Props/Pillars/SciFiPillar2Blue.mesh + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh - - - + + + @@ -8255,37 +8255,9 @@ Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - 4 - Models/Props/Pillars/SciFiPillar3Blue.mesh - - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar1Blue.mesh - - - - + + + @@ -8298,8 +8270,36 @@ Models/Props/Pillars/SciFiPillar2Blue.mesh - - + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + @@ -8353,283 +8353,6 @@ - - - - - - - - - 10 - - - - - - - - - - - - 10 - - - - - - - - - - - 0.40000000596046448 - - - - - - - - - - - 0.69999998807907104 - 1.6000000238418579 - - - - - - - - - 10 - - - - - - - - - - - 10 - - - - - - - - - - - - 10 - - - - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 15 - 2 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointBlue.mesh - - - - - - - - - - -15 - - - - 4 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 15 - 1 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 3 - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - Models/Props/CapturePoint/CapturePointRed.mesh - - - - - - - - - - 15 - - - - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - - - - - - - - @@ -8637,15 +8360,15 @@ - - - Schema/Entities/PlayerAssaultFallbackBlue.xml - + + + Schema/Entities/PlayerAssaultFallbackBlue.xml + @@ -8657,9 +8380,7 @@ Models/Characters/Assault/Test/AssaultTPose.mesh - - - + @@ -8693,7 +8414,9 @@ Models/Characters/Assault/Test/AssaultTPose.mesh - + + + @@ -8725,20 +8448,32 @@ - - - Schema/Entities/PlayerAssaultFallbackRed.xml - + + + Schema/Entities/PlayerAssaultFallbackRed.xml + + + + + + Models/Characters/Assault/Test/AssaultTPose.mesh + + + + + + + @@ -8751,6 +8486,18 @@ + + + + + Models/Characters/Assault/Test/AssaultTPose.mesh + + + + + + + @@ -8775,18 +8522,6 @@ - - - - - Models/Characters/Assault/Test/AssaultTPose.mesh - - - - - - - @@ -8797,14 +8532,269 @@ + + + + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + + 10 + + + + + + + + + + + 0.40000000596046448 + + + + + + + + + + + 10 + + + + + + + + + + + 0.69999998807907104 + 1.6000000238418579 + + + + + + + + + 10 + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + - + + 3 + + + - Models/Characters/Assault/Test/AssaultTPose.mesh + Models/Core/UnitCylinder.mesh + + true - + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointBlue.mesh + + + + + + + + + + -15 + + + + 4 + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointRed.mesh + + + + + + + + + + 15 + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + @@ -8821,7 +8811,7 @@ - + @@ -8859,7 +8849,7 @@ Textures/Core/UnitHexagon.png - + @@ -8868,20 +8858,53 @@ + + + 2 - - 1 - - Textures/Core/UnitHexagon_Rotated.png - + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + 1 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + @@ -8903,12 +8926,12 @@ + + + 3 - - - Textures/Core/UnitHexagon_Rotated.png @@ -8923,76 +8946,6 @@ - - - - Textures/Core/UnitHexagon.png - - - - - - - - - - - - 4 - - - 1 - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon.png - - - - - - - - - - - - 1 - - - 1 - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - @@ -9007,11 +8960,11 @@ - 1 + Textures/Core/UnitHexagon_Rotated.png @@ -9026,6 +8979,41 @@ + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + 1 + + + + 4 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + diff --git a/resources/Schema/Entities/CapturePoint.xml b/resources/Schema/Entities/CapturePoint.xml index 9f33c4de..35c89e3e 100644 --- a/resources/Schema/Entities/CapturePoint.xml +++ b/resources/Schema/Entities/CapturePoint.xml @@ -4,14 +4,39 @@ - - Models/Core/UnitSphere.mesh - - + - + + + + + models/core/unitcube.mesh + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + models/core/unitcube.mesh + + + + + + diff --git a/resources/Schema/Entities/aim_rays.xml b/resources/Schema/Entities/aim_rays.xml index c8dac9a3..1d953bf1 100644 --- a/resources/Schema/Entities/aim_rays.xml +++ b/resources/Schema/Entities/aim_rays.xml @@ -92,15 +92,15 @@ - - - Schema/Entities/Player.xml - + + + Schema/Entities/Player.xml + @@ -143,15 +143,15 @@ - - - Schema/Entities/Player.xml - + + + Schema/Entities/Player.xml + @@ -209,24 +209,26 @@ + -15 - - Models\Core\UnitCube.mesh - - + + + Models\Core\UnitCube.mesh + + true + - @@ -234,25 +236,27 @@ + 15 1 - - Models\Core\UnitCube.mesh - - + + + Models\Core\UnitCube.mesh + + true + - diff --git a/resources/Schema/Entities/aim_rays_with_capturep.xml b/resources/Schema/Entities/aim_rays_with_capturep.xml new file mode 100644 index 00000000..6aa3246a --- /dev/null +++ b/resources/Schema/Entities/aim_rays_with_capturep.xml @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + + + + + 15 + + + + + + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + + + + + + + + -15 + + + + 1 + + + + + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + models/core/unitcube.mesh + + + + + + + + + + + + + + diff --git a/src/Game/Systems/CapturePointSystem.cpp b/src/Game/Systems/CapturePointSystem.cpp index 0d6089c5..4647d1b7 100644 --- a/src/Game/Systems/CapturePointSystem.cpp +++ b/src/Game/Systems/CapturePointSystem.cpp @@ -69,6 +69,7 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp int ownedBy = teamComponent["Team"]; int redTeamPlayersStandingInside = 0; int blueTeamPlayersStandingInside = 0; + //note: old color system if (capturePointEntity.HasComponent("Model")) { //Now sets team color to the capturepoint, or white if it is uncaptured. capturePointEntity["Model"]["Color"] = ownedBy == blueTeam ? glm::vec4(0, 0.0f, 1, 0.3) : ownedBy == redTeam ? glm::vec4(1, 0.0f, 0, 0.3) : glm::vec4(1, 1, 1, 0.3); @@ -102,7 +103,18 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp nextPossibleCapturePoint["Blue"] = i - 1; } } + if (m_RecentlyCapturedNeedNextCapturePointNow) { + //change what model is displaying (change all in case 2 capturepoints has been captured on the same frame) + for (int i = 0; i < m_NumberOfCapturePoints; i++) { + auto owner = (int)m_CapturePointNumberToEntityMap[i]["Team"]["Team"]; + if (m_CapturePointNumberToEntityMap[i].FirstChildByName("Red").ID != EntityID_Invalid) { + (bool&)m_CapturePointNumberToEntityMap[i].FirstChildByName("Red")["Model"]["Visible"] = owner == redTeam ? true : false; + (bool&)m_CapturePointNumberToEntityMap[i].FirstChildByName("Blue")["Model"]["Visible"] = owner == blueTeam ? true : false; + (bool&)m_CapturePointNumberToEntityMap[i].FirstChildByName("Spectator")["Model"]["Visible"] = owner == spectatorTeam ? true : false; + } + } + //save the next cap points and publish the captured event m_CapturedEvent.BlueTeamNextCapturePoint = m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Blue"]]; m_CapturedEvent.RedTeamNextCapturePoint = m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Red"]]; m_EventBroker->Publish(m_CapturedEvent); From 47ece6a5bf7ac1b5f7feb2d15a26e7a97ff38401 Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 7 Mar 2016 14:42:50 +0100 Subject: [PATCH 09/40] Changed shield component to track Active, so it and sprint glow full if they are active. Changed how reflections are calculated with light. --- assets | 2 +- resources/Schema/Components/ShieldAbility.xml | 2 +- resources/Schema/Components/ShieldAbility.xsd | 4 +-- resources/Shaders/ForwardPlus.frag.glsl | 2 +- .../Shaders/ForwardPlusShieldCheck.frag.glsl | 2 +- src/Game/Systems/AbilityCooldownHUDSystem.cpp | 29 +++++++++++++++---- 6 files changed, 29 insertions(+), 12 deletions(-) diff --git a/assets b/assets index 0ae73657..52ea74c5 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 0ae736570b5600c2ad05f556ccaec4f5341c2b06 +Subproject commit 52ea74c5d5996ebcd7b064e0a8be469c9f07926e diff --git a/resources/Schema/Components/ShieldAbility.xml b/resources/Schema/Components/ShieldAbility.xml index 49fcf0c0..d66dca31 100644 --- a/resources/Schema/Components/ShieldAbility.xml +++ b/resources/Schema/Components/ShieldAbility.xml @@ -1,4 +1,4 @@ - 2.0 + false \ No newline at end of file diff --git a/resources/Schema/Components/ShieldAbility.xsd b/resources/Schema/Components/ShieldAbility.xsd index 5cf2145c..bbb30c82 100644 --- a/resources/Schema/Components/ShieldAbility.xsd +++ b/resources/Schema/Components/ShieldAbility.xsd @@ -9,8 +9,8 @@ - - This is the cooldown on shield + + If the shield is active or not diff --git a/resources/Shaders/ForwardPlus.frag.glsl b/resources/Shaders/ForwardPlus.frag.glsl index aa45d118..8f0f7deb 100644 --- a/resources/Shaders/ForwardPlus.frag.glsl +++ b/resources/Shaders/ForwardPlus.frag.glsl @@ -171,7 +171,7 @@ void main() vec4 color_result = mix((Color * diffuseTexel * DiffuseColor), Input.ExplosionColor, Input.ExplosionPercentageElapsed); color_result = color_result * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)); float specularResult = (specularTexel.r + specularTexel.g + specularTexel.b)/3.0; - vec4 reflectionTotal = reflectionColor * (1-specularTexel.a) * color_result.a; + vec4 reflectionTotal = reflectionColor * (1-specularTexel.a) * color_result.a * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)); color_result = color_result * clamp(1/specularTexel.a, 0, 1) + reflectionTotal; //vec4 color_result = (DiffuseColor + Input.ExplosionColor) * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)) * diffuseTexel * Color; diff --git a/resources/Shaders/ForwardPlusShieldCheck.frag.glsl b/resources/Shaders/ForwardPlusShieldCheck.frag.glsl index 35db495b..5995facb 100644 --- a/resources/Shaders/ForwardPlusShieldCheck.frag.glsl +++ b/resources/Shaders/ForwardPlusShieldCheck.frag.glsl @@ -178,7 +178,7 @@ void main() vec4 color_result = mix((Color * diffuseTexel * DiffuseColor), Input.ExplosionColor, Input.ExplosionPercentageElapsed); color_result = color_result * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)); float specularResult = (specularTexel.r + specularTexel.g + specularTexel.b)/3.0; - vec4 reflectionTotal = reflectionColor * (1-specularTexel.a) * color_result.a; + vec4 reflectionTotal = reflectionColor * (1-specularTexel.a) * color_result.a * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)); color_result = color_result * clamp(1/specularTexel.a, 0, 1) + reflectionTotal; //vec4 color_result = (DiffuseColor + Input.ExplosionColor) * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)) * diffuseTexel * Color; diff --git a/src/Game/Systems/AbilityCooldownHUDSystem.cpp b/src/Game/Systems/AbilityCooldownHUDSystem.cpp index e2734b47..07461f95 100644 --- a/src/Game/Systems/AbilityCooldownHUDSystem.cpp +++ b/src/Game/Systems/AbilityCooldownHUDSystem.cpp @@ -47,19 +47,36 @@ void AbilityCooldownHUDSystem::Update(double dt) } EntityWrapper cooldownTextEntity = entity.FirstChildByName("Cooldown"); + //TODO: Fix so this track correctly for shield and sprint depending on how they work. + double maxAbilityCD, currentAbilityCD; - double maxAbilityCD = (double)abilityEntity[abilityName]["CoolDownMaxTimer"]; - double currentAbilityCD = (double)abilityEntity[abilityName]["CoolDownTimer"]; - currentAbilityCD = currentAbilityCD >= 0.0 ? currentAbilityCD : 0.0; + if (abilityName == "DashAbility") { + maxAbilityCD = (double)abilityEntity[abilityName]["CoolDownMaxTimer"]; + currentAbilityCD = (double)abilityEntity[abilityName]["CoolDownTimer"]; + currentAbilityCD = currentAbilityCD >= 0.0 ? currentAbilityCD : 0.0; - if (cooldownTextEntity.Valid()) { - if (cooldownTextEntity.HasComponent("Text")) { - std::string t = (std::string&)cooldownTextEntity["Text"]["Content"] = std::to_string(currentAbilityCD).substr(0, 3); + if (cooldownTextEntity.Valid()) { + if (cooldownTextEntity.HasComponent("Text")) { + std::string t = (std::string&)cooldownTextEntity["Text"]["Content"] = std::to_string(currentAbilityCD).substr(0, 3); + } } } + if (abilityName == "ShieldAbility") { + maxAbilityCD = 0.0; + currentAbilityCD = 1 - (bool)abilityEntity[abilityName]["Active"]; + } + + if (abilityName == "SprintAbility") { + maxAbilityCD = 0.0; + currentAbilityCD = 1 - (bool)abilityEntity[abilityName]["Active"]; + } + if (entity.HasComponent("Fill")) { entity["Fill"]["Percentage"] = currentAbilityCD/maxAbilityCD; } + + + } } From 3eaad275ba6a84d1d8282d313aec81bc4692fe7e Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Mon, 7 Mar 2016 14:50:31 +0100 Subject: [PATCH 10/40] New CapturePointAddition fixed to work on Network by Joachim --- src/Engine/Network/Server.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Engine/Network/Server.cpp b/src/Engine/Network/Server.cpp index 5bfb4000..9de3e419 100644 --- a/src/Engine/Network/Server.cpp +++ b/src/Engine/Network/Server.cpp @@ -162,7 +162,7 @@ void Server::unreliableBroadcast(Packet& packet) { for (auto& kv : m_ConnectedPlayers) { packet.ChangePacketID(kv.second.PacketID); -// m_Unreliable.Send(packet, kv.second); + // m_Unreliable.Send(packet, kv.second); } } @@ -649,13 +649,14 @@ bool Server::shouldSendToClient(EntityWrapper childEntity) return true; } } - return childEntity.HasComponent("Player") + return childEntity.HasComponent("Player") || childEntity.FirstParentWithComponent("Player").Valid() - || childEntity.HasComponent("CapturePoint") + || childEntity.HasComponent("CapturePoint") || childEntity.HasComponent("HealthPickup") || childEntity.HasComponent("AmmoPickup") || childEntity.HasComponent("ScoreScreen") - || childEntity.FirstParentWithComponent("ScoreScreen").Valid(); + || childEntity.FirstParentWithComponent("ScoreScreen").Valid() + || childEntity.FirstParentWithComponent("CapturePoint").Valid(); } PlayerID Server::getPlayerIDFromEndpoint() @@ -674,7 +675,7 @@ PlayerID Server::getPlayerIDFromEndpoint() PlayerID Server::getPlayerIDFromEntityID(EntityID entityID) { - for(auto& kv : m_ConnectedPlayers) { + for (auto& kv : m_ConnectedPlayers) { if (entityID == kv.second.EntityID) { return kv.first; } From 282e0bf7c47d3d0b1b4e219f26079ee1769d9420 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Mon, 7 Mar 2016 15:05:37 +0100 Subject: [PATCH 11/40] Only set spectator camera if player haven't spawned already. Don't spawn player if they switch to class pick screen. --- src/Game/Systems/PlayerDeathSystem.cpp | 16 ++++++-- src/Game/Systems/PlayerSpawnSystem.cpp | 53 +++++++++++++++----------- 2 files changed, 43 insertions(+), 26 deletions(-) diff --git a/src/Game/Systems/PlayerDeathSystem.cpp b/src/Game/Systems/PlayerDeathSystem.cpp index bb9a807c..95709e88 100644 --- a/src/Game/Systems/PlayerDeathSystem.cpp +++ b/src/Game/Systems/PlayerDeathSystem.cpp @@ -18,6 +18,8 @@ bool PlayerDeathSystem::OnPlayerDeath(Events::PlayerDeath& e) return false; } + LOG_DEBUG("------ Player #%i died.", e.Player.ID); + createDeathEffect(e.Player); // Delete player @@ -36,6 +38,7 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) auto playerModel = player.FirstChildByName("PlayerModel"); if (!playerModel.Valid() || !playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { if (player == LocalPlayer) { + LOG_DEBUG("------ LocalPlayer's death effect could not be spawned, setting to spectator instead of death cam."); setSpectatorCamera(); } return; @@ -57,6 +60,7 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) //camera (with lifetime) behind the player if (player == LocalPlayer) { + LOG_DEBUG("------ LocalPlayer's death effect spawning, setting to death camera."); m_LocalPlayerDeathEffect = deathEffectEW; auto cam = deathEffectEW.FirstChildByName("Camera"); Events::SetCamera eSetCamera; @@ -71,8 +75,14 @@ bool PlayerDeathSystem::OnEntityDeleted(Events::EntityDeleted& e) if (m_LocalPlayerDeathEffect.ID != e.DeletedEntity) { return false; } - - setSpectatorCamera(); + + // If the player hasn't spawned already, activate the spectator camera. + if (!LocalPlayer.Valid()) { + LOG_DEBUG("------ LocalPlayer's death effect removed, setting to spectator."); + setSpectatorCamera(); + } else { + LOG_DEBUG("------ LocalPlayer's death effect removed, player is already spawned, not setting spectator."); + } return true; } @@ -80,7 +90,7 @@ void PlayerDeathSystem::setSpectatorCamera() { // Look for the spectator camera entity in the level. EntityWrapper spectatorCam = m_World->GetFirstEntityByName("SpectatorCamera"); - if (!spectatorCam.Valid() || !spectatorCam.HasComponent("Camera") || LocalPlayer.Valid()) { + if (!spectatorCam.Valid() || !spectatorCam.HasComponent("Camera")) { return; } Events::SetCamera eSetCamera; diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 7692b0a7..2e55965e 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -59,13 +59,15 @@ void PlayerSpawnSystem::Update(double dt) return; } - int numSpawnedPlayers = 0; + int numHandledRequests = 0; + int playersStillPickingClass = 0; + const int numRequestsToHandle = (int)m_SpawnRequests.size(); for (auto it = m_SpawnRequests.begin(); it != m_SpawnRequests.end(); ++it) { // TODO: -1 Signifies no class picked, enum here later? - // Increase num spawned players if they didn't pick class yet since it is valid + // It is valid if they didn't pick class yet // but don't spawn anything, goto next spawnrequest. if (it->Class == -1) { - ++numSpawnedPlayers; + ++playersStillPickingClass; break; } for (auto& cPlayerSpawn : *playerSpawns) { @@ -78,10 +80,11 @@ void PlayerSpawnSystem::Update(double dt) if (spawner.HasComponent("Team")) { auto cSpawnerTeam = spawner["Team"]; if ((int)cSpawnerTeam["Team"] != it->Team) { - // Increase num spawned players if someone picks spectator since it is valid + // It is valid if someone picks spectator // but don't spawn anything, goto next spawnrequest. if (it->Team == (int)cSpawnerTeam["Team"].Enum("Spectator")) { - ++numSpawnedPlayers; + ++numHandledRequests; + it = m_SpawnRequests.erase(it); break; } continue; @@ -103,7 +106,7 @@ void PlayerSpawnSystem::Update(double dt) m_EventBroker->Publish(e); Events::LockMouse lock; m_EventBroker->Publish(lock); - ++numSpawnedPlayers; + ++numHandledRequests; it = m_SpawnRequests.erase(it); break; } @@ -111,17 +114,18 @@ void PlayerSpawnSystem::Update(double dt) break; } } - if (numSpawnedPlayers != (int)m_SpawnRequests.size()) { - LOG_DEBUG("%i players were supposed to be spawned or set as spectator, but only %i was handled.", (int)m_SpawnRequests.size(), numSpawnedPlayers); + if (numHandledRequests != numRequestsToHandle - playersStillPickingClass) { + LOG_DEBUG("%i players were supposed to be spawned or set as spectator, but only %i was handled.", numRequestsToHandle, numHandledRequests); } else { - LOG_DEBUG("%i players were spawned or set as spectator.", numSpawnedPlayers); + std::string dbg = numHandledRequests != 0 ? std::to_string(numHandledRequests) + " players were spawned or set as spectator. " : ""; + dbg += playersStillPickingClass != 0 ? std::to_string(playersStillPickingClass) + " players are still picking class and will be spawned later." : ""; + LOG_DEBUG(dbg.c_str()); } } bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) { - bool removeRequest = e.Command == "SwapToClassPick" || e.Command == "SwapToTeamPick"; - if (e.Command != "PickTeam" && e.Command != "PickClass" && !removeRequest) { + if (e.Command != "PickTeam" && e.Command != "PickClass" && e.Command != "SwapToTeamPick" && e.Command != "SwapToClassPick") { return false; } @@ -139,28 +143,29 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) auto iter = m_SpawnRequests.begin(); for (; iter != m_SpawnRequests.end(); ++iter) { if (iter->PlayerID == e.PlayerID) { - // If player wants to switch class, remove their spawn request. - if (removeRequest) { + // If player wants to switch team, remove their spawn request. + if (e.Command == "SwapToTeamPick") { m_SpawnRequests.erase(iter); + } else if (e.Command == "SwapToClassPick") { + // If player wants to switch class, remove their selected class so they don't spawn. + iter->Class = -1; + } else { + break; } - break; + return true; } } - // Return if we were only supposed to remove a request, not add one. - if (removeRequest) { - return true; - } - //If we get here, add or alter a spawn request. + //If we get here we got a PickTeam or PickClass, so add or alter a spawn request. if (iter != m_SpawnRequests.end()) { // If player is in queue to spawn, then change their team affiliation or class in the request. if (e.Command == "PickTeam") { iter->Team = (ComponentInfo::EnumType)e.Value; - LOG_INFO("old request swap Team"); + LOG_DEBUG("old spawn request setting Team"); } else { iter->Class = (ComponentInfo::EnumType)e.Value; - LOG_INFO("old request swap Class"); + LOG_DEBUG("old spawn request setting Class"); } } else if (m_PlayerEntities.count(e.PlayerID) == 0 || !m_PlayerEntities[e.PlayerID].Valid()) { // If player is not in queue to spawn, then create a spawn request, @@ -170,11 +175,13 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) if (e.Command == "PickTeam") { req.Team = (ComponentInfo::EnumType)e.Value; req.Class = -1; // TODO: -1 Signifies no class picked, enum here later? - LOG_INFO("new request set Team"); + LOG_DEBUG("new spawn request setting Team"); } else { + // Should never get here, since you should have picked a team before you ever get a chance to pick class. + LOG_WARNING("Sequence error: Should not be able to pick class before team"); req.Team = 1; // TODO: 1 Signifies spectator, should probably have real enum here later. req.Class = (ComponentInfo::EnumType)e.Value; - LOG_INFO("new request set Class"); + LOG_DEBUG("new spawn request setting Class"); } m_SpawnRequests.push_back(req); } else { From f585f9ada962f7be7aec5adaca339417a9c0d4e2 Mon Sep 17 00:00:00 2001 From: stiffly Date: Mon, 7 Mar 2016 16:11:19 +0100 Subject: [PATCH 12/40] Created the NetworkComponent xml file --- resources/Schema/Components.xsd | 1 + resources/Schema/Components/NetworkComponent.xml | 3 +++ resources/Schema/Components/NetworkComponent.xsd | 10 ++++++++++ resources/Schema/Types/Entity.xsd | 1 + 4 files changed, 15 insertions(+) create mode 100644 resources/Schema/Components/NetworkComponent.xml create mode 100644 resources/Schema/Components/NetworkComponent.xsd diff --git a/resources/Schema/Components.xsd b/resources/Schema/Components.xsd index cf282eec..a5bedada 100644 --- a/resources/Schema/Components.xsd +++ b/resources/Schema/Components.xsd @@ -65,4 +65,5 @@ + \ No newline at end of file diff --git a/resources/Schema/Components/NetworkComponent.xml b/resources/Schema/Components/NetworkComponent.xml new file mode 100644 index 00000000..7d5dda6f --- /dev/null +++ b/resources/Schema/Components/NetworkComponent.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/Schema/Components/NetworkComponent.xsd b/resources/Schema/Components/NetworkComponent.xsd new file mode 100644 index 00000000..19cfeb92 --- /dev/null +++ b/resources/Schema/Components/NetworkComponent.xsd @@ -0,0 +1,10 @@ + + + + + + + If an entity has this component, it will be broadcasted to clients in a snapshot. + + + \ No newline at end of file diff --git a/resources/Schema/Types/Entity.xsd b/resources/Schema/Types/Entity.xsd index 4865b936..3d73f970 100644 --- a/resources/Schema/Types/Entity.xsd +++ b/resources/Schema/Types/Entity.xsd @@ -68,6 +68,7 @@ + From 7de95d4cb5ea4d5d92488151688b05295f5a455d Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 7 Mar 2016 16:34:56 +0100 Subject: [PATCH 13/40] Mainmenu entity --- resources/Schema/Entities/MainMenu.xml | 168 +++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 resources/Schema/Entities/MainMenu.xml diff --git a/resources/Schema/Entities/MainMenu.xml b/resources/Schema/Entities/MainMenu.xml new file mode 100644 index 00000000..a88c1407 --- /dev/null +++ b/resources/Schema/Entities/MainMenu.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + + + + + + + + + + + + Play + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + + + + + + + + + + + + Option + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + + + + + + + + + + + + Credits + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + + + + + + + + + + + + Quit + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + From 13c3bcb2908fc48b0a976dcbe3994bec0a4957b5 Mon Sep 17 00:00:00 2001 From: stiffly Date: Mon, 7 Mar 2016 16:52:51 +0100 Subject: [PATCH 14/40] Now only entities with NetworkComponent will be send in Snapshots. --- src/Engine/Network/Server.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Engine/Network/Server.cpp b/src/Engine/Network/Server.cpp index 5bfb4000..113db808 100644 --- a/src/Engine/Network/Server.cpp +++ b/src/Engine/Network/Server.cpp @@ -641,21 +641,7 @@ void Server::parsePlayerTransform(Packet& packet) bool Server::shouldSendToClient(EntityWrapper childEntity) { - auto children = m_World->GetDirectChildren(childEntity.ID); - for (auto it = children.first; it != children.second; it++) { - EntityWrapper child(m_World, it->second); - if (child.HasComponent("CapturePoint") || child.HasComponent("HealthPickup") - || child.HasComponent("AmmoPickup")) { - return true; - } - } - return childEntity.HasComponent("Player") - || childEntity.FirstParentWithComponent("Player").Valid() - || childEntity.HasComponent("CapturePoint") - || childEntity.HasComponent("HealthPickup") - || childEntity.HasComponent("AmmoPickup") - || childEntity.HasComponent("ScoreScreen") - || childEntity.FirstParentWithComponent("ScoreScreen").Valid(); + return childEntity.HasComponent("NetworkComponent") ||childEntity.FirstParentWithComponent("Player").Valid(); } PlayerID Server::getPlayerIDFromEndpoint() From f00fb836fba43d0386fcc6665bf29e9e4587647c Mon Sep 17 00:00:00 2001 From: stiffly Date: Mon, 7 Mar 2016 17:10:13 +0100 Subject: [PATCH 15/40] Oops. --- src/Engine/Network/Server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Engine/Network/Server.cpp b/src/Engine/Network/Server.cpp index 113db808..46dce167 100644 --- a/src/Engine/Network/Server.cpp +++ b/src/Engine/Network/Server.cpp @@ -641,7 +641,7 @@ void Server::parsePlayerTransform(Packet& packet) bool Server::shouldSendToClient(EntityWrapper childEntity) { - return childEntity.HasComponent("NetworkComponent") ||childEntity.FirstParentWithComponent("Player").Valid(); + return childEntity.HasComponent("NetworkComponent") || childEntity.FirstParentWithComponent("NetworkComponent").Valid(); } PlayerID Server::getPlayerIDFromEndpoint() From b629ed5e2badc8617ccdae6536c27827629dde65 Mon Sep 17 00:00:00 2001 From: stiffly Date: Mon, 7 Mar 2016 17:11:10 +0100 Subject: [PATCH 16/40] Updated some known xml entities that should be send in snapshots. --- resources/Schema/Entities/AmmoPickup.xml | 1 + resources/Schema/Entities/HealthPickup.xml | 1 + resources/Schema/Entities/Player.xml | 1 + resources/Schema/Entities/PlayerAssaultBlue.xml | 1 + resources/Schema/Entities/PlayerAssaultFallbackBlue.xml | 1 + resources/Schema/Entities/PlayerAssaultFallbackRed.xml | 1 + resources/Schema/Entities/PlayerAssaultRed.xml | 1 + resources/Schema/Entities/PlayerDefenderBlue.xml | 1 + resources/Schema/Entities/PlayerRed.xml | 1 + resources/Schema/Entities/ScoreBoard.xml | 1 + 10 files changed, 10 insertions(+) diff --git a/resources/Schema/Entities/AmmoPickup.xml b/resources/Schema/Entities/AmmoPickup.xml index bebde467..ee3704f1 100644 --- a/resources/Schema/Entities/AmmoPickup.xml +++ b/resources/Schema/Entities/AmmoPickup.xml @@ -2,6 +2,7 @@ + Models/Props/PickUps/AmmoPickUp.mesh diff --git a/resources/Schema/Entities/HealthPickup.xml b/resources/Schema/Entities/HealthPickup.xml index b4b83392..6474426f 100644 --- a/resources/Schema/Entities/HealthPickup.xml +++ b/resources/Schema/Entities/HealthPickup.xml @@ -2,6 +2,7 @@ + Models/Props/PickUps/HealthPickUp.mesh diff --git a/resources/Schema/Entities/Player.xml b/resources/Schema/Entities/Player.xml index 475acf78..474d9dbc 100644 --- a/resources/Schema/Entities/Player.xml +++ b/resources/Schema/Entities/Player.xml @@ -2,6 +2,7 @@ + diff --git a/resources/Schema/Entities/PlayerAssaultBlue.xml b/resources/Schema/Entities/PlayerAssaultBlue.xml index 7773235b..8b5b3d11 100644 --- a/resources/Schema/Entities/PlayerAssaultBlue.xml +++ b/resources/Schema/Entities/PlayerAssaultBlue.xml @@ -2,6 +2,7 @@ + diff --git a/resources/Schema/Entities/PlayerAssaultFallbackBlue.xml b/resources/Schema/Entities/PlayerAssaultFallbackBlue.xml index 9650cfe8..c5360b10 100644 --- a/resources/Schema/Entities/PlayerAssaultFallbackBlue.xml +++ b/resources/Schema/Entities/PlayerAssaultFallbackBlue.xml @@ -2,6 +2,7 @@ + diff --git a/resources/Schema/Entities/PlayerAssaultFallbackRed.xml b/resources/Schema/Entities/PlayerAssaultFallbackRed.xml index a32988c7..a7bcdef4 100644 --- a/resources/Schema/Entities/PlayerAssaultFallbackRed.xml +++ b/resources/Schema/Entities/PlayerAssaultFallbackRed.xml @@ -2,6 +2,7 @@ + diff --git a/resources/Schema/Entities/PlayerAssaultRed.xml b/resources/Schema/Entities/PlayerAssaultRed.xml index a198196e..db6e1cad 100644 --- a/resources/Schema/Entities/PlayerAssaultRed.xml +++ b/resources/Schema/Entities/PlayerAssaultRed.xml @@ -2,6 +2,7 @@ + diff --git a/resources/Schema/Entities/PlayerDefenderBlue.xml b/resources/Schema/Entities/PlayerDefenderBlue.xml index c3bfc074..24bfee2b 100644 --- a/resources/Schema/Entities/PlayerDefenderBlue.xml +++ b/resources/Schema/Entities/PlayerDefenderBlue.xml @@ -2,6 +2,7 @@ + diff --git a/resources/Schema/Entities/PlayerRed.xml b/resources/Schema/Entities/PlayerRed.xml index c46b9d79..9fa7be05 100644 --- a/resources/Schema/Entities/PlayerRed.xml +++ b/resources/Schema/Entities/PlayerRed.xml @@ -2,6 +2,7 @@ + diff --git a/resources/Schema/Entities/ScoreBoard.xml b/resources/Schema/Entities/ScoreBoard.xml index ce612800..b3798e72 100644 --- a/resources/Schema/Entities/ScoreBoard.xml +++ b/resources/Schema/Entities/ScoreBoard.xml @@ -2,6 +2,7 @@ + From fc3a3a8f2e53e17511d3273997795339fa77348d Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Mon, 7 Mar 2016 17:16:18 +0100 Subject: [PATCH 17/40] Fixed a crashbug in Ammo/HealthPickup which was actually caused by systems being added twice in Game.cpp. This is also a possible fix for DamageIndicator,Capturepoint,TextField,KillFeed --- src/Game/Game.cpp | 7 ------- src/Game/Systems/AmmoPickupSystem.cpp | 9 +++++---- src/Game/Systems/PickupSpawnSystem.cpp | 4 ++++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Game/Game.cpp b/src/Game/Game.cpp index 8f589e34..69a9ad57 100644 --- a/src/Game/Game.cpp +++ b/src/Game/Game.cpp @@ -137,20 +137,13 @@ Game::Game(int argc, char* argv[]) m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); - m_SystemPipeline->AddSystem(updateOrderLevel); - m_SystemPipeline->AddSystem(updateOrderLevel); - m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); - m_SystemPipeline->AddSystem(updateOrderLevel); - m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); - m_SystemPipeline->AddSystem(updateOrderLevel); - m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); diff --git a/src/Game/Systems/AmmoPickupSystem.cpp b/src/Game/Systems/AmmoPickupSystem.cpp index 062efe94..e28c38ff 100644 --- a/src/Game/Systems/AmmoPickupSystem.cpp +++ b/src/Game/Systems/AmmoPickupSystem.cpp @@ -96,6 +96,7 @@ bool AmmoPickupSystem::OnAmmoPickup(Events::AmmoPickup & e) } currentAmmo = std::min(currentAmmo + e.AmmoGain, maxWeaponAmmo); + return false; } @@ -114,8 +115,11 @@ bool AmmoPickupSystem::OnTriggerLeave(Events::TriggerLeave& e) { } void AmmoPickupSystem::DoPickup(EntityWrapper &player, EntityWrapper &trigger) { + //trigger should be valid but if it isnt we just return (to avoid crash) + if (!trigger.Valid()) { + return; + } int maxWeaponAmmo = (int)player["AssaultWeapon"]["MaxAmmo"]; - int& currentAmmo = (int)player["AssaultWeapon"]["Ammo"]; int ammoGiven = 0.01*(double)trigger["AmmoPickup"]["AmmoGain"] * maxWeaponAmmo; Events::AmmoPickup ePlayerAmmoPickup; @@ -123,9 +127,6 @@ void AmmoPickupSystem::DoPickup(EntityWrapper &player, EntityWrapper &trigger) { ePlayerAmmoPickup.Player = player; m_EventBroker->Publish(ePlayerAmmoPickup); - //immediately give the player the ammo (on server) - currentAmmo = std::min(currentAmmo + ammoGiven, maxWeaponAmmo); - //copy position, ammogain, respawntimer (twice since one of the values will be counted down to 0, the other will be set in the new object) //we need to copy all values since each value can be different for each ammoPickup m_ETriggerTouchVector.push_back({ (glm::vec3)trigger["Transform"]["Position"], trigger["AmmoPickup"]["AmmoGain"], diff --git a/src/Game/Systems/PickupSpawnSystem.cpp b/src/Game/Systems/PickupSpawnSystem.cpp index 99da931f..b0efd696 100644 --- a/src/Game/Systems/PickupSpawnSystem.cpp +++ b/src/Game/Systems/PickupSpawnSystem.cpp @@ -83,6 +83,10 @@ bool PickupSpawnSystem::OnTriggerLeave(Events::TriggerLeave& e) } void PickupSpawnSystem::DoPickup(EntityWrapper &player, EntityWrapper &trigger) { + //trigger should be valid but if it isnt we just return (to avoid crash) + if (!trigger.Valid()) { + return; + } double healthGiven = 0.01*(double)trigger["HealthPickup"]["HealthGain"] * (double)player["Health"]["MaxHealth"]; //only the server will increase the players hp and set it in the next delta From 1516ed8e2df963a335bbb18a008c1e884a2e045a Mon Sep 17 00:00:00 2001 From: William Moberg Date: Mon, 7 Mar 2016 17:35:01 +0100 Subject: [PATCH 18/40] Removed debug logging. PlayerID in InputCommands from buttons is corrected. --- src/Engine/GUI/ButtonSystem.cpp | 4 +-- src/Game/Systems/PlayerDeathSystem.cpp | 7 ------ src/Game/Systems/PlayerSpawnSystem.cpp | 35 +++++++++----------------- 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/src/Engine/GUI/ButtonSystem.cpp b/src/Engine/GUI/ButtonSystem.cpp index b28c0119..44c8a13c 100644 --- a/src/Engine/GUI/ButtonSystem.cpp +++ b/src/Engine/GUI/ButtonSystem.cpp @@ -40,7 +40,7 @@ bool ButtonSystem::OnMousePress(const Events::MousePress& e) //You have clicked on a button entity, send pressed event. if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) { Events::InputCommand eInputCmd; - eInputCmd.PlayerID = LocalPlayer.ID; + eInputCmd.PlayerID = -1; eInputCmd.Player = LocalPlayer; EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity); eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"]; @@ -68,7 +68,7 @@ bool ButtonSystem::OnMouseRelease(const Events::MouseRelease& e) if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) { Events::InputCommand eInputCmd; - eInputCmd.PlayerID = LocalPlayer.ID; + eInputCmd.PlayerID = -1; eInputCmd.Player = LocalPlayer; EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity); eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"]; diff --git a/src/Game/Systems/PlayerDeathSystem.cpp b/src/Game/Systems/PlayerDeathSystem.cpp index 85daec9b..c562e530 100644 --- a/src/Game/Systems/PlayerDeathSystem.cpp +++ b/src/Game/Systems/PlayerDeathSystem.cpp @@ -18,8 +18,6 @@ bool PlayerDeathSystem::OnPlayerDeath(Events::PlayerDeath& e) return false; } - LOG_DEBUG("------ Player #%i died.", e.Player.ID); - createDeathEffect(e.Player); // Delete player @@ -38,7 +36,6 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) auto playerModel = player.FirstChildByName("PlayerModel"); if (!playerModel.Valid() || !playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { if (player == LocalPlayer) { - LOG_DEBUG("------ LocalPlayer's death effect could not be spawned, setting to spectator instead of death cam."); setSpectatorCamera(); } return; @@ -58,7 +55,6 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) //camera (with lifetime) behind the player if (player == LocalPlayer) { - LOG_DEBUG("------ LocalPlayer's death effect spawning, setting to death camera."); m_LocalPlayerDeathEffect = deathEffectEW; auto cam = deathEffectEW.FirstChildByName("Camera"); Events::SetCamera eSetCamera; @@ -76,10 +72,7 @@ bool PlayerDeathSystem::OnEntityDeleted(Events::EntityDeleted& e) // If the player hasn't spawned already, activate the spectator camera. if (!LocalPlayer.Valid()) { - LOG_DEBUG("------ LocalPlayer's death effect removed, setting to spectator."); setSpectatorCamera(); - } else { - LOG_DEBUG("------ LocalPlayer's death effect removed, player is already spawned, not setting spectator."); } return true; } diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 2e55965e..e13f1bdc 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -59,16 +59,16 @@ void PlayerSpawnSystem::Update(double dt) return; } - int numHandledRequests = 0; - int playersStillPickingClass = 0; + int numSpawnedPlayers = 0; + int playersSpectating = 0; const int numRequestsToHandle = (int)m_SpawnRequests.size(); for (auto it = m_SpawnRequests.begin(); it != m_SpawnRequests.end(); ++it) { - // TODO: -1 Signifies no class picked, enum here later? + // TODO: -1 Signifies no class picked, or they are a spectator, enum here later? // It is valid if they didn't pick class yet // but don't spawn anything, goto next spawnrequest. if (it->Class == -1) { - ++playersStillPickingClass; - break; + ++playersSpectating; + continue; } for (auto& cPlayerSpawn : *playerSpawns) { EntityWrapper spawner(m_World, cPlayerSpawn.EntityID); @@ -80,13 +80,6 @@ void PlayerSpawnSystem::Update(double dt) if (spawner.HasComponent("Team")) { auto cSpawnerTeam = spawner["Team"]; if ((int)cSpawnerTeam["Team"] != it->Team) { - // It is valid if someone picks spectator - // but don't spawn anything, goto next spawnrequest. - if (it->Team == (int)cSpawnerTeam["Team"].Enum("Spectator")) { - ++numHandledRequests; - it = m_SpawnRequests.erase(it); - break; - } continue; } } @@ -104,9 +97,7 @@ void PlayerSpawnSystem::Update(double dt) e.Player = player; e.Spawner = spawner; m_EventBroker->Publish(e); - Events::LockMouse lock; - m_EventBroker->Publish(lock); - ++numHandledRequests; + ++numSpawnedPlayers; it = m_SpawnRequests.erase(it); break; } @@ -114,11 +105,11 @@ void PlayerSpawnSystem::Update(double dt) break; } } - if (numHandledRequests != numRequestsToHandle - playersStillPickingClass) { - LOG_DEBUG("%i players were supposed to be spawned or set as spectator, but only %i was handled.", numRequestsToHandle, numHandledRequests); + if (numSpawnedPlayers != numRequestsToHandle - playersSpectating) { + LOG_DEBUG("%i players were supposed to be spawned, but only %i was successfully.", numRequestsToHandle - playersSpectating, numSpawnedPlayers); } else { - std::string dbg = numHandledRequests != 0 ? std::to_string(numHandledRequests) + " players were spawned or set as spectator. " : ""; - dbg += playersStillPickingClass != 0 ? std::to_string(playersStillPickingClass) + " players are still picking class and will be spawned later." : ""; + std::string dbg = numSpawnedPlayers != 0 ? std::to_string(numSpawnedPlayers) + " players were spawned. " : ""; + dbg += playersSpectating != 0 ? std::to_string(playersSpectating) + " players are spectating/picking class. " : ""; LOG_DEBUG(dbg.c_str()); } } @@ -162,10 +153,8 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) // If player is in queue to spawn, then change their team affiliation or class in the request. if (e.Command == "PickTeam") { iter->Team = (ComponentInfo::EnumType)e.Value; - LOG_DEBUG("old spawn request setting Team"); } else { iter->Class = (ComponentInfo::EnumType)e.Value; - LOG_DEBUG("old spawn request setting Class"); } } else if (m_PlayerEntities.count(e.PlayerID) == 0 || !m_PlayerEntities[e.PlayerID].Valid()) { // If player is not in queue to spawn, then create a spawn request, @@ -175,13 +164,11 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) if (e.Command == "PickTeam") { req.Team = (ComponentInfo::EnumType)e.Value; req.Class = -1; // TODO: -1 Signifies no class picked, enum here later? - LOG_DEBUG("new spawn request setting Team"); } else { // Should never get here, since you should have picked a team before you ever get a chance to pick class. LOG_WARNING("Sequence error: Should not be able to pick class before team"); req.Team = 1; // TODO: 1 Signifies spectator, should probably have real enum here later. req.Class = (ComponentInfo::EnumType)e.Value; - LOG_DEBUG("new spawn request setting Class"); } m_SpawnRequests.push_back(req); } else { @@ -217,6 +204,8 @@ bool PlayerSpawnSystem::OnPlayerSpawned(Events::PlayerSpawned& e) Events::SetCamera e; e.CameraEntity = cameraEntity; m_EventBroker->Publish(e); + Events::LockMouse lock; + m_EventBroker->Publish(lock); } // HACK: Set the player model color to team color From fcf87104c35244a85d0dcdbbf0c6a229edb25b13 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Mon, 7 Mar 2016 17:50:03 +0100 Subject: [PATCH 19/40] Replaced test textures for class picking with more proper icons. --- .../Schema/Entities/NewMapWSpectatorCam.xml | 3330 ++++++++--------- resources/Schema/Entities/OverwatchCamera.xml | 260 +- 2 files changed, 1795 insertions(+), 1795 deletions(-) diff --git a/resources/Schema/Entities/NewMapWSpectatorCam.xml b/resources/Schema/Entities/NewMapWSpectatorCam.xml index fc4dd9a1..456bee0e 100644 --- a/resources/Schema/Entities/NewMapWSpectatorCam.xml +++ b/resources/Schema/Entities/NewMapWSpectatorCam.xml @@ -23,6 +23,16 @@ + + + + + Models/Props/Highground2.mesh + + + + + @@ -77,16 +87,6 @@ - - - - - Models/Props/Highground2.mesh - - - - - @@ -2843,6 +2843,439 @@ + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + @@ -3015,11 +3448,618 @@ + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/TreeLog.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + @@ -3314,19 +4354,6 @@ - - - - - Models/Props/Bridges/SciFiBridge1Blue.mesh - - - - - - - - @@ -3340,20 +4367,6 @@ - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - @@ -3367,19 +4380,6 @@ - - - - - Models/Props/Bridges/SciFiBridge1Red.mesh - - - - - - - - @@ -3396,1011 +4396,24 @@ - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - Models/Core/UnitPlane.mesh - - true - - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - - Models/Props/Walls/MediumWall2.mesh - - - - - - - - - - - Models/Props/Walls/MediumWall2.mesh - - - - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - Models/Core/UnitPlane.mesh - - true - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/TreeLog.mesh - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + @@ -4479,19 +4492,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -4519,8 +4519,49 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + @@ -4546,9 +4587,9 @@ Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - + + + @@ -4560,8 +4601,50 @@ Models/Props/Stones/ShinyStoneCrystalRed.mesh - - + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + @@ -4580,20 +4663,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4608,20 +4677,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4636,20 +4691,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4663,20 +4704,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -4691,20 +4718,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4719,19 +4732,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - @@ -4750,388 +4750,6 @@ - - - - - - - - - - Schema/Entities/PlayerRed.xml - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - - - - - - - 10 - - - - - - - - - - - 1 - - - - - - - - - 1 - - - - - - - - - - - 10 - - - - - - - - - - 10 - - - - - - - - - - - - - 10 - - - - - - - - - - - 10 - - - - - - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - - - - - Schema/Entities/Player.xml - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - @@ -5313,6 +4931,388 @@ + + + + + + + + + + Schema/Entities/PlayerRed.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 1 + + + + + + + + + 10 + + + + + + + + + + 10 + + + + + + + + + + + + + 10 + + + + + + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + @@ -5332,6 +5332,136 @@ + + + + + + + + + + + + + + + + + Pick Class + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Textures/Icons/Classes/Assault-01.png + + + + PickClass + 1 + + + + + + + + + + + Assault + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Icons/Classes/Sniper-01.png + + + + PickClass + 3 + + + + + + + + + + + Sniper + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Icons/Classes/Defender-01.png + + + + PickClass + 2 + + + + + + + + + + + Defender + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + @@ -5672,136 +5802,6 @@ - - - - - - - - - - - - - - - - - - Textures/Core/UnitRaptor.png - - - - PickClass - 1 - - - - - - - - - - - Assault - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon.png - - - - PickClass - 2 - - - - - - - - - - - Defender - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - Textures/Test/aM4ME4GR.png - - - - PickClass - 3 - - - - - - - - - - - Sniper - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Pick Class - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - diff --git a/resources/Schema/Entities/OverwatchCamera.xml b/resources/Schema/Entities/OverwatchCamera.xml index ee3c1cb1..55e9099c 100644 --- a/resources/Schema/Entities/OverwatchCamera.xml +++ b/resources/Schema/Entities/OverwatchCamera.xml @@ -20,6 +20,136 @@ + + + + + + + + + + + + + + + + + Pick Class + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Textures/Icons/Classes/Assault-01.png + + + + PickClass + 1 + + + + + + + + + + + Assault + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Icons/Classes/Sniper-01.png + + + + PickClass + 3 + + + + + + + + + + + Sniper + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Icons/Classes/Defender-01.png + + + + PickClass + 2 + + + + + + + + + + + Defender + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + @@ -360,136 +490,6 @@ - - - - - - - - - - - - - - - - - - Textures/Core/UnitRaptor.png - - - - PickClass - 1 - - - - - - - - - - - Assault - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon.png - - - - PickClass - 2 - - - - - - - - - - - Defender - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - Textures/Test/aM4ME4GR.png - - - - PickClass - 3 - - - - - - - - - - - Sniper - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Pick Class - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - From 5c0d9070c7b1b9743610d5640d82e38d2f9c34d0 Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 7 Mar 2016 23:25:06 +0100 Subject: [PATCH 20/40] WIP --- include/Engine/Rendering/BlurHUD.h | 69 +++++ include/Engine/Rendering/DrawFinalPass.h | 9 +- include/Engine/Rendering/Renderer.h | 2 + include/Engine/Rendering/SpriteJob.h | 3 + resources/Schema/Components/Sprite.xml | 1 + resources/Schema/Components/Sprite.xsd | 3 + resources/Shaders/CombineTexture.frag.glsl | 25 ++ resources/Shaders/CombineTexture.vert.glsl | 13 + src/Engine/Rendering/BlurHUD.cpp | 280 +++++++++++++++++++++ src/Engine/Rendering/DrawFinalPass.cpp | 7 +- src/Engine/Rendering/Renderer.cpp | 14 +- 11 files changed, 421 insertions(+), 5 deletions(-) create mode 100644 include/Engine/Rendering/BlurHUD.h create mode 100644 resources/Shaders/CombineTexture.frag.glsl create mode 100644 resources/Shaders/CombineTexture.vert.glsl create mode 100644 src/Engine/Rendering/BlurHUD.cpp diff --git a/include/Engine/Rendering/BlurHUD.h b/include/Engine/Rendering/BlurHUD.h new file mode 100644 index 00000000..2d01673e --- /dev/null +++ b/include/Engine/Rendering/BlurHUD.h @@ -0,0 +1,69 @@ +#ifndef BlurHUD_h__ +#define BlurHUD_h__ + +#include "IRenderer.h" +#include "DrawBloomPassState.h" +//#include "LightCullingPass.h" Finalpass om den skall skickas in +#include "FrameBuffer.h" +#include "ShaderProgram.h" +//#include "Util/UnorderedMapVec2.h" +#include "Texture.h" + +class BlurHUD +{ +public: + BlurHUD(IRenderer* renderer); + ~BlurHUD() { } + void InitializeTextures(); + void InitializeFrameBuffers(); + void InitializeShaderPrograms(); + void InitializeBuffers(); + void ClearBuffer(); + + void FillGaussianBuffer(FrameBuffer* fb); + + GLuint Draw(GLuint texture, RenderScene& scene); + + void OnWindowResize(); + void FillStencil(RenderScene& scene); + GLuint CombineTextures(GLuint texture1, GLuint texture2); + + //Getters + //Return the blurred result of the texture that was sent into draw + GLuint GaussianTexture() const { + if (m_Quality == 0) { + return m_BlackTexture->m_Texture; + } else { + return m_GaussianTexture_vert; + } + } + + +private: + Texture* m_BlackTexture; + Model* m_ScreenQuad; + + const IRenderer* m_Renderer; + ConfigFile* m_Config; + //const LightCullingPass* m_LightCullingPass + int m_Iterations = 3; + int m_Quality = 0; + + GLuint m_GaussianTexture_horiz = 0; + GLuint m_GaussianTexture_vert = 0; + GLuint m_DepthStencil_horiz = 0; + GLuint m_DepthStencil_vert = 0; + GLuint m_CombinedTexture = 0; + + FrameBuffer m_GaussianFrameBuffer_horiz; + FrameBuffer m_GaussianFrameBuffer_vert; + FrameBuffer m_CombinedTextureBuffer; + + ShaderProgram* m_GaussianProgram_horiz; + ShaderProgram* m_GaussianProgram_vert; + ShaderProgram* m_FillDepthStencilProgram; + ShaderProgram* m_CombineTexturesProgram; + +}; + +#endif \ No newline at end of file diff --git a/include/Engine/Rendering/DrawFinalPass.h b/include/Engine/Rendering/DrawFinalPass.h index cfddd5c6..5d741256 100644 --- a/include/Engine/Rendering/DrawFinalPass.h +++ b/include/Engine/Rendering/DrawFinalPass.h @@ -11,6 +11,7 @@ #include "Util/UnorderedMapVec2.h" #include "Util/CommonFunctions.h" #include "Texture.h" +#include "BlurHUD.h" class DrawFinalPass { @@ -20,7 +21,7 @@ public: void InitializeTextures(); void InitializeFrameBuffers(); void InitializeShaderPrograms(); - void Draw(RenderScene& scene); + void Draw(RenderScene& scene, BlurHUD* blurHUDPass); void ClearBuffer(); void OnWindowResize(); @@ -28,6 +29,10 @@ public: GLuint BloomTexture() const { return m_BloomTexture; } //Return the texture with diffuse and lighting of the scene. GLuint SceneTexture() const { return m_SceneTexture; } + //Return the SceneTexture with the blurred HUD bits. + GLuint CombinedSceneTexture() const { return m_CombinedTexture; } + //Return the blurred scene texture. + GLuint FullBlurredTexture() const { return m_FullBlurredTexture; } //Return the framebuffer used in the scene rendering stage. FrameBuffer* FinalPassFrameBuffer() { return &m_FinalPassFrameBuffer; } @@ -57,6 +62,8 @@ private: GLuint m_DepthBuffer; GLuint m_ShieldBuffer; GLuint m_CubeMapTexture; + GLuint m_FullBlurredTexture; + GLuint m_CombinedTexture; //This can be removed for less memory usage, just set m_sceneTexture to the return from m_BlurHUDPass.CombineTextures //maqke this component based i guess? GLuint m_ShieldPixelRate = 16; diff --git a/include/Engine/Rendering/Renderer.h b/include/Engine/Rendering/Renderer.h index a64a4aa3..9983bae9 100644 --- a/include/Engine/Rendering/Renderer.h +++ b/include/Engine/Rendering/Renderer.h @@ -18,6 +18,7 @@ #include "DrawColorCorrectionPass.h" #include "SSAOPass.h" #include "CubeMapPass.h" +#include "BlurHUD.h" #include "../Core/EventBroker.h" #include "ImGuiRenderPass.h" #include "Camera.h" @@ -75,6 +76,7 @@ private: DrawColorCorrectionPass* m_DrawColorCorrectionPass; SSAOPass* m_SSAOPass; CubeMapPass* m_CubeMapPass; + BlurHUD* m_BlurHUDPass; //----------------------Functions----------------------// void InitializeWindow(); diff --git a/include/Engine/Rendering/SpriteJob.h b/include/Engine/Rendering/SpriteJob.h index 25c2d5cb..2533d4d4 100644 --- a/include/Engine/Rendering/SpriteJob.h +++ b/include/Engine/Rendering/SpriteJob.h @@ -32,6 +32,8 @@ struct SpriteJob : RenderJob EndIndex = matProp.material->EndIndex; Matrix = matrix; Color = cSprite["Color"]; + BlurBackground = (bool)cSprite["BlurBackground"]; + Entity = cSprite.EntityID; Position = Transform::AbsolutePosition(world, cSprite.EntityID); Depth = 0; @@ -65,6 +67,7 @@ struct SpriteJob : RenderJob bool Pickable; bool IsIndicator = false; + bool BlurBackground = false; glm::vec4 FillColor = glm::vec4(0); float FillPercentage = 0.0; diff --git a/resources/Schema/Components/Sprite.xml b/resources/Schema/Components/Sprite.xml index ce4a6e1b..e577ac96 100644 --- a/resources/Schema/Components/Sprite.xml +++ b/resources/Schema/Components/Sprite.xml @@ -5,4 +5,5 @@ true true + false diff --git a/resources/Schema/Components/Sprite.xsd b/resources/Schema/Components/Sprite.xsd index 3c3d124a..e26d71c9 100644 --- a/resources/Schema/Components/Sprite.xsd +++ b/resources/Schema/Components/Sprite.xsd @@ -24,6 +24,9 @@ Whether the sprite should be sorted with depth or not. Only use false for textures that are on HUD + + Wether the background should be blurred begind this sprite. + diff --git a/resources/Shaders/CombineTexture.frag.glsl b/resources/Shaders/CombineTexture.frag.glsl new file mode 100644 index 00000000..9d6a71c2 --- /dev/null +++ b/resources/Shaders/CombineTexture.frag.glsl @@ -0,0 +1,25 @@ +#version 430 + +uniform sampler2D Texture0; +uniform sampler2D Texture1; + + +in VertexData{ + vec2 TextureCoordinate; +}Input; + +out vec4 fragmentColor; + +void main() +{ + vec4 texel0 = texture(Texture0, Input.TextureCoordinate); + vec4 texel1 = texture(Texture1, Input.TextureCoordinate); + float texel1_total = (texel1.r + texel1.g + texel1.b) * texel1.a; + texel1_total = ceil(clamp(texel1_total, 0, 1)); + + vec4 final = texel0 * texel1_total + texel1 * (1 - texel1_total); + //vec4 final = vec4(texel1_total, texel1_total, texel1_total, 1.0); + fragmentColor = final; +} + + diff --git a/resources/Shaders/CombineTexture.vert.glsl b/resources/Shaders/CombineTexture.vert.glsl new file mode 100644 index 00000000..346bc141 --- /dev/null +++ b/resources/Shaders/CombineTexture.vert.glsl @@ -0,0 +1,13 @@ +#version 430 + +layout (location = 0) in vec3 Position; + +out VertexData{ + vec2 TextureCoordinate; +}Output; + +void main() +{ + gl_Position = vec4(Position, 1.0); + Output.TextureCoordinate = (vec2(Position) + 1) / 2; +} \ No newline at end of file diff --git a/src/Engine/Rendering/BlurHUD.cpp b/src/Engine/Rendering/BlurHUD.cpp new file mode 100644 index 00000000..bd9ef901 --- /dev/null +++ b/src/Engine/Rendering/BlurHUD.cpp @@ -0,0 +1,280 @@ +#include "Rendering/BlurHUD.h" + +BlurHUD::BlurHUD(IRenderer* renderer) + : m_Renderer(renderer) +{ + InitializeShaderPrograms(); + InitializeBuffers(); + InitializeTextures(); +} + +void BlurHUD::InitializeTextures() +{ + m_BlackTexture = CommonFunctions::LoadTexture("Textures/Core/Black.png", false); + m_ScreenQuad = ResourceManager::Load("Models/Core/ScreenQuad.mesh"); +} + +void BlurHUD::InitializeShaderPrograms() +{ + m_GaussianProgram_horiz = ResourceManager::Load("##GaussianProgramHoriz"); + if (m_GaussianProgram_horiz->GetHandle() == 0) { + m_GaussianProgram_horiz->AddShader(std::shared_ptr(new VertexShader("Shaders/Gaussian_horiz.vert.glsl"))); + m_GaussianProgram_horiz->AddShader(std::shared_ptr(new FragmentShader("Shaders/Gaussian_horiz.frag.glsl"))); + m_GaussianProgram_horiz->Compile(); + m_GaussianProgram_horiz->BindFragDataLocation(0, "fragmentColor"); + m_GaussianProgram_horiz->Link(); + } + + m_GaussianProgram_vert = ResourceManager::Load("##GaussianProgramVert"); + if (m_GaussianProgram_vert->GetHandle() == 0) { + m_GaussianProgram_vert->AddShader(std::shared_ptr(new VertexShader("Shaders/Gaussian_vert.vert.glsl"))); + m_GaussianProgram_vert->AddShader(std::shared_ptr(new FragmentShader("Shaders/Gaussian_vert.frag.glsl"))); + m_GaussianProgram_vert->Compile(); + m_GaussianProgram_vert->BindFragDataLocation(0, "fragmentColor"); + m_GaussianProgram_vert->Link(); + } + m_FillDepthStencilProgram = ResourceManager::Load("#FillDepthStencilProgram"); + if (m_FillDepthStencilProgram->GetHandle() == 0) { + m_FillDepthStencilProgram->AddShader(std::shared_ptr(new VertexShader("Shaders/FillDepthBuffer.vert.glsl"))); + m_FillDepthStencilProgram->Compile(); + m_FillDepthStencilProgram->Link(); + } + m_CombineTexturesProgram = ResourceManager::Load("#CombineTexturesProgram"); + if (m_CombineTexturesProgram->GetHandle() == 0) { + m_CombineTexturesProgram->AddShader(std::shared_ptr(new VertexShader("Shaders/CombineTexture.vert.glsl"))); + m_CombineTexturesProgram->AddShader(std::shared_ptr(new FragmentShader("Shaders/CombineTexture.frag.glsl"))); + m_CombineTexturesProgram->Compile(); + m_CombineTexturesProgram->BindFragDataLocation(0, "fragmentColor"); + m_CombineTexturesProgram->Link(); + } + GLERROR("Creating DepthFill program"); +} + +void BlurHUD::InitializeBuffers() +{ + glm::vec2 res = glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + + CommonFunctions::GenerateTexture(&m_DepthStencil_horiz, GL_CLAMP_TO_BORDER, GL_NEAREST, + res, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); + CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_LINEAR, + res, GL_RGB16F, GL_RGB, GL_FLOAT); + + if (m_GaussianFrameBuffer_horiz.GetHandle() == 0) { + m_GaussianFrameBuffer_horiz.AddResource(std::shared_ptr(new Texture2D(&m_DepthStencil_horiz, GL_DEPTH_STENCIL_ATTACHMENT))); + m_GaussianFrameBuffer_horiz.AddResource(std::shared_ptr(new Texture2D(&m_GaussianTexture_horiz, GL_COLOR_ATTACHMENT0))); + } + m_GaussianFrameBuffer_horiz.Generate(); + + CommonFunctions::GenerateTexture(&m_DepthStencil_vert, GL_CLAMP_TO_BORDER, GL_NEAREST, + res, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); + CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_LINEAR, + res, GL_RGB16F, GL_RGB, GL_FLOAT); + + if (m_GaussianFrameBuffer_vert.GetHandle() == 0) { + m_GaussianFrameBuffer_vert.AddResource(std::shared_ptr(new Texture2D(&m_DepthStencil_vert, GL_DEPTH_STENCIL_ATTACHMENT))); + m_GaussianFrameBuffer_vert.AddResource(std::shared_ptr(new Texture2D(&m_GaussianTexture_vert, GL_COLOR_ATTACHMENT0))); + } + m_GaussianFrameBuffer_vert.Generate(); + + CommonFunctions::GenerateTexture(&m_CombinedTexture, GL_CLAMP_TO_BORDER, GL_NEAREST, + res, GL_RGB16F, GL_RGB, GL_FLOAT); + + if (m_CombinedTextureBuffer.GetHandle() == 0) { + m_CombinedTextureBuffer.AddResource(std::shared_ptr(new Texture2D(&m_CombinedTexture, GL_COLOR_ATTACHMENT0))); + } + m_CombinedTextureBuffer.Generate(); +} + + +void BlurHUD::ClearBuffer() +{ + GLERROR("PRE"); + m_GaussianFrameBuffer_horiz.Bind(); + glClearColor(0.f, 0.f, 0.f, 0.f); + glClearStencil(0x00); + glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + m_GaussianFrameBuffer_horiz.Unbind(); + m_GaussianFrameBuffer_vert.Bind(); + glClearColor(0.f, 0.f, 0.f, 0.f); + glClearStencil(0x00); + glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + m_GaussianFrameBuffer_vert.Unbind(); + + m_CombinedTextureBuffer.Bind(); + glClearColor(0.f, 0.f, 0.f, 0.f); + glClear(GL_COLOR_BUFFER_BIT); + m_CombinedTextureBuffer.Unbind(); + GLERROR("END"); +} + +//Returns the finished blurred texture +GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) +{ + GLERROR("DrawBloomPass::Draw: Pre"); + + FillStencil(scene); + + DrawBloomPassState state; + + GLuint shaderHandle_horiz = m_GaussianProgram_horiz->GetHandle(); + GLuint shaderHandle_vert = m_GaussianProgram_vert->GetHandle(); + + + + //Horizontal pass, first use the given texture then save it to the horizontal framebuffer. + m_GaussianFrameBuffer_horiz.Bind(); + state.Enable(GL_STENCIL_TEST); + state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + state.StencilFunc(GL_EQUAL, 1, 0xFF); + state.StencilMask(0x00); + state.DepthMask(GL_FALSE); + m_GaussianProgram_horiz->Bind(); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, texture); + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + //Iterate some times to make it more gaussian. + for (int i = 1; i < m_Iterations; i++) { + //Vertical pass + m_GaussianFrameBuffer_vert.Bind(); + state.Enable(GL_STENCIL_TEST); + state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + state.StencilFunc(GL_EQUAL, 1, 0xFF); + state.StencilMask(0x00); + state.DepthMask(GL_FALSE); + m_GaussianProgram_vert->Bind(); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, m_GaussianTexture_horiz); + + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + //horizontal pass + m_GaussianFrameBuffer_vert.Unbind(); + + m_GaussianFrameBuffer_horiz.Bind(); + state.Enable(GL_STENCIL_TEST); + state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + state.StencilFunc(GL_EQUAL, 1, 0xFF); + state.StencilMask(0x00); + state.DepthMask(GL_FALSE); + m_GaussianProgram_horiz->Bind(); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, m_GaussianTexture_vert); + + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + m_GaussianFrameBuffer_horiz.Unbind(); + } + + //final vertical gaussian after the iterations are done + + m_GaussianFrameBuffer_vert.Bind(); + state.Enable(GL_STENCIL_TEST); + state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + state.StencilFunc(GL_EQUAL, 1, 0xFF); + state.StencilMask(0x00); + state.DepthMask(GL_FALSE); + m_GaussianProgram_vert->Bind(); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, m_GaussianTexture_horiz); + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + + GLERROR("DrawBloomPass::Draw: END"); + + return m_GaussianTexture_vert; +} + + +void BlurHUD::OnWindowResize() +{ + CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height), GL_RGB16F, GL_RGB, GL_FLOAT); + m_GaussianFrameBuffer_vert.Generate(); + CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height), GL_RGB16F, GL_RGB, GL_FLOAT); + m_GaussianFrameBuffer_horiz.Generate(); +} + +void BlurHUD::FillStencil(RenderScene& scene) +{ + RenderState state; + + state.BindFramebuffer(m_GaussianFrameBuffer_horiz.GetHandle()); + state.Disable(GL_DEPTH_TEST); + state.Enable(GL_CULL_FACE); + state.Enable(GL_STENCIL_TEST); + state.StencilFunc(GL_ALWAYS, 1, 0xFF); + state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + state.StencilMask(0xFF); + + m_FillDepthStencilProgram->Bind(); + + GLuint shaderHandle = m_FillDepthStencilProgram->GetHandle(); + + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); + + for (auto& job : scene.Jobs.SpriteJob) { + auto spriteJob = std::dynamic_pointer_cast(job); + if (!spriteJob) { + continue; + } + if (!spriteJob->BlurBackground) { + continue; + } + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(spriteJob->Matrix)); + + glBindVertexArray(spriteJob->Model->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, spriteJob->Model->ElementBuffer); + glDrawElements(GL_TRIANGLES, spriteJob->EndIndex - spriteJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(spriteJob->StartIndex*sizeof(unsigned int))); + } + + state.BindFramebuffer(m_GaussianFrameBuffer_vert.GetHandle()); + for (auto& job : scene.Jobs.SpriteJob) { + auto spriteJob = std::dynamic_pointer_cast(job); + if (!spriteJob) { + continue; + } + if(!spriteJob->BlurBackground) { + continue; + } + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(spriteJob->Matrix)); + + glBindVertexArray(spriteJob->Model->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, spriteJob->Model->ElementBuffer); + glDrawElements(GL_TRIANGLES, spriteJob->EndIndex - spriteJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(spriteJob->StartIndex*sizeof(unsigned int))); + } + +} + +//Texture 1 will be used if texture 2 is black at that texel, else texture 2 is used. +GLuint BlurHUD::CombineTextures(GLuint texture1, GLuint texture2) +{ + RenderState state; + state.BindFramebuffer(m_CombinedTextureBuffer.GetHandle()); + state.Disable(GL_DEPTH_TEST); + state.Disable(GL_STENCIL_TEST); + + m_CombineTexturesProgram->Bind(); + + glActiveTexture(GL_TEXTURE0); + glActiveTexture(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_2D, texture1); + glBindTexture(GL_TEXTURE_2D, texture2); + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + + return m_CombinedTexture; +} diff --git a/src/Engine/Rendering/DrawFinalPass.cpp b/src/Engine/Rendering/DrawFinalPass.cpp index a610fab1..b9aa8664 100644 --- a/src/Engine/Rendering/DrawFinalPass.cpp +++ b/src/Engine/Rendering/DrawFinalPass.cpp @@ -233,7 +233,7 @@ void DrawFinalPass::InitializeShaderPrograms() } -void DrawFinalPass::Draw(RenderScene& scene) +void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) { GLERROR("Pre"); DrawFinalPassState* stateDethp = new DrawFinalPassState(m_ShieldDepthFrameBuffer.GetHandle()); @@ -280,6 +280,11 @@ void DrawFinalPass::Draw(RenderScene& scene) DrawModelRenderQueuesWithShieldCheck(scene.Jobs.TransparentObjects, scene); //might need changing GLERROR("Shielded Transparent objects"); + //Generate blur texture. + m_FullBlurredTexture = blurHUDPass->Draw(m_SceneTexture, scene); + //Combine nonblur and blur texture + m_CombinedTexture = blurHUDPass->CombineTextures(m_SceneTexture, m_FullBlurredTexture); + //Draw Transparen objects //state->BlendFunc(GL_ONE, GL_ONE); //state->StencilFunc(GL_EQUAL, 1, 0xFF); diff --git a/src/Engine/Rendering/Renderer.cpp b/src/Engine/Rendering/Renderer.cpp index 7e11f3b2..f58e6208 100644 --- a/src/Engine/Rendering/Renderer.cpp +++ b/src/Engine/Rendering/Renderer.cpp @@ -110,7 +110,7 @@ void Renderer::Draw(RenderFrame& frame) { GLERROR("PRE"); glBindFramebuffer(GL_FRAMEBUFFER, 0); - ImGui::Combo("Draw textures", &m_DebugTextureToDraw, "Final\0Scene\0Bloom\0Gaussian\0Picking\0Ambient Occlusion"); + ImGui::Combo("Draw textures", &m_DebugTextureToDraw, "Final\0Scene\0Bloom\0Gaussian\0Picking\0Ambient Occlusion\0Combined Scene Texture\0Full Blurred Texture"); ImGui::Combo("CubeMap", &m_CubeMapTexture, "Nevada(512)\0Sky(1024)"); if(m_CubeMapTexture == 0) { m_CubeMapPass->LoadTextures("Nevada"); @@ -133,6 +133,7 @@ void Renderer::Draw(RenderFrame& frame) m_DrawFinalPass->ClearBuffer(); m_DrawBloomPass->ClearBuffer(); m_SSAOPass->ClearBuffer(); + m_BlurHUDPass->ClearBuffer(); PerformanceTimer::StopTimer("Renderer-ClearBuffers"); GLERROR("ClearBuffers"); for (auto scene : frame.RenderScenes) { @@ -158,7 +159,7 @@ void Renderer::Draw(RenderFrame& frame) m_LightCullingPass->CullLights(*scene); GLERROR("LightCulling"); PerformanceTimer::StartTimerAndStopPrevious("Renderer-Draw Geometry+Light"); - m_DrawFinalPass->Draw(*scene); + m_DrawFinalPass->Draw(*scene, m_BlurHUDPass); GLERROR("Draw Geometry+Light"); //m_DrawScenePass->Draw(*scene); @@ -194,6 +195,12 @@ void Renderer::Draw(RenderFrame& frame) if (m_DebugTextureToDraw == 5) { m_DrawScreenQuadPass->Draw(m_SSAOPass->SSAOTexture()); } + if (m_DebugTextureToDraw == 6) { + m_DrawScreenQuadPass->Draw(m_DrawFinalPass->CombinedSceneTexture()); + } + if (m_DebugTextureToDraw == 7) { + m_DrawScreenQuadPass->Draw(m_DrawFinalPass->FullBlurredTexture()); + } PerformanceTimer::StopTimer("Renderer-Misc Debug Draws"); PerformanceTimer::StartTimer("Renderer-ImGuiRenderPass"); @@ -244,9 +251,10 @@ void Renderer::InitializeRenderPasses() m_LightCullingPass = new LightCullingPass(this); m_CubeMapPass = new CubeMapPass(this); m_SSAOPass = new SSAOPass(this, m_Config); + m_BlurHUDPass = new BlurHUD(this); m_DrawFinalPass = new DrawFinalPass(this, m_LightCullingPass, m_CubeMapPass, m_SSAOPass); m_DrawScreenQuadPass = new DrawScreenQuadPass(this); m_DrawBloomPass = new DrawBloomPass(this, m_Config); m_DrawColorCorrectionPass = new DrawColorCorrectionPass(this); - + } \ No newline at end of file From 6b7f598c4d19b1a3c492feef97d1857ce97f4cef Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 7 Mar 2016 23:35:58 +0100 Subject: [PATCH 21/40] WIP --- include/Engine/Rendering/Renderer.h | 2 ++ src/Engine/Rendering/DrawFinalPass.cpp | 2 +- src/Engine/Rendering/Renderer.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/Engine/Rendering/Renderer.h b/include/Engine/Rendering/Renderer.h index 9983bae9..37385875 100644 --- a/include/Engine/Rendering/Renderer.h +++ b/include/Engine/Rendering/Renderer.h @@ -57,6 +57,8 @@ private: Texture* m_ErrorTexture; Texture* m_WhiteTexture; + GLuint m_CombinedTexture; + Model* m_ScreenQuad; Model* m_UnitQuad; Model* m_UnitSphere; diff --git a/src/Engine/Rendering/DrawFinalPass.cpp b/src/Engine/Rendering/DrawFinalPass.cpp index b9aa8664..ea6bce1d 100644 --- a/src/Engine/Rendering/DrawFinalPass.cpp +++ b/src/Engine/Rendering/DrawFinalPass.cpp @@ -283,7 +283,6 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) //Generate blur texture. m_FullBlurredTexture = blurHUDPass->Draw(m_SceneTexture, scene); //Combine nonblur and blur texture - m_CombinedTexture = blurHUDPass->CombineTextures(m_SceneTexture, m_FullBlurredTexture); //Draw Transparen objects //state->BlendFunc(GL_ONE, GL_ONE); @@ -292,6 +291,7 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) GLERROR("TransparentObjects"); //state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); DrawSprites(scene.Jobs.SpriteJob, scene); + GLERROR("SpriteJobs"); delete state; diff --git a/src/Engine/Rendering/Renderer.cpp b/src/Engine/Rendering/Renderer.cpp index f58e6208..63a89e9e 100644 --- a/src/Engine/Rendering/Renderer.cpp +++ b/src/Engine/Rendering/Renderer.cpp @@ -162,6 +162,7 @@ void Renderer::Draw(RenderFrame& frame) m_DrawFinalPass->Draw(*scene, m_BlurHUDPass); GLERROR("Draw Geometry+Light"); //m_DrawScenePass->Draw(*scene); + m_CombinedTexture = m_BlurHUDPass->CombineTextures(m_DrawFinalPass->SceneTexture(), m_DrawFinalPass->FullBlurredTexture()); PerformanceTimer::StartTimerAndStopPrevious("Renderer-Draw Text"); m_TextPass->Draw(*scene, *m_DrawFinalPass->FinalPassFrameBuffer()); From 01f29b6d4e34749a36574812ba2daced73e0de2c Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 8 Mar 2016 11:14:09 +0100 Subject: [PATCH 22/40] Blur behind buttons/sprites should now be working as intended. --- include/Engine/Rendering/BlurHUD.h | 1 + include/Engine/Rendering/RenderQueue.h | 1 + include/Engine/Rendering/Renderer.h | 2 - .../Schema/Entities/QualityAssurance.xml | 394 +- .../Schema/Entities/aaaatestremoveme.xml | 5787 ++++++++++++++++- resources/Shaders/CombineTexture.frag.glsl | 16 +- resources/Shaders/Gaussian_horiz.frag.glsl | 12 +- resources/Shaders/Gaussian_vert.frag.glsl | 12 +- resources/Shaders/Sprite.frag.glsl | 3 +- src/Engine/Rendering/BlurHUD.cpp | 54 +- src/Engine/Rendering/DrawFinalPass.cpp | 19 +- src/Engine/Rendering/RenderSystem.cpp | 1 + src/Engine/Rendering/Renderer.cpp | 1 - 13 files changed, 6053 insertions(+), 250 deletions(-) diff --git a/include/Engine/Rendering/BlurHUD.h b/include/Engine/Rendering/BlurHUD.h index 2d01673e..ca3b7270 100644 --- a/include/Engine/Rendering/BlurHUD.h +++ b/include/Engine/Rendering/BlurHUD.h @@ -48,6 +48,7 @@ private: //const LightCullingPass* m_LightCullingPass int m_Iterations = 3; int m_Quality = 0; + float m_BlurQuality = 2.f; GLuint m_GaussianTexture_horiz = 0; GLuint m_GaussianTexture_vert = 0; diff --git a/include/Engine/Rendering/RenderQueue.h b/include/Engine/Rendering/RenderQueue.h index e3c46e85..f183b021 100644 --- a/include/Engine/Rendering/RenderQueue.h +++ b/include/Engine/Rendering/RenderQueue.h @@ -33,6 +33,7 @@ struct RenderScene Rectangle Viewport; bool ClearDepth = false; + bool ShouldBlur = false; glm::vec4 AmbientColor; void Clear() diff --git a/include/Engine/Rendering/Renderer.h b/include/Engine/Rendering/Renderer.h index 37385875..9983bae9 100644 --- a/include/Engine/Rendering/Renderer.h +++ b/include/Engine/Rendering/Renderer.h @@ -57,8 +57,6 @@ private: Texture* m_ErrorTexture; Texture* m_WhiteTexture; - GLuint m_CombinedTexture; - Model* m_ScreenQuad; Model* m_UnitQuad; Model* m_UnitSphere; diff --git a/resources/Schema/Entities/QualityAssurance.xml b/resources/Schema/Entities/QualityAssurance.xml index 04cc288a..7a8f657f 100644 --- a/resources/Schema/Entities/QualityAssurance.xml +++ b/resources/Schema/Entities/QualityAssurance.xml @@ -3,7 +3,7 @@ - 4.7473226580121377 + 0.8333591884066891 @@ -11,6 +11,104 @@ + + + + + + + + + + + + + + + Models/Characters/Assault/AssaultAnimated.mesh + + + + + + + + + + + + + + Models/Characters/Assault/AssaultAnimated.mesh + + + + + + + + + Animation test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + + + + Models/Characters/Assault/AssaultAnimated.mesh + + + + + + + + + + + + + @@ -43,7 +141,7 @@ - + @@ -96,115 +194,11 @@ - + - - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultAnimated.mesh - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultAnimated.mesh - - - - - - - - - Animation test - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - Models/Core/UnitCylinder.mesh - - - - - - - - - - - - - - - - - - - - 0.5 - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultAnimated.mesh - - - - - - - - - - - - - @@ -228,7 +222,7 @@ - + @@ -292,7 +286,7 @@ - + @@ -324,7 +318,7 @@ - + @@ -395,15 +389,15 @@ - - - Schema/Entities/Player.xml - + + + Schema/Entities/Player.xml + @@ -465,15 +459,15 @@ - - - Schema/Entities/Player.xml - + + + Schema/Entities/Player.xml + @@ -619,8 +613,8 @@ - + @@ -674,7 +668,7 @@ - + @@ -721,7 +715,7 @@ - + @@ -781,7 +775,7 @@ - + @@ -828,7 +822,7 @@ - + @@ -874,7 +868,7 @@ - + @@ -921,7 +915,7 @@ - + @@ -968,7 +962,7 @@ - + @@ -1023,22 +1017,22 @@ + 15 - 15 + + + + + Models/Core/UnitCube.mesh true - - - - - @@ -1054,8 +1048,8 @@ - + @@ -1078,13 +1072,13 @@ 1 + Models/Core/UnitCube.mesh true - @@ -1100,8 +1094,8 @@ - + @@ -1122,13 +1116,13 @@ 2 + Models/Core/UnitCube.mesh true - @@ -1144,8 +1138,8 @@ - + @@ -1168,13 +1162,13 @@ 3 + Models/Core/UnitCube.mesh true - @@ -1190,8 +1184,8 @@ - + @@ -1212,23 +1206,23 @@ + -15 - -15 4 + + + + + Models/Core/UnitCube.mesh true - - - - - @@ -1244,8 +1238,8 @@ - + @@ -1285,8 +1279,8 @@ - + @@ -1382,7 +1376,7 @@ - + @@ -1391,7 +1385,7 @@ true - 2.5396116058983438 + 0.66694876855613217 3.7999999523162842 true @@ -1438,7 +1432,7 @@ - + @@ -1447,7 +1441,7 @@ - 1.5396208215609732 + 2.0168132214141465 Models/Characters/Assault/AssaultTPose.mesh @@ -1490,22 +1484,20 @@ - + - - - + true - 1.5396208215609732 + 2.0168132214141465 true @@ -1550,7 +1542,7 @@ - + @@ -1560,7 +1552,7 @@ true - 4.4522528839264339 + 6.6002622626005092 10 3 @@ -1608,7 +1600,7 @@ - + @@ -1618,7 +1610,7 @@ true - 3.2362842141074992 + 0.1169253453956216 true 5 true @@ -1655,8 +1647,8 @@ - + @@ -1701,6 +1693,11 @@ + + + + + @@ -1711,11 +1708,6 @@ 5 - - - - - @@ -1738,8 +1730,8 @@ - + @@ -1777,8 +1769,8 @@ - + @@ -1790,8 +1782,8 @@ - + @@ -1801,7 +1793,7 @@ true - 2.5396116058983438 + 0.66694876855613217 3.7999999523162842 true @@ -1845,9 +1837,7 @@ - - - + @@ -1915,8 +1905,8 @@ - + @@ -1991,20 +1981,20 @@ - - 2 - + + 2 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2025,20 +2015,20 @@ - - 3 - + + 3 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2059,21 +2049,21 @@ - - 4 - 1 + + 4 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2094,20 +2084,20 @@ - - 1 - + + 1 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2128,19 +2118,19 @@ - 1 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2173,7 +2163,7 @@ - + @@ -2374,7 +2364,9 @@ Textures/Core/ErrorTexture.png + true + @@ -2387,6 +2379,7 @@ Textures/Core/White.png + false @@ -2400,6 +2393,7 @@ 1920x1080 Fonts/DroidSans.ttf,64 + false @@ -2416,6 +2410,7 @@ Textures/Core/White.png + false @@ -2429,6 +2424,7 @@ 1280x720 Fonts/DroidSans.ttf,64 + false @@ -2540,20 +2536,20 @@ + + + + + 2 Models/Weapons/Blue/AssaultWeaponBlue.mesh - - - - - + - diff --git a/resources/Schema/Entities/aaaatestremoveme.xml b/resources/Schema/Entities/aaaatestremoveme.xml index 8da40b58..d44e4883 100644 --- a/resources/Schema/Entities/aaaatestremoveme.xml +++ b/resources/Schema/Entities/aaaatestremoveme.xml @@ -2,37 +2,5794 @@ + + 8.2999489298303502 + 15 + - + - - Models/Core/Unithexagon.mesh - - - + + + + + + Models/Props/Ground.mesh + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + + + Models/Props/Highground3.mesh + + + + + + + + + + Models/Props/Highground4.mesh + + + + + + + + + + Models/Props/Highground1.mesh + + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + Models/Props/Highground1.mesh + + + + + + + + + + + + Models/Props/Highground5.mesh + + + + + + + + + + + Models/Props/Highground6.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallTop.mesh + + + + + + + + + Models/Props/Walls/SciFiWallBig.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallMedium.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallSmall1.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallSmall2.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallBig.mesh + + + + + + + + + + + + Models/Props/Walls/SciFiWallMedium.mesh + + + + + + + + + + + + Models/Props/Walls/SciFiWallSmall3.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallSmall4.mesh + + + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + + Models/Props/Flora/TreeLog.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + - + - + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + - + - + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + - + - - 2.2000000476837158 - - + + + + + 10 + + + + + + + + + + 10 + + + + + + + + + + + + + 1 + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointRed.mesh + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 3 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1.5498908015879351 + 1 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointBlue.mesh + + + + + + + + + + + + + 4 + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/PlayerRed.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + 0.049999997019767761 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + 4 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + 3 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + 2 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + 0.10332605343919568 + + + + 1 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + + + 7 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Play + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Option + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Credits + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Quit + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/UnitRaptor.png + + + + PickClass + 1 + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + PickClass + 2 + + + + + + + + + + + + + Textures/Test/aM4ME4GR.png + + + + PickClass + 3 + + + + + + + + + + + + + + + diff --git a/resources/Shaders/CombineTexture.frag.glsl b/resources/Shaders/CombineTexture.frag.glsl index 9d6a71c2..fd4acaac 100644 --- a/resources/Shaders/CombineTexture.frag.glsl +++ b/resources/Shaders/CombineTexture.frag.glsl @@ -1,14 +1,15 @@ #version 430 -uniform sampler2D Texture0; -uniform sampler2D Texture1; +layout (binding = 0) uniform sampler2D Texture0; +layout (binding = 1)uniform sampler2D Texture1; in VertexData{ vec2 TextureCoordinate; }Input; -out vec4 fragmentColor; +out vec4 sceneColor; +out vec4 bloomColor; void main() { @@ -17,9 +18,14 @@ void main() float texel1_total = (texel1.r + texel1.g + texel1.b) * texel1.a; texel1_total = ceil(clamp(texel1_total, 0, 1)); - vec4 final = texel0 * texel1_total + texel1 * (1 - texel1_total); + vec4 result0 = texel0 * (1.0 - texel1_total); + vec4 result1 = texel1 * texel1_total; + + //vec4 final = texel1 * texel1_total + texel0 * (1.0 - texel1_total); + //float res = 1.0 - texel1_total; //vec4 final = vec4(texel1_total, texel1_total, texel1_total, 1.0); - fragmentColor = final; + sceneColor = result1; + bloomColor = vec4(0.0, 0.0, 0.0, 0.0); } diff --git a/resources/Shaders/Gaussian_horiz.frag.glsl b/resources/Shaders/Gaussian_horiz.frag.glsl index 6a9572c2..8a306ec2 100644 --- a/resources/Shaders/Gaussian_horiz.frag.glsl +++ b/resources/Shaders/Gaussian_horiz.frag.glsl @@ -14,11 +14,15 @@ uniform float weight[5] = float[](0.227027, 0.1945946, 0.1216216, 0.054054, 0.01 void main() { vec2 tex_offset = 1.0 / textureSize2D(Texture, 0); - vec3 result = texture(Texture, Input.TextureCoordinate).rgb * weight[0]; - + vec3 center = texture(Texture, Input.TextureCoordinate).rgb; + vec3 result = center * weight[0]; for(int i = 1; i < 5; ++i) { - result += texture(Texture, Input.TextureCoordinate + vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; - result += texture(Texture, Input.TextureCoordinate - vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; + vec4 eastFragments = texture(Texture, Input.TextureCoordinate + vec2(tex_offset.x * i, 0.0)); + vec4 westFragments = texture(Texture, Input.TextureCoordinate - vec2(tex_offset.x * i, 0.0)); + result += eastFragments.rgb * weight[i] * eastFragments.a; + result += westFragments.rgb * weight[i] * westFragments.a; + result += center * weight[i] * (1.0 - westFragments.a); + result += center * weight[i] * (1.0 - eastFragments.a); } fragmentColor = vec4(result, 1.0); } \ No newline at end of file diff --git a/resources/Shaders/Gaussian_vert.frag.glsl b/resources/Shaders/Gaussian_vert.frag.glsl index 8b0e861a..921ba55a 100644 --- a/resources/Shaders/Gaussian_vert.frag.glsl +++ b/resources/Shaders/Gaussian_vert.frag.glsl @@ -14,11 +14,15 @@ uniform float weight[5] = float[](0.227027, 0.1945946, 0.1216216, 0.054054, 0.01 void main() { vec2 tex_offset = 1.0 / textureSize2D(Texture, 0); - vec3 result = texture(Texture, Input.TextureCoordinate).rgb * weight[0]; - + vec3 center = texture(Texture, Input.TextureCoordinate).rgb; + vec3 result = center * weight[0]; for(int i = 1; i < 5; ++i) { - result += texture(Texture, Input.TextureCoordinate + vec2(0.0, tex_offset.y * i)).rgb * weight[i]; - result += texture(Texture, Input.TextureCoordinate - vec2(0.0, tex_offset.y * i)).rgb * weight[i]; + vec4 northFragments = texture(Texture, Input.TextureCoordinate + vec2(0.0, tex_offset.y * i)); + vec4 southFragments = texture(Texture, Input.TextureCoordinate - vec2(0.0, tex_offset.y * i)); + result += northFragments.rgb * weight[i] * northFragments.a; + result += southFragments.rgb * weight[i] * southFragments.a; + result += center * weight[i] * (1.0 - northFragments.a); + result += center * weight[i] * (1.0 - southFragments.a); } fragmentColor = vec4(result, 1.0); } \ No newline at end of file diff --git a/resources/Shaders/Sprite.frag.glsl b/resources/Shaders/Sprite.frag.glsl index 754be6ac..266398da 100644 --- a/resources/Shaders/Sprite.frag.glsl +++ b/resources/Shaders/Sprite.frag.glsl @@ -35,7 +35,8 @@ void main() sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1)); //bloomColor = vec4(clamp((glowTexel.xyz*3) - 1.0, 0, 100), 1.0); - bloomColor = vec4(1.0, 1.0, 1.0, 0.0); + bloomColor = vec4(max(color_result.xyz - 1.0, 0.0), clamp(color_result.a, 0, 1)); + //bloomColor = vec4(1.0, 1.0, 1.0, 0.0); } diff --git a/src/Engine/Rendering/BlurHUD.cpp b/src/Engine/Rendering/BlurHUD.cpp index bd9ef901..4787510b 100644 --- a/src/Engine/Rendering/BlurHUD.cpp +++ b/src/Engine/Rendering/BlurHUD.cpp @@ -44,7 +44,8 @@ void BlurHUD::InitializeShaderPrograms() m_CombineTexturesProgram->AddShader(std::shared_ptr(new VertexShader("Shaders/CombineTexture.vert.glsl"))); m_CombineTexturesProgram->AddShader(std::shared_ptr(new FragmentShader("Shaders/CombineTexture.frag.glsl"))); m_CombineTexturesProgram->Compile(); - m_CombineTexturesProgram->BindFragDataLocation(0, "fragmentColor"); + m_CombineTexturesProgram->BindFragDataLocation(0, "sceneColor"); + m_CombineTexturesProgram->BindFragDataLocation(1, "bloomColor"); m_CombineTexturesProgram->Link(); } GLERROR("Creating DepthFill program"); @@ -53,11 +54,13 @@ void BlurHUD::InitializeShaderPrograms() void BlurHUD::InitializeBuffers() { glm::vec2 res = glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + glm::vec2 res2 = glm::vec2(m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + CommonFunctions::GenerateTexture(&m_DepthStencil_horiz, GL_CLAMP_TO_BORDER, GL_NEAREST, - res, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); - CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_LINEAR, - res, GL_RGB16F, GL_RGB, GL_FLOAT); + res2, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); + CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_NEAREST, + res2, GL_RGBA16F, GL_RGBA, GL_FLOAT); if (m_GaussianFrameBuffer_horiz.GetHandle() == 0) { m_GaussianFrameBuffer_horiz.AddResource(std::shared_ptr(new Texture2D(&m_DepthStencil_horiz, GL_DEPTH_STENCIL_ATTACHMENT))); @@ -66,9 +69,9 @@ void BlurHUD::InitializeBuffers() m_GaussianFrameBuffer_horiz.Generate(); CommonFunctions::GenerateTexture(&m_DepthStencil_vert, GL_CLAMP_TO_BORDER, GL_NEAREST, - res, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); - CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_LINEAR, - res, GL_RGB16F, GL_RGB, GL_FLOAT); + res2, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); + CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_NEAREST, + res2, GL_RGBA16F, GL_RGBA, GL_FLOAT); if (m_GaussianFrameBuffer_vert.GetHandle() == 0) { m_GaussianFrameBuffer_vert.AddResource(std::shared_ptr(new Texture2D(&m_DepthStencil_vert, GL_DEPTH_STENCIL_ATTACHMENT))); @@ -92,11 +95,15 @@ void BlurHUD::ClearBuffer() m_GaussianFrameBuffer_horiz.Bind(); glClearColor(0.f, 0.f, 0.f, 0.f); glClearStencil(0x00); + glStencilMask(~0); + glDisable(GL_SCISSOR_TEST); glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); m_GaussianFrameBuffer_horiz.Unbind(); m_GaussianFrameBuffer_vert.Bind(); glClearColor(0.f, 0.f, 0.f, 0.f); glClearStencil(0x00); + glStencilMask(~0); + glDisable(GL_SCISSOR_TEST); glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); m_GaussianFrameBuffer_vert.Unbind(); @@ -114,7 +121,10 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) FillStencil(scene); - DrawBloomPassState state; + RenderState state; + state.Disable(GL_BLEND); + state.Disable(GL_DEPTH_TEST); + state.Disable(GL_CULL_FACE); GLuint shaderHandle_horiz = m_GaussianProgram_horiz->GetHandle(); GLuint shaderHandle_vert = m_GaussianProgram_vert->GetHandle(); @@ -128,6 +138,10 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) state.StencilFunc(GL_EQUAL, 1, 0xFF); state.StencilMask(0x00); state.DepthMask(GL_FALSE); + state.Enable(GL_SCISSOR_TEST); + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + m_GaussianProgram_horiz->Bind(); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture); @@ -144,6 +158,8 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) state.StencilFunc(GL_EQUAL, 1, 0xFF); state.StencilMask(0x00); state.DepthMask(GL_FALSE); + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); m_GaussianProgram_vert->Bind(); glActiveTexture(GL_TEXTURE0); @@ -162,6 +178,8 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) state.StencilFunc(GL_EQUAL, 1, 0xFF); state.StencilMask(0x00); state.DepthMask(GL_FALSE); + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); m_GaussianProgram_horiz->Bind(); glActiveTexture(GL_TEXTURE0); @@ -182,6 +200,8 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) state.StencilFunc(GL_EQUAL, 1, 0xFF); state.StencilMask(0x00); state.DepthMask(GL_FALSE); + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); m_GaussianProgram_vert->Bind(); glActiveTexture(GL_TEXTURE0); @@ -192,6 +212,9 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); GLERROR("DrawBloomPass::Draw: END"); + glViewport(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + return m_GaussianTexture_vert; } @@ -199,9 +222,9 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) void BlurHUD::OnWindowResize() { - CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height), GL_RGB16F, GL_RGB, GL_FLOAT); + CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality), GL_RGB16F, GL_RGB, GL_FLOAT); m_GaussianFrameBuffer_vert.Generate(); - CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height), GL_RGB16F, GL_RGB, GL_FLOAT); + CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality), GL_RGB16F, GL_RGB, GL_FLOAT); m_GaussianFrameBuffer_horiz.Generate(); } @@ -216,6 +239,7 @@ void BlurHUD::FillStencil(RenderScene& scene) state.StencilFunc(GL_ALWAYS, 1, 0xFF); state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); state.StencilMask(0xFF); + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); m_FillDepthStencilProgram->Bind(); @@ -254,16 +278,16 @@ void BlurHUD::FillStencil(RenderScene& scene) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, spriteJob->Model->ElementBuffer); glDrawElements(GL_TRIANGLES, spriteJob->EndIndex - spriteJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(spriteJob->StartIndex*sizeof(unsigned int))); } - + glViewport(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); } //Texture 1 will be used if texture 2 is black at that texel, else texture 2 is used. GLuint BlurHUD::CombineTextures(GLuint texture1, GLuint texture2) { - RenderState state; - state.BindFramebuffer(m_CombinedTextureBuffer.GetHandle()); - state.Disable(GL_DEPTH_TEST); - state.Disable(GL_STENCIL_TEST); + //RenderState state; + //state.BindFramebuffer(m_CombinedTextureBuffer.GetHandle()); + //state.Disable(GL_DEPTH_TEST); + //state.Disable(GL_STENCIL_TEST); m_CombineTexturesProgram->Bind(); diff --git a/src/Engine/Rendering/DrawFinalPass.cpp b/src/Engine/Rendering/DrawFinalPass.cpp index ea6bce1d..edde3ef5 100644 --- a/src/Engine/Rendering/DrawFinalPass.cpp +++ b/src/Engine/Rendering/DrawFinalPass.cpp @@ -281,20 +281,31 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) GLERROR("Shielded Transparent objects"); //Generate blur texture. - m_FullBlurredTexture = blurHUDPass->Draw(m_SceneTexture, scene); - //Combine nonblur and blur texture + delete state; + if (scene.ShouldBlur) { + //This needs to be drawn only when the full scene is being renderd, and then let be, otherwise sprite and other shit will show on it. + m_FullBlurredTexture = blurHUDPass->Draw(m_SceneTexture, scene); + } + DrawFinalPassState* stateSprite = new DrawFinalPassState(m_FinalPassFrameBuffer.GetHandle()); + if(scene.ShouldBlur) { + //Combine nonblur and blur texture + stateSprite->Disable(GL_DEPTH_TEST); + stateSprite->Disable(GL_STENCIL_TEST); + m_CombinedTexture = blurHUDPass->CombineTextures(m_SceneTexture, m_FullBlurredTexture); + + } //Draw Transparen objects //state->BlendFunc(GL_ONE, GL_ONE); //state->StencilFunc(GL_EQUAL, 1, 0xFF); //DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene); GLERROR("TransparentObjects"); //state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + stateSprite->Enable(GL_DEPTH_TEST); DrawSprites(scene.Jobs.SpriteJob, scene); - GLERROR("SpriteJobs"); - delete state; + delete stateSprite; GLERROR("END"); } diff --git a/src/Engine/Rendering/RenderSystem.cpp b/src/Engine/Rendering/RenderSystem.cpp index a1f00c88..114f432b 100644 --- a/src/Engine/Rendering/RenderSystem.cpp +++ b/src/Engine/Rendering/RenderSystem.cpp @@ -435,6 +435,7 @@ void RenderSystem::Update(double dt) } RenderScene scene; + scene.ShouldBlur = true; scene.Camera = m_Camera; scene.Viewport = Rectangle(1280, 720); diff --git a/src/Engine/Rendering/Renderer.cpp b/src/Engine/Rendering/Renderer.cpp index 63a89e9e..f58e6208 100644 --- a/src/Engine/Rendering/Renderer.cpp +++ b/src/Engine/Rendering/Renderer.cpp @@ -162,7 +162,6 @@ void Renderer::Draw(RenderFrame& frame) m_DrawFinalPass->Draw(*scene, m_BlurHUDPass); GLERROR("Draw Geometry+Light"); //m_DrawScenePass->Draw(*scene); - m_CombinedTexture = m_BlurHUDPass->CombineTextures(m_DrawFinalPass->SceneTexture(), m_DrawFinalPass->FullBlurredTexture()); PerformanceTimer::StartTimerAndStopPrevious("Renderer-Draw Text"); m_TextPass->Draw(*scene, *m_DrawFinalPass->FinalPassFrameBuffer()); From 0e0a486c016df6d13531c490d8599df62d5bf6fb Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Tue, 8 Mar 2016 11:48:54 +0100 Subject: [PATCH 23/40] AmmoPickupSystem should now be able to give ammo to all classtypes --- include/Game/Systems/AmmoPickupSystem.h | 12 +++++ src/Game/Systems/AmmoPickupSystem.cpp | 69 +++++++++++++++++++++---- 2 files changed, 71 insertions(+), 10 deletions(-) diff --git a/include/Game/Systems/AmmoPickupSystem.h b/include/Game/Systems/AmmoPickupSystem.h index 70c5630f..d34427e3 100644 --- a/include/Game/Systems/AmmoPickupSystem.h +++ b/include/Game/Systems/AmmoPickupSystem.h @@ -40,5 +40,17 @@ private: }; std::vector m_PickupAtMaximum; void DoPickup(EntityWrapper &player, EntityWrapper &trigger); + //class + enum class PlayerClass { + Assault, + Defender, + Sniper, + None + }; + //helper methods + bool DoesPlayerHaveMaxAmmo(EntityWrapper &player); + PlayerClass DetermineClass(EntityWrapper &player); + int& GetPlayerAmmo(EntityWrapper &player); + int GetPlayerMaxAmmo(EntityWrapper &player); }; #endif diff --git a/src/Game/Systems/AmmoPickupSystem.cpp b/src/Game/Systems/AmmoPickupSystem.cpp index e28c38ff..21101b69 100644 --- a/src/Game/Systems/AmmoPickupSystem.cpp +++ b/src/Game/Systems/AmmoPickupSystem.cpp @@ -37,8 +37,7 @@ void AmmoPickupSystem::Update(double dt) //erase the current element (somePickup) it = m_ETriggerTouchVector.erase(it); - } - else { + } else { it++; } } @@ -48,7 +47,7 @@ void AmmoPickupSystem::Update(double dt) m_PickupAtMaximum.erase(it); break; } - if ((int)it->player["AssaultWeapon"]["Ammo"] < (int)it->player["AssaultWeapon"]["MaxAmmo"]) { + if (!DoesPlayerHaveMaxAmmo(it->player)) { DoPickup(it->player, it->trigger); m_PickupAtMaximum.erase(it); break; @@ -56,6 +55,56 @@ void AmmoPickupSystem::Update(double dt) } } } +bool AmmoPickupSystem::DoesPlayerHaveMaxAmmo(EntityWrapper &player) { + PlayerClass playerClass = DetermineClass(player); + if (playerClass == PlayerClass::Defender) { + return !((int)player["DefenderWeapon"]["Ammo"] < (int)player["DefenderWeapon"]["MaxAmmo"]); + } else if (playerClass == PlayerClass::Sniper) { + return !((int)player["SniperWeapon"]["Ammo"] < (int)player["SniperWeapon"]["MaxAmmo"]); + } else if (playerClass == PlayerClass::Assault) { + return !((int)player["AssaultWeapon"]["Ammo"] < (int)player["AssaultWeapon"]["MaxAmmo"]); + } else { + return false; + } +} +int& AmmoPickupSystem::GetPlayerAmmo(EntityWrapper &player) { + PlayerClass playerClass = DetermineClass(player); + if (playerClass == PlayerClass::Defender) { + return (int)player["DefenderWeapon"]["Ammo"]; + } else if (playerClass == PlayerClass::Sniper) { + return (int)player["SniperWeapon"]["Ammo"]; + } else if (playerClass == PlayerClass::Assault) { + return (int)player["AssaultWeapon"]["Ammo"]; + } else { + //TODO: should really return something here + } +} +int AmmoPickupSystem::GetPlayerMaxAmmo(EntityWrapper &player) { + PlayerClass playerClass = DetermineClass(player); + if (playerClass == PlayerClass::Defender) { + return (int)player["DefenderWeapon"]["MaxAmmo"]; + } else if (playerClass == PlayerClass::Sniper) { + return (int)player["SniperWeapon"]["MaxAmmo"]; + } else if (playerClass == PlayerClass::Assault) { + return (int)player["AssaultWeapon"]["MaxAmmo"]; + } else { + return -1; + } +} +AmmoPickupSystem::PlayerClass AmmoPickupSystem::DetermineClass(EntityWrapper &player) +{ + //determine the class based on what component the inflictor-player has + if (m_World->HasComponent(player.ID, "DashAbility")) { + return PlayerClass::Assault; + } + if (m_World->HasComponent(player.ID, "ShieldAbility")) { + return PlayerClass::Defender; + } + if (m_World->HasComponent(player.ID, "SprintAbility")) { + return PlayerClass::Sniper; + } + return PlayerClass::None; +} bool AmmoPickupSystem::OnTriggerTouch(Events::TriggerTouch& e) { @@ -63,7 +112,7 @@ bool AmmoPickupSystem::OnTriggerTouch(Events::TriggerTouch& e) return false; } //TODO: add other weapontypes - if (!e.Entity.HasComponent("AssaultWeapon")) { + if (DetermineClass(e.Entity) == PlayerClass::None) { return false; } if (!e.Trigger.HasComponent("AmmoPickup")) { @@ -71,7 +120,7 @@ bool AmmoPickupSystem::OnTriggerTouch(Events::TriggerTouch& e) } //if at maxammo, save the trigger-touch to a vector since standing inside it will not re-trigger the trigger - if ((int)e.Entity["AssaultWeapon"]["Ammo"] >= (int)e.Entity["AssaultWeapon"]["MaxAmmo"]) { + if (DoesPlayerHaveMaxAmmo(e.Entity)) { m_PickupAtMaximum.push_back({ e.Entity, e.Trigger }); return false; } @@ -85,15 +134,15 @@ bool AmmoPickupSystem::OnAmmoPickup(Events::AmmoPickup & e) return false; } //TODO: add other weapontypes - if (!e.Player.HasComponent("AssaultWeapon")) { + if (DetermineClass(e.Player) == PlayerClass::None) { return false; } - int maxWeaponAmmo = (int)e.Player["AssaultWeapon"]["MaxAmmo"]; - int& currentAmmo = (int)e.Player["AssaultWeapon"]["Ammo"]; //cant pick up ammopacks if you are already at MaxAmmo - if (currentAmmo >= maxWeaponAmmo) { + if (DoesPlayerHaveMaxAmmo(e.Player)) { return false; } + int maxWeaponAmmo = GetPlayerMaxAmmo(e.Player); + int& currentAmmo = GetPlayerAmmo(e.Player); currentAmmo = std::min(currentAmmo + e.AmmoGain, maxWeaponAmmo); @@ -119,7 +168,7 @@ void AmmoPickupSystem::DoPickup(EntityWrapper &player, EntityWrapper &trigger) { if (!trigger.Valid()) { return; } - int maxWeaponAmmo = (int)player["AssaultWeapon"]["MaxAmmo"]; + int maxWeaponAmmo = GetPlayerMaxAmmo(player); int ammoGiven = 0.01*(double)trigger["AmmoPickup"]["AmmoGain"] * maxWeaponAmmo; Events::AmmoPickup ePlayerAmmoPickup; From d7f09b1a8fa988f8f9359bb941aa0d36d8e20a40 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Tue, 8 Mar 2016 11:59:15 +0100 Subject: [PATCH 24/40] Added clickable buttons to switch to class/team screens, as a better alternative to Comma/Period on the keyboard. --- .../Schema/Entities/NewMapWSpectatorCam.xml | 3014 +++++++++-------- resources/Schema/Entities/OverwatchCamera.xml | 386 ++- src/Game/Systems/SpectatorCameraSystem.cpp | 19 + 3 files changed, 1907 insertions(+), 1512 deletions(-) diff --git a/resources/Schema/Entities/NewMapWSpectatorCam.xml b/resources/Schema/Entities/NewMapWSpectatorCam.xml index 456bee0e..a655bef3 100644 --- a/resources/Schema/Entities/NewMapWSpectatorCam.xml +++ b/resources/Schema/Entities/NewMapWSpectatorCam.xml @@ -23,6 +23,16 @@ + + + + + Models/Props/Highground1.mesh + + + + + @@ -77,16 +87,6 @@ - - - - - Models/Props/Highground1.mesh - - - - - @@ -1843,6 +1843,954 @@ + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/TreeLog.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + @@ -3281,34 +4229,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - @@ -3391,6 +4311,34 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + @@ -3425,8 +4373,8 @@ Models/Props/Stones/AssaultHolder.mesh - - + + @@ -3448,959 +4396,24 @@ - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/TreeLog.mesh - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - Models/Props/Flora/AliveBush.mesh - true - - - - - - - - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridge1Blue.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridge1Red.mesh - - - - - - - - - - - - - Models/Props/Bridges/WoodenBridge.mesh - - - - - - - - - - - - - - Models/Props/Bridges/WoodenBridge.mesh - - - - - - - - - - - - - - Models/Props/Bridges/WoodenBridge.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridge1Red.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridge1Blue.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridge1Blue.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridge1Red.mesh - - - - - - - - - - - - - Models/Props/Bridges/WoodenBridge.mesh - - - - - - - - - - - + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + @@ -4479,19 +4492,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -4512,74 +4512,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - @@ -4594,19 +4526,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - @@ -4614,78 +4533,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - + + @@ -4711,8 +4560,35 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + @@ -4732,6 +4608,130 @@ + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + @@ -4750,6 +4750,76 @@ + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + @@ -4947,6 +5017,19 @@ + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + @@ -4973,19 +5056,6 @@ - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - @@ -5006,28 +5076,6 @@ - - - - 1 - - - - - - - - - - - 10 - - - - - - - @@ -5041,10 +5089,23 @@ - - 1 - - + + 10 + + + + + + + + + + + 1 + + + + @@ -5077,11 +5138,20 @@ 10 - + + + + + 1 + + + + + @@ -5101,8 +5171,8 @@ Models/Props/PickUps/AmmoPickUp.mesh - - + + @@ -5120,46 +5190,8 @@ Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - + + @@ -5178,7 +5210,64 @@ - + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + @@ -5197,26 +5286,7 @@ - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - + @@ -5235,7 +5305,7 @@ - + @@ -5243,76 +5313,6 @@ - - - - - - - - - - Schema/Entities/Player.xml - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - @@ -5321,6 +5321,7 @@ + @@ -5345,41 +5346,27 @@ - - - - Pick Class - Fonts/DroidSans.ttf,64 - - - - - - - - - - + - Textures/Icons/Classes/Assault-01.png + Textures/Icons/Classes/Defender-01.png PickClass - 1 + 2 - + - + - Assault + Defender Fonts/DroidSans.ttf,64 @@ -5425,27 +5412,27 @@ - + - Textures/Icons/Classes/Defender-01.png + Textures/Icons/Classes/Assault-01.png PickClass - 2 + 1 - + - + - Defender + Assault Fonts/DroidSans.ttf,64 @@ -5458,6 +5445,66 @@ + + + + Pick Class + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + SwapToTeamPick + 1 + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + @@ -5475,6 +5522,20 @@ + + + + Pick Team + Fonts/DroidSans.ttf,64 + + + + + + + + + @@ -5526,7 +5587,7 @@ - + Red @@ -5574,19 +5635,54 @@ - + - - Pick Team - Fonts/DroidSans.ttf,64 - - + + + Textures/Core/UnitHexagon.png + + + false + + + SwapToClassPick + 1 + - - + + - + + + + + Change + Fonts/DroidSans.ttf,64 + false + + + + + + + + + + + + Class + Fonts/DroidSans.ttf,64 + false + + + + + + + + + @@ -5605,6 +5701,20 @@ + + + + 1 + Fonts/DroidSans.ttf,64 + + + + + + + + + @@ -5618,10 +5728,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -5631,7 +5741,7 @@ - 4 + 3 Textures/Core/UnitHexagon_Rotated.png @@ -5652,10 +5762,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -5665,7 +5775,7 @@ - 3 + 4 Textures/Core/UnitHexagon_Rotated.png @@ -5715,38 +5825,6 @@ - - - - Textures/Core/UnitHexagon.png - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - @@ -5782,21 +5860,131 @@ + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + - + - - 16 - Fonts/DroidSans.ttf,64 - - + + + Textures/Core/UnitHexagon.png + + + + + SwapToTeamPick + 1 + - - + + - + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + SwapToClassPick + 1 + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Class + Fonts/DroidSans.ttf,64 + + + + + + + + + diff --git a/resources/Schema/Entities/OverwatchCamera.xml b/resources/Schema/Entities/OverwatchCamera.xml index 55e9099c..075e57e2 100644 --- a/resources/Schema/Entities/OverwatchCamera.xml +++ b/resources/Schema/Entities/OverwatchCamera.xml @@ -8,6 +8,7 @@ + @@ -33,19 +34,38 @@ - + - - Pick Class - Fonts/DroidSans.ttf,64 - - + + + Textures/Icons/Classes/Sniper-01.png + + + + PickClass + 3 + - - + + - + + + + + Sniper + Fonts/DroidSans.ttf,64 + + + + + + + + + + @@ -80,39 +100,6 @@ - - - - - Textures/Icons/Classes/Sniper-01.png - - - - PickClass - 3 - - - - - - - - - - - Sniper - Fonts/DroidSans.ttf,64 - - - - - - - - - - - @@ -146,6 +133,66 @@ + + + + Pick Class + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + SwapToTeamPick + 1 + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + @@ -163,6 +210,20 @@ + + + + Pick Team + Fonts/DroidSans.ttf,64 + + + + + + + + + @@ -214,7 +275,7 @@ - + Red @@ -262,19 +323,54 @@ - + - - Pick Team - Fonts/DroidSans.ttf,64 - - + + + Textures/Core/UnitHexagon.png + + + false + + + SwapToClassPick + 1 + - - + + - + + + + + Change + Fonts/DroidSans.ttf,64 + false + + + + + + + + + + + + Class + Fonts/DroidSans.ttf,64 + false + + + + + + + + + @@ -293,6 +389,20 @@ + + + + 15 + Fonts/DroidSans.ttf,64 + + + + + + + + + @@ -306,10 +416,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -319,7 +429,7 @@ - 4 + 3 Textures/Core/UnitHexagon_Rotated.png @@ -340,10 +450,10 @@ Textures/Core/UnitHexagon.png - + - + @@ -353,7 +463,7 @@ - 3 + 4 Textures/Core/UnitHexagon_Rotated.png @@ -403,38 +513,6 @@ - - - - Textures/Core/UnitHexagon.png - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - @@ -470,21 +548,131 @@ + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + - + - - 16 - Fonts/DroidSans.ttf,64 - - + + + Textures/Core/UnitHexagon.png + + + + + SwapToTeamPick + 1 + - - + + - + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + SwapToClassPick + 1 + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Class + Fonts/DroidSans.ttf,64 + + + + + + + + + diff --git a/src/Game/Systems/SpectatorCameraSystem.cpp b/src/Game/Systems/SpectatorCameraSystem.cpp index 58f25155..60b82b0d 100644 --- a/src/Game/Systems/SpectatorCameraSystem.cpp +++ b/src/Game/Systems/SpectatorCameraSystem.cpp @@ -60,6 +60,25 @@ bool SpectatorCameraSystem::OnInputCommand(const Events::InputCommand& e) EntityWrapper spectatorCam = m_World->GetFirstEntityByName(camName); // Set the camera as active, if it exists. if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) { + // Set the class pick button visible if a blue or red team is picked, else invisible. + EntityWrapper HUD; + if (camName == "SpectatorCamera") { + HUD = spectatorCam.FirstChildByName("SpectatorHUD"); + } else if (camName == "PickTeamCamera") { + HUD = spectatorCam.FirstChildByName("PickTeamHUD"); + } + // If we are at the class pick already, or if HUD is invalid for any other reason, do nothing. + if (HUD.Valid()) { + EntityWrapper toClassButton = spectatorCam.FirstChildByName("ToClassPick"); + if (toClassButton.Valid()) { + // Set ClassButton as invisible if spectator, else visible. + bool visible = m_PickedTeam != 1; // TODO: 1 Signifies spectator. + toClassButton["Sprite"]["Visible"] = visible; + for (auto& child : toClassButton.ChildrenWithComponent("Text")) { + child["Text"]["Visible"] = visible; + } + } + } Events::SetCamera eSetCamera; eSetCamera.CameraEntity = spectatorCam; m_EventBroker->Publish(eSetCamera); From a0ca4df3be179045231e5cbac67cd943614f79ef Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 8 Mar 2016 13:29:21 +0100 Subject: [PATCH 25/40] Some server list components and entities. --- resources/Schema/Components.xsd | 2 + .../Schema/Components/ServerIdentity.xml | 7 + .../Schema/Components/ServerIdentity.xsd | 23 ++ resources/Schema/Components/ServerList.xml | 6 + resources/Schema/Components/ServerList.xsd | 20 ++ resources/Schema/Entities/MainMenu.xml | 302 ++++++++++-------- resources/Schema/Entities/ServerIdentity.xml | 94 ++++++ resources/Schema/Entities/ServerList.xml | 65 ++++ resources/Schema/Types/Entity.xsd | 2 + src/Engine/GUI/MainMenuSystem.cpp | 3 - src/Engine/Rendering/BlurHUD.cpp | 36 +-- 11 files changed, 397 insertions(+), 163 deletions(-) create mode 100644 resources/Schema/Components/ServerIdentity.xml create mode 100644 resources/Schema/Components/ServerIdentity.xsd create mode 100644 resources/Schema/Components/ServerList.xml create mode 100644 resources/Schema/Components/ServerList.xsd create mode 100644 resources/Schema/Entities/ServerIdentity.xml create mode 100644 resources/Schema/Entities/ServerList.xml diff --git a/resources/Schema/Components.xsd b/resources/Schema/Components.xsd index cf282eec..632fad19 100644 --- a/resources/Schema/Components.xsd +++ b/resources/Schema/Components.xsd @@ -65,4 +65,6 @@ + + \ No newline at end of file diff --git a/resources/Schema/Components/ServerIdentity.xml b/resources/Schema/Components/ServerIdentity.xml new file mode 100644 index 00000000..b14a309c --- /dev/null +++ b/resources/Schema/Components/ServerIdentity.xml @@ -0,0 +1,7 @@ + + + 0.0.0.0 + 0 + UnkownServer + 0 + \ No newline at end of file diff --git a/resources/Schema/Components/ServerIdentity.xsd b/resources/Schema/Components/ServerIdentity.xsd new file mode 100644 index 00000000..961a69c5 --- /dev/null +++ b/resources/Schema/Components/ServerIdentity.xsd @@ -0,0 +1,23 @@ + + + + + A component for tracking the data of servers in the serverlist. + + + + The IP adress of the server. + + + Port used to connect to the server. + + + Name of the server. + + + Amount of players connected to the server. + + + + + \ No newline at end of file diff --git a/resources/Schema/Components/ServerList.xml b/resources/Schema/Components/ServerList.xml new file mode 100644 index 00000000..d3571d07 --- /dev/null +++ b/resources/Schema/Components/ServerList.xml @@ -0,0 +1,6 @@ + + + 0 + 0 + + \ No newline at end of file diff --git a/resources/Schema/Components/ServerList.xsd b/resources/Schema/Components/ServerList.xsd new file mode 100644 index 00000000..b422acda --- /dev/null +++ b/resources/Schema/Components/ServerList.xsd @@ -0,0 +1,20 @@ + + + + + The menulist where servers will be listed. + + + + The amount of server identities in this list. + + + Where the next serverIdentity should be placed. + + + How much offset should be applied per position + + + + + \ No newline at end of file diff --git a/resources/Schema/Entities/MainMenu.xml b/resources/Schema/Entities/MainMenu.xml index a88c1407..47292c30 100644 --- a/resources/Schema/Entities/MainMenu.xml +++ b/resources/Schema/Entities/MainMenu.xml @@ -1,163 +1,203 @@ - + + - - + - - - - - - - - - - Textures/Core/White.png - - - - - - - - - - - - Play - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - + - + + - + - - - Textures/Core/White.png - - - - - + - + + + + + + Textures/Core/White.png + true + + + + + Play + 1 + + + + + + + + + + + Play + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + - + - - Option - Fonts/DroidSans.ttf,64 - - - - - - - + - + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Option + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Credits + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Quit + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + - + - + - + - - - Textures/Core/White.png - - - - - - - - - - - - Credits - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - - - - - - - - - - - Textures/Core/White.png - - - - - - - - - - - - Quit - Fonts/DroidSans.ttf,64 - - - - - - - - - + + Schema/Entities/ServerList.xml + + diff --git a/resources/Schema/Entities/ServerIdentity.xml b/resources/Schema/Entities/ServerIdentity.xml new file mode 100644 index 00000000..ca803c34 --- /dev/null +++ b/resources/Schema/Entities/ServerIdentity.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + 0.0.0.0 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + IP + + + + + + + + + + + 0 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + Port + + + + + + + + + + + UnkownServer + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + ServerName + + + + + + + + + 0 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + PlayersConnected + + + + + + + + + + diff --git a/resources/Schema/Entities/ServerList.xml b/resources/Schema/Entities/ServerList.xml new file mode 100644 index 00000000..be16fa16 --- /dev/null +++ b/resources/Schema/Entities/ServerList.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Textures/Icons/rotate.png + + + + + + + + + + + + + + + diff --git a/resources/Schema/Types/Entity.xsd b/resources/Schema/Types/Entity.xsd index 4865b936..ec5dba58 100644 --- a/resources/Schema/Types/Entity.xsd +++ b/resources/Schema/Types/Entity.xsd @@ -68,6 +68,8 @@ + + diff --git a/src/Engine/GUI/MainMenuSystem.cpp b/src/Engine/GUI/MainMenuSystem.cpp index f8bf032b..c37aabc1 100644 --- a/src/Engine/GUI/MainMenuSystem.cpp +++ b/src/Engine/GUI/MainMenuSystem.cpp @@ -27,15 +27,12 @@ bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e) printf("No, you stay"); } else if (e.EntityName == "Res1080") { glfwSetWindowSize(m_Renderer->Window(), 1920, 1080); - printf("\n1080"); } else if (e.EntityName == "Res720") { glfwSetWindowSize(m_Renderer->Window(), 1280, 720); glViewport(0, 0, 1280, 720); - printf("\n720"); } else if (e.EntityName == "Res480") { glfwSetWindowSize(m_Renderer->Window(), 854, 480); glViewport(0, 0, 854, 480); - printf("\n480"); } else if (e.EntityName == "FullScreen") { printf("No fullscreen for now"); } diff --git a/src/Engine/Rendering/BlurHUD.cpp b/src/Engine/Rendering/BlurHUD.cpp index 4787510b..422b9ec4 100644 --- a/src/Engine/Rendering/BlurHUD.cpp +++ b/src/Engine/Rendering/BlurHUD.cpp @@ -126,19 +126,19 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) state.Disable(GL_DEPTH_TEST); state.Disable(GL_CULL_FACE); - GLuint shaderHandle_horiz = m_GaussianProgram_horiz->GetHandle(); - GLuint shaderHandle_vert = m_GaussianProgram_vert->GetHandle(); - - - - //Horizontal pass, first use the given texture then save it to the horizontal framebuffer. - m_GaussianFrameBuffer_horiz.Bind(); state.Enable(GL_STENCIL_TEST); state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); state.StencilFunc(GL_EQUAL, 1, 0xFF); state.StencilMask(0x00); state.DepthMask(GL_FALSE); state.Enable(GL_SCISSOR_TEST); + + GLuint shaderHandle_horiz = m_GaussianProgram_horiz->GetHandle(); + GLuint shaderHandle_vert = m_GaussianProgram_vert->GetHandle(); + + //Horizontal pass, first use the given texture then save it to the horizontal framebuffer. + m_GaussianFrameBuffer_horiz.Bind(); + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); @@ -153,13 +153,6 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) for (int i = 1; i < m_Iterations; i++) { //Vertical pass m_GaussianFrameBuffer_vert.Bind(); - state.Enable(GL_STENCIL_TEST); - state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - state.StencilFunc(GL_EQUAL, 1, 0xFF); - state.StencilMask(0x00); - state.DepthMask(GL_FALSE); - glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); - glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); m_GaussianProgram_vert->Bind(); glActiveTexture(GL_TEXTURE0); @@ -171,15 +164,7 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); //horizontal pass m_GaussianFrameBuffer_vert.Unbind(); - m_GaussianFrameBuffer_horiz.Bind(); - state.Enable(GL_STENCIL_TEST); - state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - state.StencilFunc(GL_EQUAL, 1, 0xFF); - state.StencilMask(0x00); - state.DepthMask(GL_FALSE); - glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); - glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); m_GaussianProgram_horiz->Bind(); glActiveTexture(GL_TEXTURE0); @@ -195,13 +180,6 @@ GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) //final vertical gaussian after the iterations are done m_GaussianFrameBuffer_vert.Bind(); - state.Enable(GL_STENCIL_TEST); - state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - state.StencilFunc(GL_EQUAL, 1, 0xFF); - state.StencilMask(0x00); - state.DepthMask(GL_FALSE); - glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); - glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); m_GaussianProgram_vert->Bind(); glActiveTexture(GL_TEXTURE0); From e43a7be7dbca8d26dbf43cde5b86cb39126c426f Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Tue, 8 Mar 2016 15:55:51 +0100 Subject: [PATCH 26/40] DamageIndicatorSystem now works for singleplayer again. Friendly fire DamageIndicator is now black color. --- include/Game/Systems/DamageIndicatorSystem.h | 3 +++ src/Game/Systems/DamageIndicatorSystem.cpp | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/Game/Systems/DamageIndicatorSystem.h b/include/Game/Systems/DamageIndicatorSystem.h index 9c88ba78..f3a95817 100644 --- a/include/Game/Systems/DamageIndicatorSystem.h +++ b/include/Game/Systems/DamageIndicatorSystem.h @@ -15,6 +15,7 @@ #include "Rendering/Util/CommonFunctions.h" //#define INDICATOR_TEST +#include "Core/ConfigFile.h" class DamageIndicatorSystem : public ImpureSystem { @@ -40,6 +41,8 @@ private: std::vector updateDamageIndicatorVector; float CalculateAngle(EntityWrapper player, glm::vec3 enemyPos); + bool m_NetworkEnabled; + //for tests #ifdef INDICATOR_TEST glm::vec3 DamageIndicatorTest(EntityWrapper player); diff --git a/src/Game/Systems/DamageIndicatorSystem.cpp b/src/Game/Systems/DamageIndicatorSystem.cpp index e68f741d..0cc3e717 100644 --- a/src/Game/Systems/DamageIndicatorSystem.cpp +++ b/src/Game/Systems/DamageIndicatorSystem.cpp @@ -10,10 +10,11 @@ DamageIndicatorSystem::DamageIndicatorSystem(SystemParams params) //load texture to cache auto texture = CommonFunctions::LoadTexture("Textures/DamageIndicator.png", false); auto entityFile = ResourceManager::Load("Schema/Entities/DamageIndicator.xml"); + m_NetworkEnabled = ResourceManager::Load("Config.ini")->Get("Networking.StartNetwork", false); } void DamageIndicatorSystem::Update(double dt) { - if (!IsServer && LocalPlayer.Valid()) { + if ((!IsServer || !m_NetworkEnabled) && LocalPlayer.Valid()) { for (auto& iter = updateDamageIndicatorVector.begin(); iter != updateDamageIndicatorVector.end(); iter++) { if (!iter->spriteEntity.Valid()) { updateDamageIndicatorVector.erase(iter); @@ -43,7 +44,7 @@ bool DamageIndicatorSystem::OnPlayerDamage(Events::PlayerDamage& e) glm::vec3 inflictorPos = e.Inflictor["Transform"]["Position"]; //if testing #ifdef INDICATOR_TEST - inflictorPos = DamageIndicatorTest(e.Victim); + inflictorPos = DamageIndicatorTest(e.Victim); #endif float angleBetweenVectors = CalculateAngle(e.Victim, inflictorPos); @@ -54,8 +55,12 @@ bool DamageIndicatorSystem::OnPlayerDamage(Events::PlayerDamage& e) m_World->SetParent(sprite.ID, m_CurrentCamera); //simply set the rotation z-wise to the angleBetweenVectors sprite["Transform"]["Orientation"] = glm::vec3(0, 0, angleBetweenVectors); + //friendly fire - change color of the marker + if (e.Damage < 0.1f) { + sprite["Sprite"]["Color"] = glm::vec4(0.0, 1.0f, 1.0f, 1.0f); + } - if (!IsServer) { + if (!IsServer || !m_NetworkEnabled) { updateDamageIndicatorVector.emplace_back(sprite, inflictorPos); } @@ -122,7 +127,7 @@ glm::vec3 DamageIndicatorSystem::DamageIndicatorTest(EntityWrapper player) { } m_TestVar++; - auto inflictorPos = glm::vec3(currentPos.x + testVar*6.0f, currentPos.y, currentPos.z + testVar2*6.0f); + auto inflictorPos = glm::vec3(currentPos.x + testVar*6.0f, currentPos.y, currentPos.z + testVar2*6.0f); //load the explosioneffect XML auto deathEffect = ResourceManager::Load("Schema/Entities/PlayerDeathExplosionWithCamera.xml"); From f8ab52c72c6685b0456f1b828a1098f143395c9a Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 8 Mar 2016 16:15:54 +0100 Subject: [PATCH 27/40] WIP --- include/Engine/GUI/MainMenuSystem.h | 6 ++ include/Game/Systems/MainMenuSystem.h | 40 +++++++++ resources/Schema/Entities/MainMenu.xml | 84 +++++++++---------- .../GUI => Game/Systems}/MainMenuSystem.cpp | 34 +++++++- 4 files changed, 120 insertions(+), 44 deletions(-) create mode 100644 include/Game/Systems/MainMenuSystem.h rename src/{Engine/GUI => Game/Systems}/MainMenuSystem.cpp (53%) diff --git a/include/Engine/GUI/MainMenuSystem.h b/include/Engine/GUI/MainMenuSystem.h index ba69ff0d..7fb65828 100644 --- a/include/Engine/GUI/MainMenuSystem.h +++ b/include/Engine/GUI/MainMenuSystem.h @@ -5,11 +5,13 @@ #include "../Rendering/IRenderer.h" #include "../Core/ResourceManager.h" #include "../Core/Event.h" +#include "Systems/SpawnerSystem.h" #include "EButtonClicked.h" #include "EButtonPressed.h" #include "EButtonReleased.h" +#include "../Input/EInputCommand.h" class MainMenuSystem : public ImpureSystem @@ -27,6 +29,10 @@ private: bool OnButtonRelease(const Events::ButtonReleased& e); EventRelay m_EPressed; bool OnButtonPress(const Events::ButtonPressed& e); + EventRelay m_EInputCommand; + bool OnInputCommand(const Events::InputCommand& e); + + std::string m_CurrentCommand = ""; }; diff --git a/include/Game/Systems/MainMenuSystem.h b/include/Game/Systems/MainMenuSystem.h new file mode 100644 index 00000000..2e13b557 --- /dev/null +++ b/include/Game/Systems/MainMenuSystem.h @@ -0,0 +1,40 @@ +#ifndef MainMenuSystem_h__ +#define MainMenuSystem_h__ + +#include "Core/System.h" +#include "Rendering/IRenderer.h" +#include "Core/ResourceManager.h" +#include "Core/Event.h" +#include "Systems/SpawnerSystem.h" + + +#include "GUI/EButtonClicked.h" +#include "GUI/EButtonPressed.h" +#include "GUI/EButtonReleased.h" +#include "Input/EInputCommand.h" + + +class MainMenuSystem : public ImpureSystem +{ +public: + MainMenuSystem(SystemParams params, IRenderer* renderer); + virtual void Update(double dt) override; + +private: + IRenderer* m_Renderer; + + EventRelay m_EClicked; + bool OnButtonClick(const Events::ButtonClicked& e); + EventRelay m_EReleased; + bool OnButtonRelease(const Events::ButtonReleased& e); + EventRelay m_EPressed; + bool OnButtonPress(const Events::ButtonPressed& e); + EventRelay m_EInputCommand; + bool OnInputCommand(const Events::InputCommand& e); + + std::string m_CurrentCommand = ""; + EntityWrapper m_OpenSubMenu = EntityWrapper::Invalid; + +}; + +#endif \ No newline at end of file diff --git a/resources/Schema/Entities/MainMenu.xml b/resources/Schema/Entities/MainMenu.xml index 47292c30..cefb25e2 100644 --- a/resources/Schema/Entities/MainMenu.xml +++ b/resources/Schema/Entities/MainMenu.xml @@ -17,6 +17,47 @@ + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Credits + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + @@ -101,47 +142,6 @@ - - - - - - - - - - - - Textures/Core/White.png - true - - - - - - - - - - - - - Credits - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - @@ -192,7 +192,7 @@ - + Schema/Entities/ServerList.xml diff --git a/src/Engine/GUI/MainMenuSystem.cpp b/src/Game/Systems/MainMenuSystem.cpp similarity index 53% rename from src/Engine/GUI/MainMenuSystem.cpp rename to src/Game/Systems/MainMenuSystem.cpp index c37aabc1..14cf7e26 100644 --- a/src/Engine/GUI/MainMenuSystem.cpp +++ b/src/Game/Systems/MainMenuSystem.cpp @@ -1,4 +1,4 @@ -#include "GUI/MainMenuSystem.h" +#include "../Game/Systems/MainMenuSystem.h" MainMenuSystem::MainMenuSystem(SystemParams params, IRenderer* renderer) : System(params) @@ -8,6 +8,7 @@ MainMenuSystem::MainMenuSystem(SystemParams params, IRenderer* renderer) EVENT_SUBSCRIBE_MEMBER(m_EPressed, &MainMenuSystem::OnButtonPress); EVENT_SUBSCRIBE_MEMBER(m_EReleased, &MainMenuSystem::OnButtonRelease); EVENT_SUBSCRIBE_MEMBER(m_EClicked, &MainMenuSystem::OnButtonClick); + EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &MainMenuSystem::OnInputCommand); } void MainMenuSystem::Update(double dt) @@ -18,7 +19,8 @@ void MainMenuSystem::Update(double dt) bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e) { if(e.EntityName == "Play") { - //Run play code + //OpenServerList + } else if(e.EntityName == "Connect") { //Run connect code } else if(e.EntityName == "Host") { @@ -52,3 +54,31 @@ bool MainMenuSystem::OnButtonPress(const Events::ButtonPressed& e) return true; } +bool MainMenuSystem::OnInputCommand(const Events::InputCommand& e) +{ + if(e.Command == "Play") { + if (m_OpenSubMenu == EntityWrapper::Invalid) { + //No submenu is open, open one. + + } else if(!m_OpenSubMenu.HasComponent("ServerList")) { + //Menu is open, but not the right one, delete the old one and open a new one. + + } else { + //Serverlist submenu is open, close it. + } + //Create new entity through the spawner. Should also despawn all other menus. + auto menus = m_World->GetComponents("Menu"); + if(menus == nullptr) { + return 0; + } + for (auto& menu : *menus) { + EntityWrapper menuEntity = EntityWrapper(m_World, menu.EntityID); + auto serverListSpawner = menuEntity.FirstChildByName(e.Command + "Spawner"); + if(!serverListSpawner.HasComponent("Spawner")) { + return 0; + } + m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + } + } + return true; +} \ No newline at end of file From 52d3cb3ebf3e09d0fa70be0e5b9d8b8a8d7c9233 Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Tue, 8 Mar 2016 16:33:08 +0100 Subject: [PATCH 28/40] GetPlayerAmmo is now a SetPlayerAmmo instead to fix some potential problems if the player has no weapon at all --- include/Game/Systems/AmmoPickupSystem.h | 2 +- src/Game/Systems/AmmoPickupSystem.cpp | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/Game/Systems/AmmoPickupSystem.h b/include/Game/Systems/AmmoPickupSystem.h index d34427e3..1e61dd32 100644 --- a/include/Game/Systems/AmmoPickupSystem.h +++ b/include/Game/Systems/AmmoPickupSystem.h @@ -50,7 +50,7 @@ private: //helper methods bool DoesPlayerHaveMaxAmmo(EntityWrapper &player); PlayerClass DetermineClass(EntityWrapper &player); - int& GetPlayerAmmo(EntityWrapper &player); + void SetPlayerAmmo(EntityWrapper &player, int ammoGain); int GetPlayerMaxAmmo(EntityWrapper &player); }; #endif diff --git a/src/Game/Systems/AmmoPickupSystem.cpp b/src/Game/Systems/AmmoPickupSystem.cpp index 21101b69..ea4561c6 100644 --- a/src/Game/Systems/AmmoPickupSystem.cpp +++ b/src/Game/Systems/AmmoPickupSystem.cpp @@ -67,16 +67,18 @@ bool AmmoPickupSystem::DoesPlayerHaveMaxAmmo(EntityWrapper &player) { return false; } } -int& AmmoPickupSystem::GetPlayerAmmo(EntityWrapper &player) { +void AmmoPickupSystem::SetPlayerAmmo(EntityWrapper &player, int ammoGain) { + int maxWeaponAmmo = GetPlayerMaxAmmo(player); + PlayerClass playerClass = DetermineClass(player); if (playerClass == PlayerClass::Defender) { - return (int)player["DefenderWeapon"]["Ammo"]; + (int&)player["DefenderWeapon"]["Ammo"] = std::min((int)player["DefenderWeapon"]["Ammo"] + ammoGain, maxWeaponAmmo); } else if (playerClass == PlayerClass::Sniper) { - return (int)player["SniperWeapon"]["Ammo"]; + (int&)player["SniperWeapon"]["Ammo"] = std::min((int)player["SniperWeapon"]["Ammo"] + ammoGain, maxWeaponAmmo); } else if (playerClass == PlayerClass::Assault) { - return (int)player["AssaultWeapon"]["Ammo"]; + (int&)player["AssaultWeapon"]["Ammo"] = std::min((int)player["AssaultWeapon"]["Ammo"] + ammoGain, maxWeaponAmmo); } else { - //TODO: should really return something here + //unknown class - ignore } } int AmmoPickupSystem::GetPlayerMaxAmmo(EntityWrapper &player) { @@ -141,12 +143,9 @@ bool AmmoPickupSystem::OnAmmoPickup(Events::AmmoPickup & e) if (DoesPlayerHaveMaxAmmo(e.Player)) { return false; } - int maxWeaponAmmo = GetPlayerMaxAmmo(e.Player); - int& currentAmmo = GetPlayerAmmo(e.Player); + SetPlayerAmmo(e.Player, e.AmmoGain); - currentAmmo = std::min(currentAmmo + e.AmmoGain, maxWeaponAmmo); - - return false; + return true; } bool AmmoPickupSystem::OnTriggerLeave(Events::TriggerLeave& e) { From ba9208085b4212c9c6d59989ac5a57bdd2113356 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 8 Mar 2016 16:52:56 +0100 Subject: [PATCH 29/40] WIP --- include/Game/Systems/ServerListSystem.h | 22 ++++++++++++ resources/Schema/Entities/ServerList.xml | 2 +- src/Game/Game.cpp | 2 +- src/Game/Systems/MainMenuSystem.cpp | 44 ++++++++++++++++-------- src/Game/Systems/ServerListSystem.cpp | 19 ++++++++++ 5 files changed, 73 insertions(+), 16 deletions(-) create mode 100644 include/Game/Systems/ServerListSystem.h create mode 100644 src/Game/Systems/ServerListSystem.cpp diff --git a/include/Game/Systems/ServerListSystem.h b/include/Game/Systems/ServerListSystem.h new file mode 100644 index 00000000..a0d8b99b --- /dev/null +++ b/include/Game/Systems/ServerListSystem.h @@ -0,0 +1,22 @@ +#ifndef ServerListSystem_h__ +#define ServerListSystem_h__ + +#include "Core/System.h" +#include "Rendering/IRenderer.h" +#include "Core/ResourceManager.h" +#include "Core/Event.h" +#include "Systems/SpawnerSystem.h" + +class ServerListSystem : public PureSystem +{ +public: + ServerListSystem(SystemParams params, IRenderer* renderer); + virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cServerList, double dt) override; + + void RefreshList(); + +private: + IRenderer* m_Renderer; +}; + +#endif \ No newline at end of file diff --git a/resources/Schema/Entities/ServerList.xml b/resources/Schema/Entities/ServerList.xml index be16fa16..90773f90 100644 --- a/resources/Schema/Entities/ServerList.xml +++ b/resources/Schema/Entities/ServerList.xml @@ -2,7 +2,7 @@ - + diff --git a/src/Game/Game.cpp b/src/Game/Game.cpp index 8f589e34..2897e0d7 100644 --- a/src/Game/Game.cpp +++ b/src/Game/Game.cpp @@ -36,7 +36,7 @@ #include "Game/Systems/BoostIconsHUDSystem.h" #include "Game/Systems/ScoreScreenSystem.h" #include "GUI/ButtonSystem.h" -#include "GUI/MainMenuSystem.h" +#include "Game/Systems/MainMenuSystem.h" Game::Game(int argc, char* argv[]) diff --git a/src/Game/Systems/MainMenuSystem.cpp b/src/Game/Systems/MainMenuSystem.cpp index 14cf7e26..ce95e280 100644 --- a/src/Game/Systems/MainMenuSystem.cpp +++ b/src/Game/Systems/MainMenuSystem.cpp @@ -56,28 +56,44 @@ bool MainMenuSystem::OnButtonPress(const Events::ButtonPressed& e) bool MainMenuSystem::OnInputCommand(const Events::InputCommand& e) { - if(e.Command == "Play") { + if(e.Command == "Play" && e.Value == 1) { + auto menus = m_World->GetComponents("Menu"); + if (menus == nullptr) { + return 0; + } + if (m_OpenSubMenu == EntityWrapper::Invalid) { //No submenu is open, open one. + for (auto& menu : *menus) { + EntityWrapper menuEntity = EntityWrapper(m_World, menu.EntityID); + auto serverListSpawner = menuEntity.FirstChildByName(e.Command + "Spawner"); + if (!serverListSpawner.HasComponent("Spawner")) { + return 0; + } + m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + break; + } } else if(!m_OpenSubMenu.HasComponent("ServerList")) { //Menu is open, but not the right one, delete the old one and open a new one. + m_World->DeleteEntity(m_OpenSubMenu.ID); + m_OpenSubMenu = EntityWrapper::Invalid; + + for (auto& menu : *menus) { + EntityWrapper menuEntity = EntityWrapper(m_World, menu.EntityID); + auto serverListSpawner = menuEntity.FirstChildByName(e.Command + "Spawner"); + if (!serverListSpawner.HasComponent("Spawner")) { + return 0; + } + m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + } + } else { //Serverlist submenu is open, close it. - } - //Create new entity through the spawner. Should also despawn all other menus. - auto menus = m_World->GetComponents("Menu"); - if(menus == nullptr) { - return 0; - } - for (auto& menu : *menus) { - EntityWrapper menuEntity = EntityWrapper(m_World, menu.EntityID); - auto serverListSpawner = menuEntity.FirstChildByName(e.Command + "Spawner"); - if(!serverListSpawner.HasComponent("Spawner")) { - return 0; - } - m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + printf("\n\nMenuShit\n\n"); + m_World->DeleteEntity(m_OpenSubMenu.ID); + m_OpenSubMenu = EntityWrapper::Invalid; } } return true; diff --git a/src/Game/Systems/ServerListSystem.cpp b/src/Game/Systems/ServerListSystem.cpp new file mode 100644 index 00000000..3d79a7b0 --- /dev/null +++ b/src/Game/Systems/ServerListSystem.cpp @@ -0,0 +1,19 @@ +#include "../Game/Systems/ServerListSystem.h" + +ServerListSystem::ServerListSystem(SystemParams params, IRenderer* renderer) + : System(params) + , PureSystem("ServerList") + , m_Renderer(renderer) +{ + +} + +void ServerListSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cServerList, double dt) +{ + +} + +void ServerListSystem::RefreshList() +{ + +} From 1d8b5abfde470f952630cf6153b809d78187e050 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 8 Mar 2016 16:53:35 +0100 Subject: [PATCH 30/40] Fuck aff --- include/Engine/GUI/MainMenuSystem.h | 39 ----------------------------- 1 file changed, 39 deletions(-) delete mode 100644 include/Engine/GUI/MainMenuSystem.h diff --git a/include/Engine/GUI/MainMenuSystem.h b/include/Engine/GUI/MainMenuSystem.h deleted file mode 100644 index 7fb65828..00000000 --- a/include/Engine/GUI/MainMenuSystem.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef MainMenuSystem_h__ -#define MainMenuSystem_h__ - -#include "../Core/System.h" -#include "../Rendering/IRenderer.h" -#include "../Core/ResourceManager.h" -#include "../Core/Event.h" -#include "Systems/SpawnerSystem.h" - - -#include "EButtonClicked.h" -#include "EButtonPressed.h" -#include "EButtonReleased.h" -#include "../Input/EInputCommand.h" - - -class MainMenuSystem : public ImpureSystem -{ -public: - MainMenuSystem(SystemParams params, IRenderer* renderer); - virtual void Update(double dt) override; - -private: - IRenderer* m_Renderer; - - EventRelay m_EClicked; - bool OnButtonClick(const Events::ButtonClicked& e); - EventRelay m_EReleased; - bool OnButtonRelease(const Events::ButtonReleased& e); - EventRelay m_EPressed; - bool OnButtonPress(const Events::ButtonPressed& e); - EventRelay m_EInputCommand; - bool OnInputCommand(const Events::InputCommand& e); - - std::string m_CurrentCommand = ""; - -}; - -#endif \ No newline at end of file From 3394d650556f3b773d1ada5af0a6596a08a42c40 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 8 Mar 2016 18:13:21 +0100 Subject: [PATCH 31/40] Servers now show up in the server list. --- include/Game/Systems/MainMenuSystem.h | 1 + include/Game/Systems/ServerListSystem.h | 6 ++-- resources/Schema/Components/ServerList.xml | 4 +-- resources/Schema/Entities/ServerIdentity.xml | 10 +++--- resources/Schema/Entities/ServerList.xml | 25 +++++++++++-- src/Game/Game.cpp | 2 ++ src/Game/Systems/MainMenuSystem.cpp | 10 ++++-- src/Game/Systems/ServerListSystem.cpp | 37 ++++++++++++++++++-- 8 files changed, 80 insertions(+), 15 deletions(-) diff --git a/include/Game/Systems/MainMenuSystem.h b/include/Game/Systems/MainMenuSystem.h index 2e13b557..c62e98c5 100644 --- a/include/Game/Systems/MainMenuSystem.h +++ b/include/Game/Systems/MainMenuSystem.h @@ -12,6 +12,7 @@ #include "GUI/EButtonPressed.h" #include "GUI/EButtonReleased.h" #include "Input/EInputCommand.h" +#include "Network/ESearchForServers.h" class MainMenuSystem : public ImpureSystem diff --git a/include/Game/Systems/ServerListSystem.h b/include/Game/Systems/ServerListSystem.h index 6fbb954d..014c8881 100644 --- a/include/Game/Systems/ServerListSystem.h +++ b/include/Game/Systems/ServerListSystem.h @@ -6,8 +6,10 @@ #include "Core/ResourceManager.h" #include "Core/Event.h" #include "Systems/SpawnerSystem.h" +#include "Core/EventBroker.h" #include "Network/ESearchForServers.h" +#include "Network/EDisplayServerlist.h" class ServerListSystem : public PureSystem { @@ -20,8 +22,8 @@ public: private: IRenderer* m_Renderer; - //EventRelay m_EServerListRecieved; - //bool OnServerListRecieved(const Events::SomeEventLol& e) + EventRelay m_EServerListRecieved; + bool OnServerListRecieved(const Events::DisplayServerlist& e); }; #endif \ No newline at end of file diff --git a/resources/Schema/Components/ServerList.xml b/resources/Schema/Components/ServerList.xml index d3571d07..e4dbfcad 100644 --- a/resources/Schema/Components/ServerList.xml +++ b/resources/Schema/Components/ServerList.xml @@ -1,6 +1,6 @@ - + 0 0 - \ No newline at end of file + \ No newline at end of file diff --git a/resources/Schema/Entities/ServerIdentity.xml b/resources/Schema/Entities/ServerIdentity.xml index ca803c34..5e94b7b5 100644 --- a/resources/Schema/Entities/ServerIdentity.xml +++ b/resources/Schema/Entities/ServerIdentity.xml @@ -23,7 +23,7 @@ IP - + @@ -44,7 +44,7 @@ Port - + @@ -64,7 +64,9 @@ ServerIdentity ServerName - + + + @@ -84,7 +86,7 @@ PlayersConnected - + diff --git a/resources/Schema/Entities/ServerList.xml b/resources/Schema/Entities/ServerList.xml index 90773f90..f3a7da68 100644 --- a/resources/Schema/Entities/ServerList.xml +++ b/resources/Schema/Entities/ServerList.xml @@ -2,7 +2,9 @@ - + + + @@ -10,10 +12,23 @@ - + - + + + + + Schema/Entities/ServerIdentity.xml + + + + + + + + + @@ -38,6 +53,10 @@ + + RefreshServerList + 1 + diff --git a/src/Game/Game.cpp b/src/Game/Game.cpp index a40b13c6..81d6392f 100644 --- a/src/Game/Game.cpp +++ b/src/Game/Game.cpp @@ -37,6 +37,7 @@ #include "Game/Systems/ScoreScreenSystem.h" #include "GUI/ButtonSystem.h" #include "Game/Systems/MainMenuSystem.h" +#include "Game/Systems/ServerListSystem.h" Game::Game(int argc, char* argv[]) @@ -149,6 +150,7 @@ Game::Game(int argc, char* argv[]) m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); + m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); // Populate Octree with collidables ++updateOrderLevel; m_SystemPipeline->AddSystem(updateOrderLevel, m_OctreeCollision, "Collidable"); diff --git a/src/Game/Systems/MainMenuSystem.cpp b/src/Game/Systems/MainMenuSystem.cpp index ce95e280..0540485f 100644 --- a/src/Game/Systems/MainMenuSystem.cpp +++ b/src/Game/Systems/MainMenuSystem.cpp @@ -71,6 +71,8 @@ bool MainMenuSystem::OnInputCommand(const Events::InputCommand& e) return 0; } m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + Events::SearchForServers event; + m_EventBroker->Publish(event); break; } @@ -86,15 +88,19 @@ bool MainMenuSystem::OnInputCommand(const Events::InputCommand& e) return 0; } m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + Events::SearchForServers event; + m_EventBroker->Publish(event); + break; } - - } else { //Serverlist submenu is open, close it. printf("\n\nMenuShit\n\n"); m_World->DeleteEntity(m_OpenSubMenu.ID); m_OpenSubMenu = EntityWrapper::Invalid; } + } else if (e.Command == "RefreshServerList" && e.Value == 1){ + Events::SearchForServers event; + m_EventBroker->Publish(event); } return true; } \ No newline at end of file diff --git a/src/Game/Systems/ServerListSystem.cpp b/src/Game/Systems/ServerListSystem.cpp index 6b3efccf..f2813b64 100644 --- a/src/Game/Systems/ServerListSystem.cpp +++ b/src/Game/Systems/ServerListSystem.cpp @@ -5,7 +5,7 @@ ServerListSystem::ServerListSystem(SystemParams params, IRenderer* renderer) , PureSystem("ServerList") , m_Renderer(renderer) { - //Subscribe to OnServerListRecieved + EVENT_SUBSCRIBE_MEMBER(m_EServerListRecieved, &ServerListSystem::OnServerListRecieved); } void ServerListSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cServerList, double dt) @@ -15,6 +15,39 @@ void ServerListSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& void ServerListSystem::RefreshList() { - //Send out request for a server list. + Events::SearchForServers event; + m_EventBroker->Publish(event); } + +bool ServerListSystem::OnServerListRecieved(const Events::DisplayServerlist& e) +{ + if (e.Serverlist.size() == 0) { + return 1; + } + auto serverLists = m_World->GetComponents("ServerList"); + if (serverLists == nullptr) + return 1; + for (auto& cServerList : *serverLists) { + EntityWrapper serverListEntity = EntityWrapper(m_World, cServerList.EntityID); + EntityWrapper identitySpawner = serverListEntity.FirstChildByName("ServerIdentitySpawner"); + identitySpawner.DeleteChildren(); + + (int&)cServerList["TotalIdentities"] = (int)e.Serverlist.size(); + for (int i = 0; i < e.Serverlist.size(); i++) { + //Create Identities for each server and place them on the right position. + EntityWrapper newIdentity = SpawnerSystem::Spawn(identitySpawner, identitySpawner); + + glm::vec3 offset = (glm::vec3)serverListEntity["ServerList"]["Offset"]; + (glm::vec3&)newIdentity["Transform"]["Position"] = offset * (float)i; + + auto& cIdentity = newIdentity["ServerIdentity"]; + (std::string&)cIdentity["IP"] = e.Serverlist[i].Address; + (std::string&)cIdentity["ServerName"] = e.Serverlist[i].Name; + (int&)cIdentity["Port"] = e.Serverlist[i].Port; + (int&)cIdentity["PlayersConnected"] = e.Serverlist[i].PlayersConnected; + } + } + + return 1; +} From 7bc3c9f7b17a3a89e8a09dc8b27a1124b45a24b6 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Tue, 8 Mar 2016 18:26:17 +0100 Subject: [PATCH 32/40] Don't force to spectator camera if player presses pickTeam/Class prematurely. Players team should be remembered after picked, spawn request is not erased anymore. --- include/Game/Systems/PlayerDeathSystem.h | 2 ++ src/Game/Systems/PlayerDeathSystem.cpp | 12 ++++++++++++ src/Game/Systems/PlayerSpawnSystem.cpp | 12 ++++-------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/include/Game/Systems/PlayerDeathSystem.h b/include/Game/Systems/PlayerDeathSystem.h index 5a82f999..91b9997b 100644 --- a/include/Game/Systems/PlayerDeathSystem.h +++ b/include/Game/Systems/PlayerDeathSystem.h @@ -24,6 +24,8 @@ private: bool OnPlayerDeath(Events::PlayerDeath& e); EventRelay m_EEntityDeleted; bool OnEntityDeleted(Events::EntityDeleted& e); + EventRelay m_EInputCommand; + bool OnInputCommand(Events::InputCommand& e); void setSpectatorCamera(); void createDeathEffect(EntityWrapper player); diff --git a/src/Game/Systems/PlayerDeathSystem.cpp b/src/Game/Systems/PlayerDeathSystem.cpp index c562e530..4b7606e7 100644 --- a/src/Game/Systems/PlayerDeathSystem.cpp +++ b/src/Game/Systems/PlayerDeathSystem.cpp @@ -6,6 +6,7 @@ PlayerDeathSystem::PlayerDeathSystem(SystemParams params) { EVENT_SUBSCRIBE_MEMBER(m_OnPlayerDeath, &PlayerDeathSystem::OnPlayerDeath); EVENT_SUBSCRIBE_MEMBER(m_EEntityDeleted, &PlayerDeathSystem::OnEntityDeleted); + EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &PlayerDeathSystem::OnInputCommand); } void PlayerDeathSystem::Update(double dt) @@ -90,3 +91,14 @@ void PlayerDeathSystem::setSpectatorCamera() Events::UnlockMouse unlock; m_EventBroker->Publish(unlock); } + +bool PlayerDeathSystem::OnInputCommand(Events::InputCommand& e) +{ + if (e.Value == 0 || e.Command != "SwapToTeamPick" && e.Command != "SwapToClassPick") { + return false; + } + + // Ensure that we don't set spectator camera if the player deliberately changes to class/team pick. + m_LocalPlayerDeathEffect = EntityWrapper::Invalid; + return true; +} \ No newline at end of file diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index e13f1bdc..0c0c60a1 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -134,16 +134,12 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) auto iter = m_SpawnRequests.begin(); for (; iter != m_SpawnRequests.end(); ++iter) { if (iter->PlayerID == e.PlayerID) { - // If player wants to switch team, remove their spawn request. - if (e.Command == "SwapToTeamPick") { - m_SpawnRequests.erase(iter); - } else if (e.Command == "SwapToClassPick") { - // If player wants to switch class, remove their selected class so they don't spawn. + // If player wants to switch team or class , remove their selected class so they don't spawn. + if (e.Command == "SwapToTeamPick" || e.Command == "SwapToClassPick") { iter->Class = -1; - } else { - break; + return true; } - return true; + break; } } From 95f68cc888feea74f20ae51d65712102357b5263 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 8 Mar 2016 22:24:32 +0100 Subject: [PATCH 33/40] ConnectRequest event and some other shit --- include/Engine/Network/EConnectRequest.h | 17 + include/Game/Systems/MainMenuSystem.h | 1 + .../Schema/Components/ServerIdentity.xml | 4 +- .../Schema/Entities/NewMapWSpectatorCam.xml | 3142 +++++++++-------- .../Schema/Entities/QualityAssurance.xml | 62 +- resources/Schema/Entities/ServerIdentity.xml | 192 +- resources/Schema/Entities/ServerList.xml | 6 +- src/Game/Systems/MainMenuSystem.cpp | 31 +- 8 files changed, 1753 insertions(+), 1702 deletions(-) create mode 100644 include/Engine/Network/EConnectRequest.h diff --git a/include/Engine/Network/EConnectRequest.h b/include/Engine/Network/EConnectRequest.h new file mode 100644 index 00000000..b6bf781b --- /dev/null +++ b/include/Engine/Network/EConnectRequest.h @@ -0,0 +1,17 @@ +#ifndef Events_ConnectRequest_h__ +#define Events_ConnectRequest_h__ + +#include "Core/EventBroker.h" + +namespace Events +{ + +struct ConnectRequest : public Event +{ + std::string IP = ""; + int Port = 0; +}; + +} +#endif + diff --git a/include/Game/Systems/MainMenuSystem.h b/include/Game/Systems/MainMenuSystem.h index c62e98c5..ddefcbf4 100644 --- a/include/Game/Systems/MainMenuSystem.h +++ b/include/Game/Systems/MainMenuSystem.h @@ -13,6 +13,7 @@ #include "GUI/EButtonReleased.h" #include "Input/EInputCommand.h" #include "Network/ESearchForServers.h" +#include "Network/EConnectRequest.h" class MainMenuSystem : public ImpureSystem diff --git a/resources/Schema/Components/ServerIdentity.xml b/resources/Schema/Components/ServerIdentity.xml index b14a309c..1d44e690 100644 --- a/resources/Schema/Components/ServerIdentity.xml +++ b/resources/Schema/Components/ServerIdentity.xml @@ -1,7 +1,7 @@ - 0.0.0.0 - 0 + 123.123.123.123 + 65999 UnkownServer 0 \ No newline at end of file diff --git a/resources/Schema/Entities/NewMapWSpectatorCam.xml b/resources/Schema/Entities/NewMapWSpectatorCam.xml index 395eb1de..4223909f 100644 --- a/resources/Schema/Entities/NewMapWSpectatorCam.xml +++ b/resources/Schema/Entities/NewMapWSpectatorCam.xml @@ -3,7 +3,7 @@ - 15 + 2.2834371376129923 @@ -23,6 +23,18 @@ + + + + + Models/Props/Highground2.mesh + + + + + + + @@ -75,18 +87,6 @@ - - - - - Models/Props/Highground2.mesh - - - - - - - @@ -1843,6 +1843,1006 @@ + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + @@ -3229,88 +4229,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - @@ -3366,6 +4284,60 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + @@ -3380,6 +4352,34 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + @@ -3396,1011 +4396,24 @@ - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + @@ -4479,19 +4492,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -4519,35 +4519,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - + + @@ -4574,36 +4547,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - + + @@ -4629,36 +4574,8 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - + + @@ -4677,47 +4594,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -4732,6 +4608,130 @@ + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + @@ -4750,42 +4750,240 @@ - + - - 10 - + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + - + + + - - 1 - - + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + - - 10 - + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + - + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + + @@ -4809,6 +5007,15 @@ + + + + 1 + + + + + @@ -4820,6 +5027,28 @@ + + + + 10 + + + + + + + + + + + 10 + + + + + + + @@ -4833,76 +5062,6 @@ - - - - - Schema/Entities/Player.xml - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - @@ -4924,13 +5083,13 @@ 2 + Models/Core/UnitCylinder.mesh true - @@ -4958,17 +5117,17 @@ + + + + + Models/Core/UnitCylinder.mesh true - - - - - @@ -4994,13 +5153,13 @@ 3 + Models/Core/UnitCylinder.mesh true - @@ -5027,13 +5186,13 @@ 1.5498908015879351 1 + Models/Core/UnitCylinder.mesh true - @@ -5062,17 +5221,17 @@ 4 + + + + + Models/Core/UnitCylinder.mesh true - - - - - @@ -5086,15 +5245,15 @@ - - - Schema/Entities/PlayerRed.xml - + + + Schema/Entities/PlayerRed.xml + @@ -5121,7 +5280,7 @@ false - + @@ -5134,7 +5293,7 @@ false - + @@ -5154,165 +5313,6 @@ - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - @@ -5321,6 +5321,7 @@ + @@ -5358,21 +5359,21 @@ Textures/Core/UnitHexagon.png - + - + - - 2 - + + 4 + Textures/Core/UnitHexagon_Rotated.png @@ -5401,12 +5402,12 @@ - - 3 - + + 3 + Textures/Core/UnitHexagon_Rotated.png @@ -5426,21 +5427,53 @@ Textures/Core/UnitHexagon.png - + - + - - 4 - + + 2 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + Textures/Core/UnitHexagon_Rotated.png @@ -5469,13 +5502,13 @@ - - 1 - 0.10332605343919568 + + 1 + Textures/Core/UnitHexagon_Rotated.png @@ -5490,44 +5523,12 @@ - - - - Textures/Core/UnitHexagon.png - - - - - - - - - - - - - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - - 16 + 6 Fonts/DroidSans.ttf,64 @@ -5540,6 +5541,15 @@ + + + + Schema/Entities/MainMenu.xml + + + + + @@ -5555,24 +5565,6 @@ - - - - - Textures/Core/UnitHexagon.png - - - - PickClass - 2 - - - - - - - - @@ -5591,6 +5583,24 @@ + + + + + Textures/Core/UnitHexagon.png + + + + PickClass + 2 + + + + + + + + diff --git a/resources/Schema/Entities/QualityAssurance.xml b/resources/Schema/Entities/QualityAssurance.xml index 7a8f657f..8b88404a 100644 --- a/resources/Schema/Entities/QualityAssurance.xml +++ b/resources/Schema/Entities/QualityAssurance.xml @@ -3,7 +3,7 @@ - 0.8333591884066891 + 3.6154132075906489 @@ -85,7 +85,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -194,7 +194,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -286,7 +286,7 @@ - + @@ -318,7 +318,7 @@ - + @@ -668,7 +668,7 @@ - + @@ -715,7 +715,7 @@ - + @@ -775,7 +775,7 @@ - + @@ -822,7 +822,7 @@ - + @@ -868,7 +868,7 @@ - + @@ -915,7 +915,7 @@ - + @@ -962,7 +962,7 @@ - + @@ -1376,7 +1376,7 @@ - + @@ -1385,7 +1385,7 @@ true - 0.66694876855613217 + 1.5712751414989441 3.7999999523162842 true @@ -1432,7 +1432,7 @@ - + @@ -1441,7 +1441,7 @@ - 2.0168132214141465 + 0.85439856235552725 Models/Characters/Assault/AssaultTPose.mesh @@ -1484,7 +1484,7 @@ - + @@ -1497,7 +1497,7 @@ true - 2.0168132214141465 + 0.85439856235552725 true @@ -1542,7 +1542,7 @@ - + @@ -1552,7 +1552,7 @@ true - 6.6002622626005092 + 7.5223549108000043 10 3 @@ -1600,7 +1600,7 @@ - + @@ -1610,7 +1610,7 @@ true - 0.1169253453956216 + 0.39702717854592606 true 5 true @@ -1793,7 +1793,7 @@ true - 0.66694876855613217 + 1.5712751414989441 3.7999999523162842 true @@ -2156,7 +2156,17 @@ - + + + + + + + + + + + diff --git a/resources/Schema/Entities/ServerIdentity.xml b/resources/Schema/Entities/ServerIdentity.xml index 5e94b7b5..3c47e045 100644 --- a/resources/Schema/Entities/ServerIdentity.xml +++ b/resources/Schema/Entities/ServerIdentity.xml @@ -1,95 +1,121 @@ - + - - + - - 0.0.0.0 - Fonts/DroidSans.ttf,64 - - - - - - - ServerIdentity - ServerIdentity - IP - - - - + + - - - - - - 0 - Fonts/DroidSans.ttf,64 - - - - - - - ServerIdentity - ServerIdentity - Port - - - - - - - - - - - UnkownServer - Fonts/DroidSans.ttf,64 - - - - - - - ServerIdentity - ServerIdentity - ServerName - - - - - - - - - - - 0 - Fonts/DroidSans.ttf,64 - - - - - - - ServerIdentity - ServerIdentity - PlayersConnected - - - - - - + + + + + 123.123.123.123 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + IP + + + + + + + + + + + + 65999 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + Port + + + + + + + + + + + + UnkownServer + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + ServerName + + + + + + + + + + + 0 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + PlayersConnected + + + + + + + + + + + + Textures/Core/White.png + true + + false + + + + + + + + + + diff --git a/resources/Schema/Entities/ServerList.xml b/resources/Schema/Entities/ServerList.xml index f3a7da68..68c10bf7 100644 --- a/resources/Schema/Entities/ServerList.xml +++ b/resources/Schema/Entities/ServerList.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -36,7 +36,7 @@ Textures/Core/White.png true - + diff --git a/src/Game/Systems/MainMenuSystem.cpp b/src/Game/Systems/MainMenuSystem.cpp index 0540485f..6b7015fc 100644 --- a/src/Game/Systems/MainMenuSystem.cpp +++ b/src/Game/Systems/MainMenuSystem.cpp @@ -18,39 +18,26 @@ void MainMenuSystem::Update(double dt) bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e) { - if(e.EntityName == "Play") { - //OpenServerList - - } else if(e.EntityName == "Connect") { - //Run connect code - } else if(e.EntityName == "Host") { - //Run host code - } else if(e.EntityName == "Quit") { - printf("No, you stay"); - } else if (e.EntityName == "Res1080") { - glfwSetWindowSize(m_Renderer->Window(), 1920, 1080); - } else if (e.EntityName == "Res720") { - glfwSetWindowSize(m_Renderer->Window(), 1280, 720); - glViewport(0, 0, 1280, 720); - } else if (e.EntityName == "Res480") { - glfwSetWindowSize(m_Renderer->Window(), 854, 480); - glViewport(0, 0, 854, 480); - } else if (e.EntityName == "FullScreen") { - printf("No fullscreen for now"); + if (e.EntityName == "ServerIdentityConnect") { + EntityWrapper entity = e.Entity; + EntityWrapper serverIdentityEntity = entity.FirstParentWithComponent("ServerIdentity"); + if(serverIdentityEntity.Valid()) { + Events::ConnectRequest event; + event.IP = (std::string)entity["ServerIdentity"]["IP"]; + event.Port = (int)entity["ServerIdentity"]["Port"]; + m_EventBroker->Publish(event); + } } - return true; } bool MainMenuSystem::OnButtonRelease(const Events::ButtonReleased& e) { - return true; } bool MainMenuSystem::OnButtonPress(const Events::ButtonPressed& e) { - return true; } From 6456df8ce1440c92e09749216f0e9616112809c0 Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Wed, 9 Mar 2016 10:44:08 +0100 Subject: [PATCH 34/40] DamageIndicator is now disabled for Friendly fire --- src/Game/Systems/DamageIndicatorSystem.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Game/Systems/DamageIndicatorSystem.cpp b/src/Game/Systems/DamageIndicatorSystem.cpp index 0cc3e717..7e22a0d6 100644 --- a/src/Game/Systems/DamageIndicatorSystem.cpp +++ b/src/Game/Systems/DamageIndicatorSystem.cpp @@ -41,6 +41,11 @@ bool DamageIndicatorSystem::OnPlayerDamage(Events::PlayerDamage& e) return false; } + //friendly fire - return + if (e.Damage < 0.1f) { + return false; + } + glm::vec3 inflictorPos = e.Inflictor["Transform"]["Position"]; //if testing #ifdef INDICATOR_TEST @@ -55,10 +60,6 @@ bool DamageIndicatorSystem::OnPlayerDamage(Events::PlayerDamage& e) m_World->SetParent(sprite.ID, m_CurrentCamera); //simply set the rotation z-wise to the angleBetweenVectors sprite["Transform"]["Orientation"] = glm::vec3(0, 0, angleBetweenVectors); - //friendly fire - change color of the marker - if (e.Damage < 0.1f) { - sprite["Sprite"]["Color"] = glm::vec4(0.0, 1.0f, 1.0f, 1.0f); - } if (!IsServer || !m_NetworkEnabled) { updateDamageIndicatorVector.emplace_back(sprite, inflictorPos); From b782e735564f7cbf9583a9e32462a1e515b20555 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Wed, 9 Mar 2016 10:56:05 +0100 Subject: [PATCH 35/40] Falsified DepthSort for SpectatorCamera buttons and CP-HUD elements. --- .../Schema/Entities/CapturePointHUDGroup.xml | 115 +- .../Schema/Entities/NewMapWSpectatorCam.xml | 2153 +++++++++-------- resources/Schema/Entities/OverwatchCamera.xml | 90 +- 3 files changed, 1209 insertions(+), 1149 deletions(-) diff --git a/resources/Schema/Entities/CapturePointHUDGroup.xml b/resources/Schema/Entities/CapturePointHUDGroup.xml index d35e1bde..0987cc56 100644 --- a/resources/Schema/Entities/CapturePointHUDGroup.xml +++ b/resources/Schema/Entities/CapturePointHUDGroup.xml @@ -13,38 +13,8 @@ Textures/Core/UnitHexagon.png - - - - - - - - - - - 2 - - - - - - Textures/Core/UnitHexagon_Rotated.png - - - - - - - - - - - - - - - Textures/Core/UnitHexagon.png + + false @@ -54,20 +24,21 @@ + + + 3 - - 0.80222018197612788 - - Textures/Core/UnitHexagon_Rotated.png + + false - + @@ -78,6 +49,8 @@ Textures/Core/UnitHexagon.png + + false @@ -87,19 +60,21 @@ - - 4 - + + 4 + Textures/Core/UnitHexagon_Rotated.png + + false - + @@ -110,6 +85,44 @@ Textures/Core/UnitHexagon.png + + false + + + + + + + + + + + + + + 2 + + + Textures/Core/UnitHexagon_Rotated.png + + false + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false @@ -119,19 +132,21 @@ - - 1 - + + 1 + Textures/Core/UnitHexagon_Rotated.png + + false - + @@ -142,7 +157,9 @@ Textures/Core/UnitHexagon.png - + + false + @@ -151,17 +168,19 @@ - + Textures/Core/UnitHexagon_Rotated.png + + false - + diff --git a/resources/Schema/Entities/NewMapWSpectatorCam.xml b/resources/Schema/Entities/NewMapWSpectatorCam.xml index a655bef3..66561969 100644 --- a/resources/Schema/Entities/NewMapWSpectatorCam.xml +++ b/resources/Schema/Entities/NewMapWSpectatorCam.xml @@ -3,6 +3,7 @@ + 10.841646792775492 15 @@ -23,6 +24,16 @@ + + + + + Models/Props/Highground4.mesh + + + + + @@ -77,16 +88,6 @@ - - - - - Models/Props/Highground4.mesh - - - - - @@ -2791,11 +2792,425 @@ + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + @@ -2907,6 +3322,18 @@ + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + @@ -3217,6 +3644,19 @@ + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + @@ -3270,19 +3710,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -3298,20 +3725,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -3325,20 +3738,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -3379,18 +3778,6 @@ - - - - - Models/Props/Walls/MediumWall1.mesh - - - - - - - @@ -3404,47 +3791,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - @@ -3458,19 +3804,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -3485,19 +3818,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -3512,19 +3832,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -3538,20 +3845,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - @@ -3565,100 +3858,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - @@ -3673,18 +3872,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - @@ -3717,6 +3904,19 @@ + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + @@ -3744,19 +3944,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -3775,20 +3962,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - @@ -3796,6 +3969,115 @@ + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + @@ -3823,47 +4105,6 @@ - - - - - Models/Props/Walls/MediumWall2.mesh - - - - - - - - - - - Models/Props/Walls/MediumWall2.mesh - - - - - - - - - - - - - - Models/Core/UnitPlane.mesh - - true - - - - - - - - - @@ -3871,9 +4112,9 @@ Models/Props/Pillars/SciFiBridgePillar1.mesh - - - + + + @@ -3882,10 +4123,10 @@ - Models/Props/Walls/MediumWall1.mesh + Models/Props/Walls/MediumWall3.mesh - + @@ -3893,10 +4134,10 @@ - Models/Props/Walls/MediumWall1.mesh + Models/Props/Walls/MediumWall3.mesh - + @@ -3918,6 +4159,20 @@ + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + @@ -3984,45 +4239,6 @@ - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - @@ -4037,49 +4253,6 @@ - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - @@ -4108,8 +4281,21 @@ Models/Props/PickUps/PickUpHolder.mesh - - + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + @@ -4136,9 +4322,9 @@ Models/Props/PickUps/PickUpHolder.mesh - - - + + + @@ -4150,8 +4336,9 @@ Models/Props/PickUps/PickUpHolder.mesh - - + + + @@ -4194,20 +4381,6 @@ - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - @@ -4224,183 +4397,24 @@ - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + @@ -4479,19 +4493,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -4519,40 +4520,13 @@ Models/Props/Stones/ShinyStoneCrystalRed.mesh - - + + - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - @@ -4574,36 +4548,9 @@ Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - + + + @@ -4629,8 +4576,35 @@ Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + @@ -4657,8 +4631,22 @@ Models/Props/Stones/ShinyStoneCrystalRed.mesh - - + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + @@ -4670,8 +4658,49 @@ Models/Props/Stones/ShinyStoneCrystalRed.mesh - - + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + @@ -4690,20 +4719,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -4718,20 +4733,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4750,6 +4751,248 @@ + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + + + 10 + + + + + + + + + + 10 + + + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 1 + + + + + + + + + + + 1 + + + + + + + @@ -4774,7 +5017,7 @@ false - + @@ -4800,7 +5043,7 @@ false - + @@ -4813,7 +5056,7 @@ false - + @@ -4829,35 +5072,61 @@ - Models/Props/CapturePoint/CapturePointBlue.mesh + Models/Props/CapturePoint/CapturePointNeutral.mesh - + - - - - 4 + 1.5498908015879351 + 1 - - - - - + Models/Core/UnitCylinder.mesh - + true - - + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + @@ -4902,39 +5171,6 @@ - - - - - Models/Props/CapturePoint/CapturePointNeutral.mesh - - - - - - - - - - 1.5498908015879351 - 1 - - - - - Models/Core/UnitCylinder.mesh - - true - - - - - - - - - - @@ -4971,28 +5207,35 @@ - Models/Props/CapturePoint/CapturePointNeutral.mesh + Models/Props/CapturePoint/CapturePointBlue.mesh - + - 2 + + + + 4 - + + + + + Models/Core/UnitCylinder.mesh - + true - - + + @@ -5017,6 +5260,19 @@ + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + @@ -5043,19 +5299,6 @@ - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - @@ -5071,248 +5314,6 @@ - - - - - - - - - 10 - - - - - - - - - - - 10 - - - - - - - - - - - 1 - - - - - - - - - - - 10 - - - - - - - - - - 10 - - - - - - - - - - - - - 10 - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - 0.10000000149011612 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - @@ -5321,7 +5322,7 @@ - + @@ -5346,12 +5347,47 @@ + + + + + Textures/Icons/Classes/Assault-01.png + + false + + + PickClass + 1 + + + + + + + + + + + Assault + Fonts/DroidSans.ttf,64 + + + + + + + + + + + Textures/Icons/Classes/Defender-01.png + false PickClass @@ -5385,6 +5421,7 @@ Textures/Icons/Classes/Sniper-01.png + false PickClass @@ -5412,39 +5449,6 @@ - - - - - Textures/Icons/Classes/Assault-01.png - - - - PickClass - 1 - - - - - - - - - - - Assault - Fonts/DroidSans.ttf,64 - - - - - - - - - - - @@ -5465,6 +5469,7 @@ Textures/Core/UnitHexagon.png + false @@ -5542,6 +5547,7 @@ Textures/Core/UnitHexagon.png + false @@ -5575,6 +5581,7 @@ Textures/Core/UnitHexagon.png + false @@ -5608,6 +5615,7 @@ Textures/Core/UnitHexagon.png + false @@ -5641,6 +5649,7 @@ Textures/Core/UnitHexagon.png + false false @@ -5704,7 +5713,7 @@ - 1 + 5 Fonts/DroidSans.ttf,64 @@ -5728,6 +5737,7 @@ Textures/Core/UnitHexagon.png + false @@ -5746,6 +5756,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -5762,6 +5773,7 @@ Textures/Core/UnitHexagon.png + false @@ -5780,6 +5792,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -5796,6 +5809,7 @@ Textures/Core/UnitHexagon.png + false @@ -5814,6 +5828,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -5830,6 +5845,7 @@ Textures/Core/UnitHexagon.png + false @@ -5849,6 +5865,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -5865,6 +5882,7 @@ Textures/Core/UnitHexagon.png + false @@ -5881,6 +5899,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -5900,6 +5919,7 @@ Textures/Core/UnitHexagon.png + false @@ -5946,6 +5966,7 @@ Textures/Core/UnitHexagon.png + false diff --git a/resources/Schema/Entities/OverwatchCamera.xml b/resources/Schema/Entities/OverwatchCamera.xml index 075e57e2..6c93f033 100644 --- a/resources/Schema/Entities/OverwatchCamera.xml +++ b/resources/Schema/Entities/OverwatchCamera.xml @@ -8,7 +8,7 @@ - + @@ -34,12 +34,47 @@ + + + + + Textures/Icons/Classes/Defender-01.png + + false + + + PickClass + 2 + + + + + + + + + + + Defender + Fonts/DroidSans.ttf,64 + + + + + + + + + + + Textures/Icons/Classes/Sniper-01.png + false PickClass @@ -73,6 +108,7 @@ Textures/Icons/Classes/Assault-01.png + false PickClass @@ -100,39 +136,6 @@ - - - - - Textures/Icons/Classes/Defender-01.png - - - - PickClass - 2 - - - - - - - - - - - Defender - Fonts/DroidSans.ttf,64 - - - - - - - - - - - @@ -153,6 +156,7 @@ Textures/Core/UnitHexagon.png + false @@ -230,6 +234,7 @@ Textures/Core/UnitHexagon.png + false @@ -263,6 +268,7 @@ Textures/Core/UnitHexagon.png + false @@ -296,6 +302,7 @@ Textures/Core/UnitHexagon.png + false @@ -329,6 +336,7 @@ Textures/Core/UnitHexagon.png + false false @@ -392,7 +400,7 @@ - 15 + 7 Fonts/DroidSans.ttf,64 @@ -416,6 +424,7 @@ Textures/Core/UnitHexagon.png + false @@ -434,6 +443,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -450,6 +460,7 @@ Textures/Core/UnitHexagon.png + false @@ -468,6 +479,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -484,6 +496,7 @@ Textures/Core/UnitHexagon.png + false @@ -502,6 +515,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -518,6 +532,7 @@ Textures/Core/UnitHexagon.png + false @@ -537,6 +552,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -553,6 +569,7 @@ Textures/Core/UnitHexagon.png + false @@ -569,6 +586,7 @@ Textures/Core/UnitHexagon_Rotated.png + false @@ -588,6 +606,7 @@ Textures/Core/UnitHexagon.png + false @@ -634,6 +653,7 @@ Textures/Core/UnitHexagon.png + false From 534d6639e5c5f57a878056fddc135a067af88e09 Mon Sep 17 00:00:00 2001 From: William Moberg Date: Wed, 9 Mar 2016 11:35:32 +0100 Subject: [PATCH 36/40] Class enum instead of hardcoded ints. Removed superfluous .Valid() checks. Check for spectator spawnrequest in case they somehow has a class, so we don't get "x players were supposed to be spawned but failed" if it happens. --- include/Game/Systems/PlayerSpawnSystem.h | 10 +++++++- src/Game/Systems/PlayerDeathSystem.cpp | 4 +-- src/Game/Systems/PlayerSpawnSystem.cpp | 30 ++++++++++++---------- src/Game/Systems/SpectatorCameraSystem.cpp | 4 +-- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/include/Game/Systems/PlayerSpawnSystem.h b/include/Game/Systems/PlayerSpawnSystem.h index 17364a81..f74032f7 100644 --- a/include/Game/Systems/PlayerSpawnSystem.h +++ b/include/Game/Systems/PlayerSpawnSystem.h @@ -15,11 +15,19 @@ public: virtual void Update(double dt) override; private: + // This enum must correspond to the command values for PickTeam buttons. + enum class PlayerClass + { + None = 0, + Assault, + Defender, + Sniper + }; struct SpawnRequest { int PlayerID; ComponentInfo::EnumType Team; - ComponentInfo::EnumType Class; + PlayerClass Class; }; bool m_NetworkEnabled = false; diff --git a/src/Game/Systems/PlayerDeathSystem.cpp b/src/Game/Systems/PlayerDeathSystem.cpp index 4b7606e7..9f2900fa 100644 --- a/src/Game/Systems/PlayerDeathSystem.cpp +++ b/src/Game/Systems/PlayerDeathSystem.cpp @@ -35,7 +35,7 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) //components that we need from player auto playerModel = player.FirstChildByName("PlayerModel"); - if (!playerModel.Valid() || !playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { + if (!playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { if (player == LocalPlayer) { setSpectatorCamera(); } @@ -82,7 +82,7 @@ void PlayerDeathSystem::setSpectatorCamera() { // Look for the spectator camera entity in the level. EntityWrapper spectatorCam = m_World->GetFirstEntityByName("SpectatorCamera"); - if (!spectatorCam.Valid() || !spectatorCam.HasComponent("Camera")) { + if (!spectatorCam.HasComponent("Camera")) { return; } Events::SetCamera eSetCamera; diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 0c0c60a1..9b7a9faf 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -63,10 +63,9 @@ void PlayerSpawnSystem::Update(double dt) int playersSpectating = 0; const int numRequestsToHandle = (int)m_SpawnRequests.size(); for (auto it = m_SpawnRequests.begin(); it != m_SpawnRequests.end(); ++it) { - // TODO: -1 Signifies no class picked, or they are a spectator, enum here later? // It is valid if they didn't pick class yet // but don't spawn anything, goto next spawnrequest. - if (it->Class == -1) { + if (it->Class == PlayerClass::None) { ++playersSpectating; continue; } @@ -80,6 +79,11 @@ void PlayerSpawnSystem::Update(double dt) if (spawner.HasComponent("Team")) { auto cSpawnerTeam = spawner["Team"]; if ((int)cSpawnerTeam["Team"] != it->Team) { + // If they somehow has a valid class as spectator, don't spawn them. + if (it->Team == cSpawnerTeam["Team"].Enum("Spectator")) { + ++playersSpectating; + break; + } continue; } } @@ -136,7 +140,7 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) if (iter->PlayerID == e.PlayerID) { // If player wants to switch team or class , remove their selected class so they don't spawn. if (e.Command == "SwapToTeamPick" || e.Command == "SwapToClassPick") { - iter->Class = -1; + iter->Class = PlayerClass::None; return true; } break; @@ -150,7 +154,7 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) if (e.Command == "PickTeam") { iter->Team = (ComponentInfo::EnumType)e.Value; } else { - iter->Class = (ComponentInfo::EnumType)e.Value; + iter->Class = static_cast(e.Value); } } else if (m_PlayerEntities.count(e.PlayerID) == 0 || !m_PlayerEntities[e.PlayerID].Valid()) { // If player is not in queue to spawn, then create a spawn request, @@ -159,12 +163,12 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) req.PlayerID = e.PlayerID; if (e.Command == "PickTeam") { req.Team = (ComponentInfo::EnumType)e.Value; - req.Class = -1; // TODO: -1 Signifies no class picked, enum here later? + req.Class = PlayerClass::None; } else { // Should never get here, since you should have picked a team before you ever get a chance to pick class. LOG_WARNING("Sequence error: Should not be able to pick class before team"); req.Team = 1; // TODO: 1 Signifies spectator, should probably have real enum here later. - req.Class = (ComponentInfo::EnumType)e.Value; + req.Class = static_cast(e.Value); } m_SpawnRequests.push_back(req); } else { @@ -229,10 +233,6 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e) return false; } ComponentWrapper cTeam = e.Player["Team"]; - // A spectator can't die anyway - if ((ComponentInfo::EnumType)cTeam["Team"] == cTeam["Team"].Enum("Spectator")) { - return false; - } if (m_PlayerIDs.count(e.Player.ID) == 0) { return false; @@ -241,13 +241,15 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e) SpawnRequest req; req.PlayerID = m_PlayerIDs.at(e.Player.ID); req.Team = cTeam["Team"]; - // TODO: Better than temp class state code. + // TODO: Something better than temp class state code, if we ever add class enums in .xml if (e.Player.HasComponent("DashAbility")) { - req.Class = 1; // Assault + req.Class = PlayerClass::Assault; } else if (e.Player.HasComponent("SprintAbility")) { - req.Class = 3; // Sniper + req.Class = PlayerClass::Sniper; + } else if (e.Player.HasComponent("ShieldAbility")) { + req.Class = PlayerClass::Defender; } else { - req.Class = 2; // Defender + req.Class = PlayerClass::None; } m_SpawnRequests.push_back(req); diff --git a/src/Game/Systems/SpectatorCameraSystem.cpp b/src/Game/Systems/SpectatorCameraSystem.cpp index 60b82b0d..d1f2f1ce 100644 --- a/src/Game/Systems/SpectatorCameraSystem.cpp +++ b/src/Game/Systems/SpectatorCameraSystem.cpp @@ -15,7 +15,7 @@ void SpectatorCameraSystem::Update(double dt) if (!m_CamSetToTeamPick && IsClient) { // Find the class pick camera and set them to it, since they need to pick a team before they can leave the screen. EntityWrapper spectatorCam = m_World->GetFirstEntityByName("PickTeamCamera"); - if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) { + if (spectatorCam.HasComponent("Camera")) { m_CamSetToTeamPick = true; Events::SetCamera eSetCamera; eSetCamera.CameraEntity = spectatorCam; @@ -59,7 +59,7 @@ bool SpectatorCameraSystem::OnInputCommand(const Events::InputCommand& e) } EntityWrapper spectatorCam = m_World->GetFirstEntityByName(camName); // Set the camera as active, if it exists. - if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) { + if (spectatorCam.HasComponent("Camera")) { // Set the class pick button visible if a blue or red team is picked, else invisible. EntityWrapper HUD; if (camName == "SpectatorCamera") { From f24a5a36b4910e192b5de65c342b76ff83bceebf Mon Sep 17 00:00:00 2001 From: William Moberg Date: Wed, 9 Mar 2016 11:44:07 +0100 Subject: [PATCH 37/40] Tiny compiler bug fix. --- src/Game/Systems/PlayerSpawnSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 9b7a9faf..454c5c53 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -154,7 +154,7 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) if (e.Command == "PickTeam") { iter->Team = (ComponentInfo::EnumType)e.Value; } else { - iter->Class = static_cast(e.Value); + iter->Class = static_cast((int)e.Value); } } else if (m_PlayerEntities.count(e.PlayerID) == 0 || !m_PlayerEntities[e.PlayerID].Valid()) { // If player is not in queue to spawn, then create a spawn request, @@ -168,7 +168,7 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) // Should never get here, since you should have picked a team before you ever get a chance to pick class. LOG_WARNING("Sequence error: Should not be able to pick class before team"); req.Team = 1; // TODO: 1 Signifies spectator, should probably have real enum here later. - req.Class = static_cast(e.Value); + req.Class = static_cast((int)e.Value); } m_SpawnRequests.push_back(req); } else { From c9c462f695f392279135e5325a4881fd0f08d62f Mon Sep 17 00:00:00 2001 From: Tleety Date: Wed, 9 Mar 2016 12:31:37 +0100 Subject: [PATCH 38/40] The console now print some info when you are trying to connect to server --- src/Game/Systems/MainMenuSystem.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Game/Systems/MainMenuSystem.cpp b/src/Game/Systems/MainMenuSystem.cpp index 6b7015fc..fcb04b4f 100644 --- a/src/Game/Systems/MainMenuSystem.cpp +++ b/src/Game/Systems/MainMenuSystem.cpp @@ -25,6 +25,7 @@ bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e) Events::ConnectRequest event; event.IP = (std::string)entity["ServerIdentity"]["IP"]; event.Port = (int)entity["ServerIdentity"]["Port"]; + printf("\n ----Request Server Connect----\nIP: %s\nPort: %i\n ------------------------------", event.IP, event.Port); m_EventBroker->Publish(event); } } From 555b19c41d6aa11ce81f8b564173f0447443a3ff Mon Sep 17 00:00:00 2001 From: viktorljung Date: Wed, 9 Mar 2016 13:49:28 +0100 Subject: [PATCH 39/40] BoneAttachments now working perfectly --- src/Engine/Rendering/BoneAttachmentSystem.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Engine/Rendering/BoneAttachmentSystem.cpp b/src/Engine/Rendering/BoneAttachmentSystem.cpp index 43dc8634..14db0466 100644 --- a/src/Engine/Rendering/BoneAttachmentSystem.cpp +++ b/src/Engine/Rendering/BoneAttachmentSystem.cpp @@ -50,13 +50,16 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp glm::vec4 perspective; glm::decompose(boneTransform, scale, rotation, translation, skew, perspective); - glm::vec3 angles = glm::vec3(-glm::pitch(rotation), -glm::yaw(rotation), -glm::roll(rotation)); + rotation = glm::quat((glm::vec3)entity["BoneAttachment"]["OrientationOffset"]) * rotation; + + rotation.w = -rotation.w; + glm::vec3 angles = glm::eulerAngles(rotation); if ((bool)entity["BoneAttachment"]["InheritPosition"]) { (glm::vec3&)entity["Transform"]["Position"] = translation + (glm::vec3)entity["BoneAttachment"]["PositionOffset"]; } if ((bool)entity["BoneAttachment"]["InheritOrientation"]) { - (glm::vec3&)entity["Transform"]["Orientation"] = angles + (glm::vec3)entity["BoneAttachment"]["OrientationOffset"]; + (glm::vec3&)entity["Transform"]["Orientation"] = angles; } if ((bool)entity["BoneAttachment"]["InheritScale"]) { (glm::vec3&)entity["Transform"]["Scale"] = scale * (glm::vec3)entity["BoneAttachment"]["ScaleOffset"]; From ddde50b69054436110c219c0d415941458de6dc3 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Wed, 9 Mar 2016 14:27:50 +0100 Subject: [PATCH 40/40] Inverse seems to be the same as -w --- src/Engine/Rendering/BoneAttachmentSystem.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Engine/Rendering/BoneAttachmentSystem.cpp b/src/Engine/Rendering/BoneAttachmentSystem.cpp index 14db0466..c1cdf0f2 100644 --- a/src/Engine/Rendering/BoneAttachmentSystem.cpp +++ b/src/Engine/Rendering/BoneAttachmentSystem.cpp @@ -51,8 +51,7 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp glm::decompose(boneTransform, scale, rotation, translation, skew, perspective); rotation = glm::quat((glm::vec3)entity["BoneAttachment"]["OrientationOffset"]) * rotation; - - rotation.w = -rotation.w; + rotation = glm::inverse(rotation); glm::vec3 angles = glm::eulerAngles(rotation); if ((bool)entity["BoneAttachment"]["InheritPosition"]) {