From 7ba5e01560dbb86ff0d258476d5ed6541d2487e9 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 1 Mar 2016 15:37:28 +0100 Subject: [PATCH 01/10] CapturePointArrow component files --- .../Schema/Components/CapturePointArrow.xml | 5 ++++ .../Schema/Components/CapturePointArrow.xsd | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 resources/Schema/Components/CapturePointArrow.xml create mode 100644 resources/Schema/Components/CapturePointArrow.xsd diff --git a/resources/Schema/Components/CapturePointArrow.xml b/resources/Schema/Components/CapturePointArrow.xml new file mode 100644 index 00000000..2943d57b --- /dev/null +++ b/resources/Schema/Components/CapturePointArrow.xml @@ -0,0 +1,5 @@ + + + 0 + + \ No newline at end of file diff --git a/resources/Schema/Components/CapturePointArrow.xsd b/resources/Schema/Components/CapturePointArrow.xsd new file mode 100644 index 00000000..7984fc50 --- /dev/null +++ b/resources/Schema/Components/CapturePointArrow.xsd @@ -0,0 +1,24 @@ + + + + + + + Hud element for tracking capture points. + + + + + + Corresponds to the number on the capture point it should track. + + + + + Specify the team that own this capturePoint. + + + + + + \ No newline at end of file From b0a66f9e8369801db3b2c322052b29bdb84c2141 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 1 Mar 2016 16:19:59 +0100 Subject: [PATCH 02/10] Components for CapturePoint arrow HUD element and a system skeleton --- .../Game/Systems/CapturePointArrowHUDSystem.h | 20 ++++++++++++++++ resources/Schema/Components.xsd | 1 + .../Schema/Components/CapturePointArrow.xml | 5 ---- .../Schema/Components/CapturePointArrow.xsd | 24 ------------------- .../Components/CapturePointArrowHUD.xml | 4 ++++ .../Components/CapturePointArrowHUD.xsd | 18 ++++++++++++++ resources/Schema/Types/Entity.xsd | 1 + src/Game/Game.cpp | 2 ++ .../Systems/CapturePointArrowHUDSystem.cpp | 13 ++++++++++ 9 files changed, 59 insertions(+), 29 deletions(-) create mode 100644 include/Game/Systems/CapturePointArrowHUDSystem.h delete mode 100644 resources/Schema/Components/CapturePointArrow.xml delete mode 100644 resources/Schema/Components/CapturePointArrow.xsd create mode 100644 resources/Schema/Components/CapturePointArrowHUD.xml create mode 100644 resources/Schema/Components/CapturePointArrowHUD.xsd create mode 100644 src/Game/Systems/CapturePointArrowHUDSystem.cpp diff --git a/include/Game/Systems/CapturePointArrowHUDSystem.h b/include/Game/Systems/CapturePointArrowHUDSystem.h new file mode 100644 index 00000000..30406c3c --- /dev/null +++ b/include/Game/Systems/CapturePointArrowHUDSystem.h @@ -0,0 +1,20 @@ +#ifndef CapturePointArrowHUDSystem_h__ +#define CapturePointArrowHUDSystem_h__ + +#include +#include + +#include "Common.h" +#include "Core/System.h" + +class CapturePointArrowHUDSystem : public ImpureSystem +{ +public: + CapturePointArrowHUDSystem(SystemParams params); + + virtual void Update(double dt) override; + +private: +}; + +#endif \ No newline at end of file diff --git a/resources/Schema/Components.xsd b/resources/Schema/Components.xsd index eb41ed6a..d8ace908 100644 --- a/resources/Schema/Components.xsd +++ b/resources/Schema/Components.xsd @@ -50,4 +50,5 @@ + \ No newline at end of file diff --git a/resources/Schema/Components/CapturePointArrow.xml b/resources/Schema/Components/CapturePointArrow.xml deleted file mode 100644 index 2943d57b..00000000 --- a/resources/Schema/Components/CapturePointArrow.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 0 - - \ No newline at end of file diff --git a/resources/Schema/Components/CapturePointArrow.xsd b/resources/Schema/Components/CapturePointArrow.xsd deleted file mode 100644 index 7984fc50..00000000 --- a/resources/Schema/Components/CapturePointArrow.xsd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - Hud element for tracking capture points. - - - - - - Corresponds to the number on the capture point it should track. - - - - - Specify the team that own this capturePoint. - - - - - - \ No newline at end of file diff --git a/resources/Schema/Components/CapturePointArrowHUD.xml b/resources/Schema/Components/CapturePointArrowHUD.xml new file mode 100644 index 00000000..ebe8727a --- /dev/null +++ b/resources/Schema/Components/CapturePointArrowHUD.xml @@ -0,0 +1,4 @@ + + + 0 + \ No newline at end of file diff --git a/resources/Schema/Components/CapturePointArrowHUD.xsd b/resources/Schema/Components/CapturePointArrowHUD.xsd new file mode 100644 index 00000000..d1c035f6 --- /dev/null +++ b/resources/Schema/Components/CapturePointArrowHUD.xsd @@ -0,0 +1,18 @@ + + + + + + HUD element for tracking next capturable Capture Point. + + + + + + Corresponds to the current capturepoint the arrow points Towards + + + + + + \ No newline at end of file diff --git a/resources/Schema/Types/Entity.xsd b/resources/Schema/Types/Entity.xsd index 0965ef89..61d8e520 100644 --- a/resources/Schema/Types/Entity.xsd +++ b/resources/Schema/Types/Entity.xsd @@ -52,6 +52,7 @@ + diff --git a/src/Game/Game.cpp b/src/Game/Game.cpp index 8be665e0..e16d1841 100644 --- a/src/Game/Game.cpp +++ b/src/Game/Game.cpp @@ -25,6 +25,7 @@ #include "Rendering/AnimationSystem.h" #include "Network/MultiplayerSnapshotFilter.h" #include "Game/Systems/AmmunitionHUDSystem.h" +#include "Game/Systems/CapturePointArrowHUDSystem.h" #include "Game/Systems/KillFeedSystem.h" #include "GUI/ButtonSystem.h" #include "GUI/MainMenuSystem.h" @@ -131,6 +132,7 @@ 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_Renderer); m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); diff --git a/src/Game/Systems/CapturePointArrowHUDSystem.cpp b/src/Game/Systems/CapturePointArrowHUDSystem.cpp new file mode 100644 index 00000000..e621d90d --- /dev/null +++ b/src/Game/Systems/CapturePointArrowHUDSystem.cpp @@ -0,0 +1,13 @@ +#include "Systems/CapturePointArrowHUDSystem.h" + +CapturePointArrowHUDSystem::CapturePointArrowHUDSystem(SystemParams params) + : System(params) + , ImpureSystem() +{ +} + + +void CapturePointArrowHUDSystem::Update(double dt) +{ + //Logic here +} \ No newline at end of file From 6281e200005fb311687a517d19c14cc8e5b6bee1 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 1 Mar 2016 20:31:09 +0100 Subject: [PATCH 03/10] Arrow should now track the CapturePoint specified in the Component. --- .../Game/Systems/CapturePointArrowHUDSystem.h | 3 + include/Game/Systems/CapturePointHUDSystem.h | 2 +- resources/Schema/Entities/PlayerRed.xml | 58 ++++--- .../Schema/Entities/QualityAssurance.xml | 154 +++++++++++++----- .../Systems/CapturePointArrowHUDSystem.cpp | 105 +++++++++++- 5 files changed, 261 insertions(+), 61 deletions(-) diff --git a/include/Game/Systems/CapturePointArrowHUDSystem.h b/include/Game/Systems/CapturePointArrowHUDSystem.h index 30406c3c..4c197f02 100644 --- a/include/Game/Systems/CapturePointArrowHUDSystem.h +++ b/include/Game/Systems/CapturePointArrowHUDSystem.h @@ -3,9 +3,12 @@ #include #include +#include #include "Common.h" #include "Core/System.h" +#include "Core/Transform.h" + class CapturePointArrowHUDSystem : public ImpureSystem { diff --git a/include/Game/Systems/CapturePointHUDSystem.h b/include/Game/Systems/CapturePointHUDSystem.h index 41db0c12..53ca9b73 100644 --- a/include/Game/Systems/CapturePointHUDSystem.h +++ b/include/Game/Systems/CapturePointHUDSystem.h @@ -7,7 +7,7 @@ #include "Common.h" #include "Core/System.h" -#include "Engine/Collision/ETrigger.h" +#include "Collision/ETrigger.h" class CapturePointHUDSystem : public ImpureSystem { diff --git a/resources/Schema/Entities/PlayerRed.xml b/resources/Schema/Entities/PlayerRed.xml index 3cf17558..8982f58d 100644 --- a/resources/Schema/Entities/PlayerRed.xml +++ b/resources/Schema/Entities/PlayerRed.xml @@ -13,7 +13,7 @@ - 1.6944730461160304 + 326.69883589440087 @@ -30,7 +30,7 @@ - + @@ -193,7 +193,6 @@ 3 - 0.80222018197612788 @@ -228,6 +227,7 @@ 4 + 1 @@ -283,7 +283,7 @@ Textures/Core/UnitHexagon.png - + @@ -294,7 +294,8 @@ - + 1 + Textures/Core/UnitHexagon_Rotated.png @@ -303,7 +304,7 @@ - + @@ -372,7 +373,7 @@ Idle - 0.67172915251515519 + 0.20909021680133577 1 @@ -386,30 +387,44 @@ + + DefenderWeapon + Schema/Entities/DefenderWeaponViewRed.xml - - DefenderWeapon - + + AssaultWeapon + Schema/Entities/AssaultWeaponView.xml - - AssaultWeapon - + + + + + Models/Weapons/Blue/AssaultWeaponBlue.mesh + + + + + + + + + @@ -430,6 +445,7 @@ Idle + 0.22069183859343156 1 @@ -449,31 +465,31 @@ - - Schema/Entities/DefenderWeaponWorldRed.xml - - DefenderWeapon + + Schema/Entities/DefenderWeaponWorldRed.xml + + - - Schema/Entities/AssaultWeaponWorld.xml - - AssaultWeapon + + Schema/Entities/AssaultWeaponWorld.xml + + diff --git a/resources/Schema/Entities/QualityAssurance.xml b/resources/Schema/Entities/QualityAssurance.xml index 0aa2fbe7..04cc288a 100644 --- a/resources/Schema/Entities/QualityAssurance.xml +++ b/resources/Schema/Entities/QualityAssurance.xml @@ -2,6 +2,9 @@ + + 4.7473226580121377 + @@ -40,7 +43,7 @@ - + @@ -81,19 +84,19 @@ + + 1 + + 0.80000001192092896 Models/Widgets/Lights/DirectionalLightWidget.mesh - - 1 - - - + @@ -108,7 +111,11 @@ - + + + + + Models/Characters/Assault/AssaultAnimated.mesh @@ -120,7 +127,11 @@ - + + + + + Models/Characters/Assault/AssaultAnimated.mesh @@ -168,13 +179,17 @@ - + - + + + + + Models/Characters/Assault/AssaultAnimated.mesh @@ -213,7 +228,7 @@ - + @@ -277,7 +292,7 @@ - + @@ -309,7 +324,7 @@ - + @@ -659,7 +674,7 @@ - + @@ -706,7 +721,7 @@ - + @@ -766,7 +781,7 @@ - + @@ -813,7 +828,7 @@ - + @@ -859,7 +874,7 @@ - + @@ -906,7 +921,7 @@ - + @@ -953,7 +968,7 @@ - + @@ -1013,6 +1028,7 @@ 15 + Models/Core/UnitCube.mesh @@ -1027,7 +1043,6 @@ - @@ -1063,6 +1078,7 @@ 1 + Models/Core/UnitCube.mesh @@ -1073,7 +1089,6 @@ - @@ -1107,6 +1122,7 @@ 2 + Models/Core/UnitCube.mesh @@ -1117,7 +1133,6 @@ - @@ -1153,6 +1168,7 @@ 3 + Models/Core/UnitCube.mesh @@ -1163,7 +1179,6 @@ - @@ -1203,6 +1218,7 @@ -15 4 + Models/Core/UnitCube.mesh @@ -1217,7 +1233,6 @@ - @@ -1367,7 +1382,7 @@ - + @@ -1376,7 +1391,7 @@ true - 0.8256214817261025 + 2.5396116058983438 3.7999999523162842 true @@ -1423,7 +1438,7 @@ - + @@ -1432,7 +1447,7 @@ - 1.8641349174045843 + 1.5396208215609732 Models/Characters/Assault/AssaultTPose.mesh @@ -1475,18 +1490,22 @@ - + - + + + + + true - 1.8641349174045843 + 1.5396208215609732 true @@ -1531,7 +1550,7 @@ - + @@ -1541,7 +1560,7 @@ true - 1.2301962937648341 + 4.4522528839264339 10 3 @@ -1589,7 +1608,7 @@ - + @@ -1599,7 +1618,7 @@ true - 3.4214855659573402 + 3.2362842141074992 true 5 true @@ -1690,6 +1709,7 @@ 5 + @@ -1712,6 +1732,7 @@ + Fonts/DroidSans.ttf,100 @@ -1780,7 +1801,7 @@ true - 0.8256214817261025 + 2.5396116058983438 3.7999999523162842 true @@ -1823,7 +1844,11 @@ - + + + + + @@ -1925,6 +1950,7 @@ Textures/Props/FoliageDiff.png + @@ -1934,6 +1960,7 @@ Textures/Props/FoliageDiff.png + @@ -1954,6 +1981,7 @@ Textures/Core/UnitHexagon.png + @@ -1971,6 +1999,7 @@ Textures/Core/UnitHexagon_Rotated.png + @@ -1986,6 +2015,7 @@ Textures/Core/UnitHexagon.png + @@ -2003,6 +2033,7 @@ Textures/Core/UnitHexagon_Rotated.png + @@ -2018,6 +2049,7 @@ Textures/Core/UnitHexagon.png + @@ -2036,6 +2068,7 @@ Textures/Core/UnitHexagon_Rotated.png + @@ -2051,6 +2084,7 @@ Textures/Core/UnitHexagon.png + @@ -2068,6 +2102,7 @@ Textures/Core/UnitHexagon_Rotated.png + @@ -2083,6 +2118,7 @@ Textures/Core/UnitHexagon.png + @@ -2099,6 +2135,7 @@ Textures/Core/UnitHexagon_Rotated.png + @@ -2167,6 +2204,7 @@ Textures/Core/ErrorTexture.png + @@ -2178,6 +2216,7 @@ Textures/Core/White.png + @@ -2206,6 +2245,7 @@ Textures/Core/White.png + @@ -2234,6 +2274,7 @@ Textures/Core/White.png + @@ -2262,6 +2303,7 @@ Textures/Core/White.png + @@ -2290,6 +2332,7 @@ Textures/Core/White.png + @@ -2331,6 +2374,7 @@ Textures/Core/ErrorTexture.png + @@ -2342,6 +2386,7 @@ Textures/Core/White.png + @@ -2370,6 +2415,7 @@ Textures/Core/White.png + @@ -2398,6 +2444,7 @@ Textures/Core/White.png + @@ -2426,6 +2473,7 @@ Textures/Core/White.png + @@ -2482,6 +2530,36 @@ + + + + + + + + + + + + 2 + + + Models/Weapons/Blue/AssaultWeaponBlue.mesh + + + + + + + + + + + + + + + diff --git a/src/Game/Systems/CapturePointArrowHUDSystem.cpp b/src/Game/Systems/CapturePointArrowHUDSystem.cpp index e621d90d..92c6ec0a 100644 --- a/src/Game/Systems/CapturePointArrowHUDSystem.cpp +++ b/src/Game/Systems/CapturePointArrowHUDSystem.cpp @@ -9,5 +9,108 @@ CapturePointArrowHUDSystem::CapturePointArrowHUDSystem(SystemParams params) void CapturePointArrowHUDSystem::Update(double dt) { - //Logic here + + bool LoadCheck = true; + int redTeam; + int blueTeam; + int spectatorTeam; + + //Get list for all CapturePointArrowHUDComponents + auto ArrowHUDs = m_World->GetComponents("CapturePointArrowHUD"); + auto CapturePoints = m_World->GetComponents("CapturePoint"); + if(ArrowHUDs == nullptr) { + return; + } + + for(auto& cArrowHUD : *ArrowHUDs) { + //Get what team the current arrow corresponds to + EntityWrapper ArrowEntity = EntityWrapper(m_World, cArrowHUD.EntityID); + EntityWrapper teamEntity = ArrowEntity.FirstParentWithComponent("Team"); + if (!teamEntity.Valid()) { + continue; + } + auto cTeam = teamEntity["Team"]; + int currentTeam = (int)cTeam["Team"]; + + if (LoadCheck) { + redTeam = (int)cTeam["Team"].Enum("Red"); + blueTeam = (int)cTeam["Team"].Enum("Blue"); + spectatorTeam = (int)cTeam["Team"].Enum("Spectator"); + LoadCheck = false; + } + + //if red team, get red team next point, otherwise blue team next point. + //Untill this is awailable we will just use the hardcoded value in the component. + //This will also give us a position, so we wont need to loop through all capturePoints. + glm::vec3 pos; + int target = cArrowHUD["CurrentTarget"]; + for(auto& cCP : *CapturePoints) { + if((int)cCP["CapturePointNumber"] == target) { + EntityWrapper CPEntity = EntityWrapper(m_World, cCP.EntityID); + pos = Transform::AbsolutePosition(CPEntity); + break; + } + } + glm::vec3& arrowOri = ArrowEntity["Transform"]["Orientation"]; + glm::vec3 lookVector = glm::normalize(Transform::AbsolutePosition(ArrowEntity) - pos); //Maybe should be player instead + float pitch = std::asin(-lookVector.y); + float yaw = std::atan2(lookVector.x, lookVector.z); + arrowOri.x = pitch; + arrowOri.y = yaw; + arrowOri.z = 0.f; + EntityWrapper parent = ArrowEntity.Parent(); + if (parent.Valid()) { + arrowOri -= Transform::AbsoluteOrientationEuler(parent); + } + } + + /* + bool LoadCheck = true; + int redTeam; + int blueTeam; + int spectatorTeam; + + auto CapturePointHUDElements = m_World->GetComponents("CapturePointHUD"); + auto CapturePoints = m_World->GetComponents("CapturePoint"); + if (CapturePointHUDElements == nullptr) { + return; + } + + if (!CapturePointHUDElements) { + return; + } + + for (auto& cCapturePointHUD : *CapturePointHUDElements) { + int HUD_ID = cCapturePointHUD["CapturePointNumber"]; + EntityWrapper entityHUD = EntityWrapper(m_World, cCapturePointHUD.EntityID); + EntityWrapper entityHUDparent = entityHUD.Parent(); + + for (auto& cCapturePoint : *CapturePoints) { + EntityWrapper entityCP = EntityWrapper(m_World, cCapturePoint.EntityID); + + //Check if the HUD corresponds to the Capture Point Number + if (HUD_ID == (int)entityCP["CapturePoint"]["CapturePointNumber"]) { + ComponentWrapper& teamComponent = entityCP["Team"]; + if (LoadCheck) { + redTeam = (int)teamComponent["Team"].Enum("Red"); + blueTeam = (int)teamComponent["Team"].Enum("Blue"); + spectatorTeam = (int)teamComponent["Team"].Enum("Spectator"); + LoadCheck = false; + } + //Color hud with team color + auto capturePointTeam = (int)teamComponent["Team"]; + entityHUDparent["Sprite"]["Color"] = capturePointTeam == blueTeam ? glm::vec4(0, 0.2f, 1, 0.7f) : capturePointTeam == redTeam ? glm::vec4(1, 0.0f, 0, 0.7f) : glm::vec4(1, 1, 1, 0.3f); + + //Progress is scaled with time + double currentCaptureTime = (double)entityCP["CapturePoint"]["CaptureTimer"]; + double progress = glm::abs(currentCaptureTime)/15.0; + int currentCapturingTeam = currentCaptureTime > 0 ? redTeam : currentCaptureTime < 0 ? blueTeam : spectatorTeam; + ((glm::vec3&)entityHUD["Transform"]["Orientation"]).z = currentCapturingTeam == redTeam ? glm::half_pi()+glm::pi() : glm::half_pi(); + glm::vec4 fillColor = currentCapturingTeam == redTeam ? glm::vec4(1, 0.f, 0, 0.7f) : glm::vec4(0, 0.2f, 1, 0.7f); + entityHUD["Fill"]["Color"] = fillColor; + entityHUD["Fill"]["Percentage"] = progress; + } + } + } + */ } \ No newline at end of file From ab40fa715b8d47681ab58561c95b4aa02bf94391 Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 1 Mar 2016 21:57:30 +0100 Subject: [PATCH 04/10] The arrow should now track CapturePoints correctly at start and when they are captured. --- .../Game/Systems/CapturePointArrowHUDSystem.h | 7 + .../Systems/CapturePointArrowHUDSystem.cpp | 131 ++++++++++-------- 2 files changed, 82 insertions(+), 56 deletions(-) diff --git a/include/Game/Systems/CapturePointArrowHUDSystem.h b/include/Game/Systems/CapturePointArrowHUDSystem.h index 4c197f02..26462879 100644 --- a/include/Game/Systems/CapturePointArrowHUDSystem.h +++ b/include/Game/Systems/CapturePointArrowHUDSystem.h @@ -8,6 +8,7 @@ #include "Common.h" #include "Core/System.h" #include "Core/Transform.h" +#include "Core/ECaptured.h" class CapturePointArrowHUDSystem : public ImpureSystem @@ -18,6 +19,12 @@ public: virtual void Update(double dt) override; private: + EventRelay m_ECapturedEvent; + bool OnCapturePointCaptured(Events::Captured& e); + + bool m_InitialtargetsSet = false; + glm::vec3 m_RedTeamCurrentTarget; + glm::vec3 m_BlueTeamCurrentTarget; }; #endif \ No newline at end of file diff --git a/src/Game/Systems/CapturePointArrowHUDSystem.cpp b/src/Game/Systems/CapturePointArrowHUDSystem.cpp index 92c6ec0a..ee2254c7 100644 --- a/src/Game/Systems/CapturePointArrowHUDSystem.cpp +++ b/src/Game/Systems/CapturePointArrowHUDSystem.cpp @@ -4,12 +4,12 @@ CapturePointArrowHUDSystem::CapturePointArrowHUDSystem(SystemParams params) : System(params) , ImpureSystem() { + EVENT_SUBSCRIBE_MEMBER(m_ECapturedEvent, &CapturePointArrowHUDSystem::OnCapturePointCaptured); } void CapturePointArrowHUDSystem::Update(double dt) { - bool LoadCheck = true; int redTeam; int blueTeam; @@ -25,11 +25,13 @@ void CapturePointArrowHUDSystem::Update(double dt) for(auto& cArrowHUD : *ArrowHUDs) { //Get what team the current arrow corresponds to EntityWrapper ArrowEntity = EntityWrapper(m_World, cArrowHUD.EntityID); - EntityWrapper teamEntity = ArrowEntity.FirstParentWithComponent("Team"); - if (!teamEntity.Valid()) { + if (!ArrowEntity.Valid()) { continue; } - auto cTeam = teamEntity["Team"]; + if(!ArrowEntity.HasComponent("Team")) { + continue; + } + auto cTeam = ArrowEntity["Team"]; int currentTeam = (int)cTeam["Team"]; if (LoadCheck) { @@ -37,20 +39,60 @@ void CapturePointArrowHUDSystem::Update(double dt) blueTeam = (int)cTeam["Team"].Enum("Blue"); spectatorTeam = (int)cTeam["Team"].Enum("Spectator"); LoadCheck = false; + + + if (!m_InitialtargetsSet) { + glm::vec3 target1, target2; + EntityWrapper home1, home2; + + for (auto& cCP : *CapturePoints) { + auto homePointTeam = (int)cCP["HomePointForTeam"]; + auto CPID = (int)cCP["CapturePointNumber"]; + + if(CPID == 0) { + //Home point for one team + home1 = EntityWrapper(m_World, cCP.EntityID); + } else if (CPID == 1) { + //First target for one team, so save it for later use. + target1 = Transform::AbsolutePosition(EntityWrapper(m_World, cCP.EntityID)); + } else if (CPID == 3) { + //First target for one team, so save it for later use. + target2 = Transform::AbsolutePosition(EntityWrapper(m_World, cCP.EntityID)); + } else if (CPID == 4) { + //Home point for one team + home2 = EntityWrapper(m_World, cCP.EntityID); + } + } + //Check what team is the owner of Home1 and set their target to the next capturepoint + if((int)home1["CapturePoint"]["HomePointForTeam"] == redTeam) { + m_RedTeamCurrentTarget = target1; + } else if ((int)home1["CapturePoint"]["HomePointForTeam"] == blueTeam) { + m_BlueTeamCurrentTarget = target1; + } + + //Check what team is the owner of Home2 and set their target to the next capturepoint + if ((int)home2["CapturePoint"]["HomePointForTeam"] == redTeam) { + m_RedTeamCurrentTarget = target2; + } else if ((int)home2["CapturePoint"]["HomePointForTeam"] == blueTeam) { + m_BlueTeamCurrentTarget = target2; + } + } + + } //if red team, get red team next point, otherwise blue team next point. //Untill this is awailable we will just use the hardcoded value in the component. //This will also give us a position, so we wont need to loop through all capturePoints. glm::vec3 pos; - int target = cArrowHUD["CurrentTarget"]; - for(auto& cCP : *CapturePoints) { - if((int)cCP["CapturePointNumber"] == target) { - EntityWrapper CPEntity = EntityWrapper(m_World, cCP.EntityID); - pos = Transform::AbsolutePosition(CPEntity); - break; - } + if(currentTeam == redTeam) { + pos = m_RedTeamCurrentTarget; + } else if (currentTeam == blueTeam) { + pos = m_BlueTeamCurrentTarget; } + + pos = currentTeam == redTeam ? m_RedTeamCurrentTarget : currentTeam == blueTeam ? m_BlueTeamCurrentTarget : glm::vec3(0.f); + glm::vec3& arrowOri = ArrowEntity["Transform"]["Orientation"]; glm::vec3 lookVector = glm::normalize(Transform::AbsolutePosition(ArrowEntity) - pos); //Maybe should be player instead float pitch = std::asin(-lookVector.y); @@ -63,54 +105,31 @@ void CapturePointArrowHUDSystem::Update(double dt) arrowOri -= Transform::AbsoluteOrientationEuler(parent); } } +} - /* - bool LoadCheck = true; - int redTeam; - int blueTeam; - int spectatorTeam; - - auto CapturePointHUDElements = m_World->GetComponents("CapturePointHUD"); - auto CapturePoints = m_World->GetComponents("CapturePoint"); - if (CapturePointHUDElements == nullptr) { - return; +bool CapturePointArrowHUDSystem::OnCapturePointCaptured(Events::Captured& e) +{ + if (!e.NextCapturePoint.HasComponent("Team")) + { + return 0; } - if (!CapturePointHUDElements) { - return; + auto cTeam = e.NextCapturePoint["Team"]; + + int redTeam = (int)cTeam["Team"].Enum("Red"); + int blueTeam = (int)cTeam["Team"].Enum("Blue"); + int spectatorTeam = (int)cTeam["Team"].Enum("Spectator"); + int target = -1; + + if (e.NextCapturePoint.HasComponent("CapturePoint")) { + target = (int)e.NextCapturePoint["CapturePoint"]["CapturePointNumber"]; + } else { + return 0; } - for (auto& cCapturePointHUD : *CapturePointHUDElements) { - int HUD_ID = cCapturePointHUD["CapturePointNumber"]; - EntityWrapper entityHUD = EntityWrapper(m_World, cCapturePointHUD.EntityID); - EntityWrapper entityHUDparent = entityHUD.Parent(); - - for (auto& cCapturePoint : *CapturePoints) { - EntityWrapper entityCP = EntityWrapper(m_World, cCapturePoint.EntityID); - - //Check if the HUD corresponds to the Capture Point Number - if (HUD_ID == (int)entityCP["CapturePoint"]["CapturePointNumber"]) { - ComponentWrapper& teamComponent = entityCP["Team"]; - if (LoadCheck) { - redTeam = (int)teamComponent["Team"].Enum("Red"); - blueTeam = (int)teamComponent["Team"].Enum("Blue"); - spectatorTeam = (int)teamComponent["Team"].Enum("Spectator"); - LoadCheck = false; - } - //Color hud with team color - auto capturePointTeam = (int)teamComponent["Team"]; - entityHUDparent["Sprite"]["Color"] = capturePointTeam == blueTeam ? glm::vec4(0, 0.2f, 1, 0.7f) : capturePointTeam == redTeam ? glm::vec4(1, 0.0f, 0, 0.7f) : glm::vec4(1, 1, 1, 0.3f); - - //Progress is scaled with time - double currentCaptureTime = (double)entityCP["CapturePoint"]["CaptureTimer"]; - double progress = glm::abs(currentCaptureTime)/15.0; - int currentCapturingTeam = currentCaptureTime > 0 ? redTeam : currentCaptureTime < 0 ? blueTeam : spectatorTeam; - ((glm::vec3&)entityHUD["Transform"]["Orientation"]).z = currentCapturingTeam == redTeam ? glm::half_pi()+glm::pi() : glm::half_pi(); - glm::vec4 fillColor = currentCapturingTeam == redTeam ? glm::vec4(1, 0.f, 0, 0.7f) : glm::vec4(0, 0.2f, 1, 0.7f); - entityHUD["Fill"]["Color"] = fillColor; - entityHUD["Fill"]["Percentage"] = progress; - } - } + if(e.TeamNumberThatCapturedCapturePoint == redTeam) { + m_RedTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint); + } else if (e.TeamNumberThatCapturedCapturePoint == blueTeam) { + m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint);; } - */ -} \ No newline at end of file +} From 799990f44dbfd50b04a074d54d9c078efa49fb9a Mon Sep 17 00:00:00 2001 From: Tleety Date: Tue, 1 Mar 2016 22:54:13 +0100 Subject: [PATCH 05/10] Next CP indicator should now be fully working. --- assets | 2 +- resources/Schema/Entities/NewMap2version2.xml | 4690 +++++++++++++++++ .../Schema/Entities/NewMap2version3NEW.xml | 4612 ++++++++++++++++ resources/Schema/Entities/Player.xml | 61 +- resources/Schema/Entities/PlayerRed.xml | 9 +- .../Systems/CapturePointArrowHUDSystem.cpp | 8 +- 6 files changed, 9354 insertions(+), 28 deletions(-) create mode 100644 resources/Schema/Entities/NewMap2version2.xml create mode 100644 resources/Schema/Entities/NewMap2version3NEW.xml diff --git a/assets b/assets index 10a61165..72530423 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 10a611659ddaadfea6a560e707d395834855a979 +Subproject commit 72530423ad3744341f42cbfdcba18295a2cfac90 diff --git a/resources/Schema/Entities/NewMap2version2.xml b/resources/Schema/Entities/NewMap2version2.xml new file mode 100644 index 00000000..fcb81666 --- /dev/null +++ b/resources/Schema/Entities/NewMap2version2.xml @@ -0,0 +1,4690 @@ + + + + + + + + + + + + + + + + + + Models/Props/GroundTest.mesh + + + + + + + + + Models/Props/Walls/SciFiWallTop.mesh + + + + + + + + + Models/Props/Walls/SciFiWallBig.mesh + true + + + + + + + + + + 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/Highground1.mesh + + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + + Models/Props/Highground3.mesh + + + + + + + + + + + Models/Props/Highground4.mesh + + + + + + + + + + + Models/Props/Highground5.mesh + + + + + + + + + + Models/Props/Highground6.mesh + + + + + + + + + + + Models/Props/Highground7.mesh + + + + + + + + + + + + + Models/Props/Highground8.mesh + + + + + + + + + + + + + Models/Props/Highground9.mesh + + + + + + + + + + + + + Models/Props/Highground10.mesh + + + + + + + + + + + + + Models/Props/Highground6.mesh + + + + + + + + + + + + + Models/Props/Highground1.mesh + + + + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + + + + Models/Props/Highground3.mesh + + + + + + + + + + + + + Models/Props/Highground4.mesh + + + + + + + + + + + + + Models/Props/Highground5.mesh + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 5 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 4 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 2 + 1 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.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/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.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/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.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/SciFiBridge1Red.mesh + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.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/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 5 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + 4 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 2 + 1 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/HealthPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.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/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.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/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.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/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointBlue.mesh + + + + + + + + + + + + + 4 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 3 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointRed.mesh + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + + 10 + + + + + + + + + + + 1 + false + + + + + + + + + + + + 10 + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + 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 + + + + + + + + + + + + diff --git a/resources/Schema/Entities/NewMap2version3NEW.xml b/resources/Schema/Entities/NewMap2version3NEW.xml new file mode 100644 index 00000000..d24675cd --- /dev/null +++ b/resources/Schema/Entities/NewMap2version3NEW.xml @@ -0,0 +1,4612 @@ + + + + + + + + + + + + + + + + + + Models/Props/GroundTest.mesh + + + + + + + + + Models/Props/Walls/SciFiWallTop.mesh + + + + + + + + + Models/Props/Walls/SciFiWallBig.mesh + true + + + + + + + + + + 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/Highground1.mesh + + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + + Models/Props/Highground3.mesh + + + + + + + + + + + Models/Props/Highground4.mesh + + + + + + + + + + + Models/Props/Highground5.mesh + + + + + + + + + + Models/Props/Highground6.mesh + + + + + + + + + + + Models/Props/Highground7.mesh + + + + + + + + + + + + + Models/Props/Highground8.mesh + + + + + + + + + + + + + Models/Props/Highground9.mesh + + + + + + + + + + + + + Models/Props/Highground10.mesh + + + + + + + + + + + + + Models/Props/Highground6.mesh + + + + + + + + + + + + + Models/Props/Highground1.mesh + + + + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + + + + Models/Props/Highground3.mesh + + + + + + + + + + + + + Models/Props/Highground4.mesh + + + + + + + + + + + + + Models/Props/Highground5.mesh + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 5 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 4 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 2 + 1 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.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/Stones/BigStone.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/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.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/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.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/SciFiBridge1Red.mesh + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.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/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 5 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + 4 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + + 3 + + + + + + + + + + + + 2 + 1 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.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/Stones/BigStone.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/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.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/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.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/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointBlue.mesh + + + + + + + + + + + + + -15 + 4 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 3 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointRed.mesh + + + + + + + + + + + + + 15 + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + + 10 + + + + + + + + + + + 1 + false + + + + + + + + + + + + 10 + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + 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 + + + + + + + + + + + + diff --git a/resources/Schema/Entities/Player.xml b/resources/Schema/Entities/Player.xml index 88f153ae..2edbd4a5 100644 --- a/resources/Schema/Entities/Player.xml +++ b/resources/Schema/Entities/Player.xml @@ -13,7 +13,7 @@ - 1.6944730461160304 + 23.911064541134579 @@ -193,7 +193,6 @@ 3 - 0.80222018197612788 @@ -228,6 +227,7 @@ 4 + 1 @@ -283,7 +283,7 @@ Textures/Core/UnitHexagon.png - + @@ -294,7 +294,8 @@ - + 1 + Textures/Core/UnitHexagon_Rotated.png @@ -303,7 +304,7 @@ - + @@ -372,7 +373,7 @@ Idle - 0.67172915251515519 + 0.22110820884665827 1 @@ -386,30 +387,49 @@ + + DefenderWeapon + Schema/Entities/DefenderWeaponView.xml - - DefenderWeapon - + + AssaultWeapon + Schema/Entities/AssaultWeaponView.xml - - AssaultWeapon - + + + + + Models/Widgets/Arrows/Arrow10.mesh + + + + + + + + + + + + + + @@ -430,6 +450,7 @@ Idle + 1.6993789132803556 1 @@ -449,31 +470,31 @@ - - Schema/Entities/DefenderWeaponWorld.xml - - DefenderWeapon + + Schema/Entities/DefenderWeaponWorld.xml + + - - Schema/Entities/AssaultWeaponWorld.xml - - AssaultWeapon + + Schema/Entities/AssaultWeaponWorld.xml + + diff --git a/resources/Schema/Entities/PlayerRed.xml b/resources/Schema/Entities/PlayerRed.xml index 8982f58d..7f81ab05 100644 --- a/resources/Schema/Entities/PlayerRed.xml +++ b/resources/Schema/Entities/PlayerRed.xml @@ -13,7 +13,7 @@ - 326.69883589440087 + 361.81593010381596 @@ -373,7 +373,7 @@ Idle - 0.20909021680133577 + 1.6231050125476969 1 @@ -417,10 +417,11 @@ Models/Weapons/Blue/AssaultWeaponBlue.mesh + - + @@ -445,7 +446,7 @@ Idle - 0.22069183859343156 + 1.8847063959212136 1 diff --git a/src/Game/Systems/CapturePointArrowHUDSystem.cpp b/src/Game/Systems/CapturePointArrowHUDSystem.cpp index ee2254c7..e86a6844 100644 --- a/src/Game/Systems/CapturePointArrowHUDSystem.cpp +++ b/src/Game/Systems/CapturePointArrowHUDSystem.cpp @@ -64,6 +64,9 @@ void CapturePointArrowHUDSystem::Update(double dt) } } //Check what team is the owner of Home1 and set their target to the next capturepoint + if(!home1.Valid() || !home2.Valid()) { + return; + } if((int)home1["CapturePoint"]["HomePointForTeam"] == redTeam) { m_RedTeamCurrentTarget = target1; } else if ((int)home1["CapturePoint"]["HomePointForTeam"] == blueTeam) { @@ -77,10 +80,7 @@ void CapturePointArrowHUDSystem::Update(double dt) m_BlueTeamCurrentTarget = target2; } } - - } - //if red team, get red team next point, otherwise blue team next point. //Untill this is awailable we will just use the hardcoded value in the component. //This will also give us a position, so we wont need to loop through all capturePoints. @@ -132,4 +132,6 @@ bool CapturePointArrowHUDSystem::OnCapturePointCaptured(Events::Captured& e) } else if (e.TeamNumberThatCapturedCapturePoint == blueTeam) { m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint);; } + + m_InitialtargetsSet = true; } From 96768e66de68b699ad802933ec70afefc84581ee Mon Sep 17 00:00:00 2001 From: Tleety Date: Wed, 2 Mar 2016 09:57:41 +0100 Subject: [PATCH 06/10] Redplayer arrow fix --- resources/Schema/Entities/PlayerRed.xml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/resources/Schema/Entities/PlayerRed.xml b/resources/Schema/Entities/PlayerRed.xml index 7f81ab05..fab8e21e 100644 --- a/resources/Schema/Entities/PlayerRed.xml +++ b/resources/Schema/Entities/PlayerRed.xml @@ -13,7 +13,7 @@ - 361.81593010381596 + 384.13256760035051 @@ -373,7 +373,7 @@ Idle - 1.6231050125476969 + 0.75626404186195373 1 @@ -417,11 +417,15 @@ Models/Weapons/Blue/AssaultWeaponBlue.mesh - + + + + + - + @@ -446,7 +450,7 @@ Idle - 1.8847063959212136 + 1.1511986314122282 1 From 654084839252b7c6c9dd63be197e17252a0f3001 Mon Sep 17 00:00:00 2001 From: Tleety Date: Wed, 2 Mar 2016 11:59:56 +0100 Subject: [PATCH 07/10] WIP --- .../Systems/CapturePointArrowHUDSystem.cpp | 154 ++++++++++++------ src/Game/Systems/CapturePointSystem.cpp | 1 + 2 files changed, 104 insertions(+), 51 deletions(-) diff --git a/src/Game/Systems/CapturePointArrowHUDSystem.cpp b/src/Game/Systems/CapturePointArrowHUDSystem.cpp index e86a6844..3488c0a8 100644 --- a/src/Game/Systems/CapturePointArrowHUDSystem.cpp +++ b/src/Game/Systems/CapturePointArrowHUDSystem.cpp @@ -10,74 +10,134 @@ CapturePointArrowHUDSystem::CapturePointArrowHUDSystem(SystemParams params) void CapturePointArrowHUDSystem::Update(double dt) { - bool LoadCheck = true; + bool loadCheck = true; int redTeam; int blueTeam; int spectatorTeam; //Get list for all CapturePointArrowHUDComponents - auto ArrowHUDs = m_World->GetComponents("CapturePointArrowHUD"); - auto CapturePoints = m_World->GetComponents("CapturePoint"); - if(ArrowHUDs == nullptr) { + auto arrowHUDs = m_World->GetComponents("CapturePointArrowHUD"); + auto capturePoints = m_World->GetComponents("CapturePoint"); + if(arrowHUDs == nullptr) { return; } - for(auto& cArrowHUD : *ArrowHUDs) { + for(auto& cArrowHUD : *arrowHUDs) { //Get what team the current arrow corresponds to - EntityWrapper ArrowEntity = EntityWrapper(m_World, cArrowHUD.EntityID); - if (!ArrowEntity.Valid()) { + EntityWrapper arrowEntity = EntityWrapper(m_World, cArrowHUD.EntityID); + if (!arrowEntity.Valid()) { continue; } - if(!ArrowEntity.HasComponent("Team")) { + if(!arrowEntity.HasComponent("Team")) { continue; } - auto cTeam = ArrowEntity["Team"]; + auto cTeam = arrowEntity["Team"]; int currentTeam = (int)cTeam["Team"]; - if (LoadCheck) { + if (loadCheck) { redTeam = (int)cTeam["Team"].Enum("Red"); blueTeam = (int)cTeam["Team"].Enum("Blue"); spectatorTeam = (int)cTeam["Team"].Enum("Spectator"); - LoadCheck = false; + loadCheck = false; if (!m_InitialtargetsSet) { - glm::vec3 target1, target2; - EntityWrapper home1, home2; + std::unordered_map blueTargets, redTargets; + EntityWrapper homeBlue, homeRed; + int lastCP = -INFINITY; + int firstCP = INFINITY; - for (auto& cCP : *CapturePoints) { + for (auto& cCP : *capturePoints) { auto homePointTeam = (int)cCP["HomePointForTeam"]; - auto CPID = (int)cCP["CapturePointNumber"]; + EntityWrapper capturePointEntity = EntityWrapper(m_World, cCP.EntityID); + int capturePointID = (int)capturePointEntity["CapturePoint"]["CapturePointNumber"]; - if(CPID == 0) { - //Home point for one team - home1 = EntityWrapper(m_World, cCP.EntityID); - } else if (CPID == 1) { - //First target for one team, so save it for later use. - target1 = Transform::AbsolutePosition(EntityWrapper(m_World, cCP.EntityID)); - } else if (CPID == 3) { - //First target for one team, so save it for later use. - target2 = Transform::AbsolutePosition(EntityWrapper(m_World, cCP.EntityID)); - } else if (CPID == 4) { - //Home point for one team - home2 = EntityWrapper(m_World, cCP.EntityID); + if(capturePointID < firstCP) { + firstCP = capturePointID; + } + + if(capturePointID > lastCP) { + lastCP = capturePointID; + } + + if (!capturePointEntity.HasComponent("Team")) { + continue; + } + + int currentOwner = (int)capturePointEntity["Team"]["Team"]; + + if(currentOwner != redTeam) { + //This capturePoint is not owned by the red team and is therefor an eligible target for red team + glm::vec3 targetPos = Transform::AbsolutePosition(capturePointEntity); + redTargets.insert(std::pair(capturePointID, targetPos)); + } + if(currentOwner != blueTeam) { + //This capturePoint is not owned by the blue team and is therefor an eligible target for blue team + glm::vec3 targetPos = Transform::AbsolutePosition(capturePointEntity); + blueTargets.insert(std::pair(capturePointID, targetPos)); + } + + if(homePointTeam == blueTeam) { + //CP is the home point for blue team. + homeBlue = capturePointEntity; + } else if (homePointTeam == redTeam) { + //CP is the home point for red team. + homeRed = capturePointEntity; } } - //Check what team is the owner of Home1 and set their target to the next capturepoint - if(!home1.Valid() || !home2.Valid()) { + + if(!homeRed.Valid() || !homeBlue.Valid()) { + //One or both teams have no home point, cant continue return; } - if((int)home1["CapturePoint"]["HomePointForTeam"] == redTeam) { - m_RedTeamCurrentTarget = target1; - } else if ((int)home1["CapturePoint"]["HomePointForTeam"] == blueTeam) { - m_BlueTeamCurrentTarget = target1; + + std::unordered_map::const_iterator got; + //Find next target for red team. + if((int)homeRed["CapturePoint"]["CapturePointNumber"] == lastCP) { + //Red home base is the last capture point, count back from lastCP and find next target + for (int i = lastCP; i >= firstCP; i--) { + got = redTargets.find(i); + if(got == redTargets.end()) { + continue; + } else { + m_RedTeamCurrentTarget = got->second; + } + } + } else if ((int)homeRed["CapturePoint"]["CapturePointNumber"] == firstCP) { + //Red home is the first capture point, count forward from firstCP and find next target. + for (int i = firstCP; i <= lastCP; i++) { + got = redTargets.find(i); + if(got == redTargets.end()) { + //Target was not found, try the next one after that. + continue; + } else { + m_RedTeamCurrentTarget = got->second; + } + } } - //Check what team is the owner of Home2 and set their target to the next capturepoint - if ((int)home2["CapturePoint"]["HomePointForTeam"] == redTeam) { - m_RedTeamCurrentTarget = target2; - } else if ((int)home2["CapturePoint"]["HomePointForTeam"] == blueTeam) { - m_BlueTeamCurrentTarget = target2; + //Find next target for blue team + if ((int)homeBlue["CapturePoint"]["CapturePointNumber"] == lastCP) { + //Red home base is the last capture point, count back from lastCP and find next target + for (int i = lastCP; i >= firstCP; i--) { + got = blueTargets.find(i); + if (got == blueTargets.end()) { + continue; + } else { + m_BlueTeamCurrentTarget = got->second; + } + } + } else if ((int)homeBlue["CapturePoint"]["CapturePointNumber"] == firstCP) { + //Red home is the first capture point, count forward from firstCP and find next target. + for (int i = firstCP; i <= lastCP; i++) { + got = blueTargets.find(i); + if (got == blueTargets.end()) { + //Target was not found, try the next one after that. + continue; + } else { + m_BlueTeamCurrentTarget = got->second; + } + } } } } @@ -93,14 +153,14 @@ void CapturePointArrowHUDSystem::Update(double dt) pos = currentTeam == redTeam ? m_RedTeamCurrentTarget : currentTeam == blueTeam ? m_BlueTeamCurrentTarget : glm::vec3(0.f); - glm::vec3& arrowOri = ArrowEntity["Transform"]["Orientation"]; - glm::vec3 lookVector = glm::normalize(Transform::AbsolutePosition(ArrowEntity) - pos); //Maybe should be player instead + glm::vec3& arrowOri = arrowEntity["Transform"]["Orientation"]; + glm::vec3 lookVector = glm::normalize(Transform::AbsolutePosition(arrowEntity) - pos); //Maybe should be player instead float pitch = std::asin(-lookVector.y); float yaw = std::atan2(lookVector.x, lookVector.z); arrowOri.x = pitch; arrowOri.y = yaw; arrowOri.z = 0.f; - EntityWrapper parent = ArrowEntity.Parent(); + EntityWrapper parent = arrowEntity.Parent(); if (parent.Valid()) { arrowOri -= Transform::AbsoluteOrientationEuler(parent); } @@ -109,8 +169,7 @@ void CapturePointArrowHUDSystem::Update(double dt) bool CapturePointArrowHUDSystem::OnCapturePointCaptured(Events::Captured& e) { - if (!e.NextCapturePoint.HasComponent("Team")) - { + if (!e.NextCapturePoint.HasComponent("Team")) { return 0; } @@ -119,18 +178,11 @@ bool CapturePointArrowHUDSystem::OnCapturePointCaptured(Events::Captured& e) int redTeam = (int)cTeam["Team"].Enum("Red"); int blueTeam = (int)cTeam["Team"].Enum("Blue"); int spectatorTeam = (int)cTeam["Team"].Enum("Spectator"); - int target = -1; - - if (e.NextCapturePoint.HasComponent("CapturePoint")) { - target = (int)e.NextCapturePoint["CapturePoint"]["CapturePointNumber"]; - } else { - return 0; - } if(e.TeamNumberThatCapturedCapturePoint == redTeam) { m_RedTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint); } else if (e.TeamNumberThatCapturedCapturePoint == blueTeam) { - m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint);; + m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint); } m_InitialtargetsSet = true; diff --git a/src/Game/Systems/CapturePointSystem.cpp b/src/Game/Systems/CapturePointSystem.cpp index f748ff09..6cbb1b2f 100644 --- a/src/Game/Systems/CapturePointSystem.cpp +++ b/src/Game/Systems/CapturePointSystem.cpp @@ -103,6 +103,7 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp } } if (m_RecentlyCapturedNeedNextCapturePointNow) { + //TODO: Next capture point for both teams m_CapturedEvent.NextCapturePoint = m_CapturedEvent.TeamNumberThatCapturedCapturePoint == blueTeam ? m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Blue"]] : m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Red"]]; From 6968e71e0706a8adedbf8b135b7d25a6cf056107 Mon Sep 17 00:00:00 2001 From: Tleety Date: Wed, 2 Mar 2016 13:36:24 +0100 Subject: [PATCH 08/10] Arrow should now correctly track the next point no matter when you join the game --- src/Game/Systems/CapturePointArrowHUDSystem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Game/Systems/CapturePointArrowHUDSystem.cpp b/src/Game/Systems/CapturePointArrowHUDSystem.cpp index 3488c0a8..bf6951a2 100644 --- a/src/Game/Systems/CapturePointArrowHUDSystem.cpp +++ b/src/Game/Systems/CapturePointArrowHUDSystem.cpp @@ -101,6 +101,7 @@ void CapturePointArrowHUDSystem::Update(double dt) continue; } else { m_RedTeamCurrentTarget = got->second; + break; } } } else if ((int)homeRed["CapturePoint"]["CapturePointNumber"] == firstCP) { @@ -112,6 +113,7 @@ void CapturePointArrowHUDSystem::Update(double dt) continue; } else { m_RedTeamCurrentTarget = got->second; + break; } } } @@ -125,6 +127,7 @@ void CapturePointArrowHUDSystem::Update(double dt) continue; } else { m_BlueTeamCurrentTarget = got->second; + break; } } } else if ((int)homeBlue["CapturePoint"]["CapturePointNumber"] == firstCP) { @@ -136,6 +139,7 @@ void CapturePointArrowHUDSystem::Update(double dt) continue; } else { m_BlueTeamCurrentTarget = got->second; + break; } } } @@ -151,7 +155,7 @@ void CapturePointArrowHUDSystem::Update(double dt) pos = m_BlueTeamCurrentTarget; } - pos = currentTeam == redTeam ? m_RedTeamCurrentTarget : currentTeam == blueTeam ? m_BlueTeamCurrentTarget : glm::vec3(0.f); + //pos = currentTeam == redTeam ? m_RedTeamCurrentTarget : currentTeam == blueTeam ? m_BlueTeamCurrentTarget : glm::vec3(0.f); glm::vec3& arrowOri = arrowEntity["Transform"]["Orientation"]; glm::vec3 lookVector = glm::normalize(Transform::AbsolutePosition(arrowEntity) - pos); //Maybe should be player instead From ab7fd8954675185fc26ee176bf9ea0102c7b1d06 Mon Sep 17 00:00:00 2001 From: Tleety Date: Wed, 2 Mar 2016 13:56:35 +0100 Subject: [PATCH 09/10] Should now correctly track if another player takes your last capture point --- include/Engine/Core/ECaptured.h | 3 +- .../Schema/Entities/NewMap2version3NEW.xml | 75 +++++++++---------- .../Systems/CapturePointArrowHUDSystem.cpp | 42 ++++------- src/Game/Systems/CapturePointSystem.cpp | 5 +- 4 files changed, 57 insertions(+), 68 deletions(-) diff --git a/include/Engine/Core/ECaptured.h b/include/Engine/Core/ECaptured.h index 48771cd7..047c5d7d 100644 --- a/include/Engine/Core/ECaptured.h +++ b/include/Engine/Core/ECaptured.h @@ -13,7 +13,8 @@ struct Captured : Event { int TeamNumberThatCapturedCapturePoint; EntityID CapturePointTakenID; - EntityWrapper NextCapturePoint; + EntityWrapper BlueTeamNextCapturePoint; + EntityWrapper RedTeamNextCapturePoint; }; } diff --git a/resources/Schema/Entities/NewMap2version3NEW.xml b/resources/Schema/Entities/NewMap2version3NEW.xml index d24675cd..5b224de3 100644 --- a/resources/Schema/Entities/NewMap2version3NEW.xml +++ b/resources/Schema/Entities/NewMap2version3NEW.xml @@ -810,6 +810,7 @@ + 8 @@ -820,9 +821,8 @@ - + - @@ -852,6 +852,7 @@ + 8 @@ -862,9 +863,8 @@ - + - @@ -894,6 +894,7 @@ + 8 @@ -904,9 +905,8 @@ - + - @@ -936,6 +936,7 @@ + 8 @@ -946,9 +947,8 @@ - + - @@ -978,6 +978,7 @@ + 8 @@ -988,9 +989,8 @@ - + - @@ -1020,6 +1020,7 @@ + 8 @@ -1030,9 +1031,8 @@ - + - @@ -1062,6 +1062,7 @@ + 8 @@ -1072,9 +1073,8 @@ - + - @@ -2326,6 +2326,7 @@ + 8 @@ -2336,9 +2337,8 @@ - + - @@ -2368,6 +2368,7 @@ + 8 @@ -2378,9 +2379,8 @@ - + - @@ -2865,6 +2865,7 @@ + 8 @@ -2875,9 +2876,8 @@ - + - @@ -2907,6 +2907,7 @@ + 8 @@ -2917,9 +2918,8 @@ - + - @@ -2949,6 +2949,7 @@ + 8 @@ -2959,9 +2960,8 @@ - + - @@ -2991,6 +2991,7 @@ + 8 @@ -3001,9 +3002,8 @@ - + - @@ -3033,6 +3033,7 @@ + 8 @@ -3043,9 +3044,8 @@ - + - @@ -3075,6 +3075,7 @@ + 8 @@ -3085,9 +3086,8 @@ - + - @@ -3117,6 +3117,7 @@ + 8 @@ -3127,9 +3128,8 @@ - + - @@ -4225,6 +4225,7 @@ -15 4 + Models/Core/UnitCylinder.mesh @@ -4239,7 +4240,6 @@ - @@ -4261,6 +4261,7 @@ 3 + Models/Core/UnitCylinder.mesh @@ -4271,7 +4272,6 @@ - @@ -4293,6 +4293,7 @@ 2 + Models/Core/UnitCylinder.mesh @@ -4303,7 +4304,6 @@ - @@ -4325,6 +4325,7 @@ 1 + Models/Core/UnitCylinder.mesh @@ -4335,7 +4336,6 @@ - @@ -4360,6 +4360,7 @@ 15 + Models/Core/UnitCylinder.mesh @@ -4374,7 +4375,6 @@ - @@ -4445,7 +4445,6 @@ 1 - false diff --git a/src/Game/Systems/CapturePointArrowHUDSystem.cpp b/src/Game/Systems/CapturePointArrowHUDSystem.cpp index bf6951a2..9e327a43 100644 --- a/src/Game/Systems/CapturePointArrowHUDSystem.cpp +++ b/src/Game/Systems/CapturePointArrowHUDSystem.cpp @@ -11,9 +11,9 @@ CapturePointArrowHUDSystem::CapturePointArrowHUDSystem(SystemParams params) void CapturePointArrowHUDSystem::Update(double dt) { bool loadCheck = true; - int redTeam; - int blueTeam; - int spectatorTeam; + int redTeamEnum; + int blueTeamEnum; + int spectatorTeamEnum; //Get list for all CapturePointArrowHUDComponents auto arrowHUDs = m_World->GetComponents("CapturePointArrowHUD"); @@ -35,9 +35,9 @@ void CapturePointArrowHUDSystem::Update(double dt) int currentTeam = (int)cTeam["Team"]; if (loadCheck) { - redTeam = (int)cTeam["Team"].Enum("Red"); - blueTeam = (int)cTeam["Team"].Enum("Blue"); - spectatorTeam = (int)cTeam["Team"].Enum("Spectator"); + redTeamEnum = (int)cTeam["Team"].Enum("Red"); + blueTeamEnum = (int)cTeam["Team"].Enum("Blue"); + spectatorTeamEnum = (int)cTeam["Team"].Enum("Spectator"); loadCheck = false; @@ -66,21 +66,21 @@ void CapturePointArrowHUDSystem::Update(double dt) int currentOwner = (int)capturePointEntity["Team"]["Team"]; - if(currentOwner != redTeam) { + if(currentOwner != redTeamEnum) { //This capturePoint is not owned by the red team and is therefor an eligible target for red team glm::vec3 targetPos = Transform::AbsolutePosition(capturePointEntity); redTargets.insert(std::pair(capturePointID, targetPos)); } - if(currentOwner != blueTeam) { + if(currentOwner != blueTeamEnum) { //This capturePoint is not owned by the blue team and is therefor an eligible target for blue team glm::vec3 targetPos = Transform::AbsolutePosition(capturePointEntity); blueTargets.insert(std::pair(capturePointID, targetPos)); } - if(homePointTeam == blueTeam) { + if(homePointTeam == blueTeamEnum) { //CP is the home point for blue team. homeBlue = capturePointEntity; - } else if (homePointTeam == redTeam) { + } else if (homePointTeam == redTeamEnum) { //CP is the home point for red team. homeRed = capturePointEntity; } @@ -149,14 +149,12 @@ void CapturePointArrowHUDSystem::Update(double dt) //Untill this is awailable we will just use the hardcoded value in the component. //This will also give us a position, so we wont need to loop through all capturePoints. glm::vec3 pos; - if(currentTeam == redTeam) { + if(currentTeam == redTeamEnum) { pos = m_RedTeamCurrentTarget; - } else if (currentTeam == blueTeam) { + } else if (currentTeam == blueTeamEnum) { pos = m_BlueTeamCurrentTarget; } - //pos = currentTeam == redTeam ? m_RedTeamCurrentTarget : currentTeam == blueTeam ? m_BlueTeamCurrentTarget : glm::vec3(0.f); - glm::vec3& arrowOri = arrowEntity["Transform"]["Orientation"]; glm::vec3 lookVector = glm::normalize(Transform::AbsolutePosition(arrowEntity) - pos); //Maybe should be player instead float pitch = std::asin(-lookVector.y); @@ -173,21 +171,13 @@ void CapturePointArrowHUDSystem::Update(double dt) bool CapturePointArrowHUDSystem::OnCapturePointCaptured(Events::Captured& e) { - if (!e.NextCapturePoint.HasComponent("Team")) { + if(!e.BlueTeamNextCapturePoint.Valid() || !e.RedTeamNextCapturePoint.Valid()) { return 0; } - auto cTeam = e.NextCapturePoint["Team"]; - - int redTeam = (int)cTeam["Team"].Enum("Red"); - int blueTeam = (int)cTeam["Team"].Enum("Blue"); - int spectatorTeam = (int)cTeam["Team"].Enum("Spectator"); - - if(e.TeamNumberThatCapturedCapturePoint == redTeam) { - m_RedTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint); - } else if (e.TeamNumberThatCapturedCapturePoint == blueTeam) { - m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint); - } + m_RedTeamCurrentTarget = Transform::AbsolutePosition(e.RedTeamNextCapturePoint); + m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.BlueTeamNextCapturePoint); m_InitialtargetsSet = true; + return 0; } diff --git a/src/Game/Systems/CapturePointSystem.cpp b/src/Game/Systems/CapturePointSystem.cpp index 6cbb1b2f..0ff294b9 100644 --- a/src/Game/Systems/CapturePointSystem.cpp +++ b/src/Game/Systems/CapturePointSystem.cpp @@ -104,9 +104,8 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp } if (m_RecentlyCapturedNeedNextCapturePointNow) { //TODO: Next capture point for both teams - m_CapturedEvent.NextCapturePoint = m_CapturedEvent.TeamNumberThatCapturedCapturePoint == blueTeam ? - m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Blue"]] : - m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Red"]]; + m_CapturedEvent.BlueTeamNextCapturePoint = m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Blue"]]; + m_CapturedEvent.RedTeamNextCapturePoint = m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Red"]]; m_EventBroker->Publish(m_CapturedEvent); m_RecentlyCapturedNeedNextCapturePointNow = false; } From 78835f95d8bcb57e1818491ebcf780adb1d29fc0 Mon Sep 17 00:00:00 2001 From: Tleety Date: Wed, 2 Mar 2016 16:47:30 +0100 Subject: [PATCH 10/10] Removed comment --- src/Game/Systems/CapturePointSystem.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Game/Systems/CapturePointSystem.cpp b/src/Game/Systems/CapturePointSystem.cpp index 0ff294b9..0d6089c5 100644 --- a/src/Game/Systems/CapturePointSystem.cpp +++ b/src/Game/Systems/CapturePointSystem.cpp @@ -103,7 +103,6 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp } } if (m_RecentlyCapturedNeedNextCapturePointNow) { - //TODO: Next capture point for both teams m_CapturedEvent.BlueTeamNextCapturePoint = m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Blue"]]; m_CapturedEvent.RedTeamNextCapturePoint = m_CapturePointNumberToEntityMap[nextPossibleCapturePoint["Red"]]; m_EventBroker->Publish(m_CapturedEvent);