From 2fa3637018fd94962004d75da160cbc9e26fe7cf Mon Sep 17 00:00:00 2001 From: William Moberg Date: Sun, 13 Mar 2016 15:26:35 +0100 Subject: [PATCH 1/4] Transform.cpp was deleted since stuff was moved to TransformSystem, takes care of linker warnings. --- src/Engine/Core/Transform.cpp | 162 ---------------------------------- 1 file changed, 162 deletions(-) delete mode 100644 src/Engine/Core/Transform.cpp diff --git a/src/Engine/Core/Transform.cpp b/src/Engine/Core/Transform.cpp deleted file mode 100644 index 43b5109d..00000000 --- a/src/Engine/Core/Transform.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include "Core/TransformSystem.h" - -std::unordered_map TransformSystem::PositionCache; -std::unordered_map TransformSystem::OrientationCache; -std::unordered_map TransformSystem::ScaleCache; -std::unordered_map TransformSystem::MatrixCache; - -int TransformSystem::RecalculatedPositions = 0; -int TransformSystem::RecalculatedOrientations = 0; -int TransformSystem::RecalculatedScales = 0; - -TransformSystem::TransformSystem(SystemParams params) - : System(params) -{ - EVENT_SUBSCRIBE_MEMBER(m_EEntityDeleted, &TransformSystem::OnEntityDeleted); -} - -bool TransformSystem::OnEntityDeleted(const Events::EntityDeleted& e) -{ - // Clean up deleted entity - PositionCache.erase(e.DeletedEntity); - OrientationCache.erase(e.DeletedEntity); - ScaleCache.erase(e.DeletedEntity); - MatrixCache.erase(e.DeletedEntity); - return true; -} - -//glm::mat4 Transform::AbsoluteTransformation(EntityWrapper entity) -//{ -// glm::mat4 t = glm::mat4(1.f); -// -// while (entity.Valid()) { -// t = glm::translate((const glm::vec3&)entity["Transform"]["Position"]) * glm::toMat4(glm::quat((const glm::vec3&)entity["Transform"]["Orientation"])) * glm::scale((const glm::vec3&)entity["Transform"]["Scale"]) * t; -// entity = entity.Parent(); -// } -// -// return t; -//} - -glm::vec3 TransformSystem::AbsolutePosition(World* world, EntityID entity) -{ - return TransformSystem::AbsolutePosition(EntityWrapper(world, entity)); -} - -glm::vec3 TransformSystem::AbsolutePosition(EntityWrapper entity) -{ - if (!entity.Valid()) { - return glm::vec3(); - } - - auto cacheIt = PositionCache.find(entity); - ComponentWrapper cTransform = entity["Transform"]; - ComponentWrapper::SubscriptProxy cTransformPosition = cTransform["Position"]; - if (cacheIt != PositionCache.end() && !cTransformPosition.Dirty(DirtySetType::Transform)) { - return cacheIt->second; - } else { - EntityWrapper parent = entity.Parent(); - // Calculate position - glm::vec3 position = AbsolutePosition(parent) + TransformSystem::AbsoluteOrientation(parent) * (TransformSystem::AbsoluteScale(parent) * (const glm::vec3&)cTransformPosition); - // Cache it - PositionCache[entity] = position; - RecalculatedPositions++; - // Unset dirty flag - cTransformPosition.SetDirty(DirtySetType::Transform, false); - return position; - } -} - -glm::vec3 TransformSystem::AbsoluteOrientationEuler(EntityWrapper entity) -{ - glm::vec3 orientation; - - while (entity.Valid()) { - ComponentWrapper transform = entity["Transform"]; - orientation += (Field)transform["Orientation"]; - entity = entity.Parent(); - } - - return orientation; -} - -glm::quat TransformSystem::AbsoluteOrientation(World* world, EntityID entity) -{ - return TransformSystem::AbsoluteOrientation(EntityWrapper(world, entity)); -} - -glm::quat TransformSystem::AbsoluteOrientation(EntityWrapper entity) -{ - if (!entity.Valid()) { - return glm::quat(); - } - - auto cacheIt = OrientationCache.find(entity); - ComponentWrapper cTransform = entity["Transform"]; - ComponentWrapper::SubscriptProxy cTransformOrientation = cTransform["Orientation"]; - if (cacheIt != OrientationCache.end() && !cTransformOrientation.Dirty(DirtySetType::Transform)) { - return cacheIt->second; - } else { - EntityWrapper parent = entity.Parent(); - // Calculate orientation - glm::quat orientation = AbsoluteOrientation(parent) * glm::quat((const glm::vec3&)cTransformOrientation); - // Cache it - OrientationCache[entity] = orientation; - RecalculatedOrientations++; - // Unset dirty flag - cTransformOrientation.SetDirty(DirtySetType::Transform, false); - return orientation; - } -} - -glm::vec3 TransformSystem::AbsoluteScale(World* world, EntityID entity) -{ - return TransformSystem::AbsoluteScale(EntityWrapper(world, entity)); -} - -glm::vec3 TransformSystem::AbsoluteScale(EntityWrapper entity) -{ - if (!entity.Valid()) { - return glm::vec3(1.f); - } - - auto cacheIt = ScaleCache.find(entity); - ComponentWrapper cTransform = entity["Transform"]; - ComponentWrapper::SubscriptProxy cTransformScale = cTransform["Scale"]; - if (cacheIt != ScaleCache.end() && !cTransformScale.Dirty(DirtySetType::Transform)) { - return cacheIt->second; - } else { - EntityWrapper parent = entity.Parent(); - // Calculate scale - glm::vec3 scale = AbsoluteScale(parent) * (const glm::vec3&)cTransformScale; - // Cache it - ScaleCache[entity] = scale; - RecalculatedPositions++; - // Unset dirty flag - cTransformScale.SetDirty(DirtySetType::Transform, false); - return scale; - } -} - -glm::mat4 TransformSystem::ModelMatrix(EntityID entityID, World* world) -{ - return ModelMatrix(EntityWrapper(world, entityID)); -} - -glm::mat4 TransformSystem::ModelMatrix(EntityWrapper entity) -{ - auto cacheIt = MatrixCache.find(entity); - ComponentWrapper cTransform = entity["Transform"]; - bool isDirty = cTransform["Position"].Dirty(DirtySetType::Transform) || cTransform["Orientation"].Dirty(DirtySetType::Transform) || cTransform["Scale"].Dirty(DirtySetType::Transform); - if (cacheIt != MatrixCache.end() && !isDirty) { - return cacheIt->second; - } else { - glm::mat4 matrix = glm::translate(AbsolutePosition(entity)) * glm::toMat4(AbsoluteOrientation(entity)) * glm::scale(AbsoluteScale(entity)); - MatrixCache[entity] = matrix; - return matrix; - } -} - -glm::vec3 TransformSystem::TransformPoint(const glm::vec3& point, const glm::mat4& matrix) -{ - return glm::vec3(matrix * glm::vec4(point.x, point.y, point.z, 1)); -} \ No newline at end of file From 5ea0f04b20c2adb3613162191ff125bfcb78e52f Mon Sep 17 00:00:00 2001 From: Jocke Date: Sun, 13 Mar 2016 16:21:55 +0100 Subject: [PATCH 2/4] Added pop up for client when server timeouts. --- include/Engine/Network/Client.h | 31 ++++++++++++++++--------------- src/Engine/Network/Client.cpp | 13 +++++++++++-- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/include/Engine/Network/Client.h b/include/Engine/Network/Client.h index 29e9ac9a..cb1803cf 100644 --- a/include/Engine/Network/Client.h +++ b/include/Engine/Network/Client.h @@ -10,30 +10,31 @@ #include #include +#include "Core/World.h" +#include "Core/EntityFile.h" +#include "Core/EventBroker.h" +#include "Core/ConfigFile.h" +#include "Core/EPlayerDeath.h" +#include "Core/EPlayerDamage.h" +#include "Core/EPlayerSpawned.h" +#include "Core/EAmmoPickup.h" +#include "Game/Events/EDoubleJump.h" +#include "Game/Events/EDashAbility.h" +#include "Game/Events/EReset.h" +#include "Input/EInputCommand.h" +#include "imgui/imgui.h" #include "Network/Network.h" #include "Network/MessageType.h" #include "Network/PlayerDefinition.h" #include "Network/UDPClient.h" #include "Network/TCPClient.h" #include "Network/SnapshotDefinitions.h" -#include "Core/World.h" -#include "Core/EntityFile.h" -#include "Core/EventBroker.h" -#include "Core/ConfigFile.h" -#include "Core/EPlayerDeath.h" -#include "Input/EInputCommand.h" -#include "Core/EPlayerDamage.h" -#include "../Game/Events/EDoubleJump.h" -#include "Network/EInterpolate.h" -#include "Network/SnapshotFilter.h" -#include "Core/EPlayerSpawned.h" -#include "Core/EAmmoPickup.h" -#include "Network/ESearchForServers.h" -#include "../Game/Events/EDashAbility.h" #include "Network/EDisplayServerlist.h" #include "Network/EConnectRequest.h" #include "Network/EPlayerDisconnected.h" -#include "Game/Events/EReset.h" +#include "Network/ESearchForServers.h" +#include "Network/EInterpolate.h" +#include "Network/SnapshotFilter.h" class Client : public Network { diff --git a/src/Engine/Network/Client.cpp b/src/Engine/Network/Client.cpp index 705872fa..94836ece 100644 --- a/src/Engine/Network/Client.cpp +++ b/src/Engine/Network/Client.cpp @@ -108,7 +108,15 @@ void Client::Update(double dt) hasServerTimedOut(); } - //Network::Update(); + + if (ImGui::BeginPopupModal("Disconnected", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::Text("You have been disconnected from server.\n\n"); + ImGui::SetCursorPosX(ImGui::GetContentRegionAvailWidth() - 120); + if (ImGui::Button("OK", ImVec2(120, 0))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + } } void Client::parseMessageType(Packet& packet) @@ -196,7 +204,7 @@ void Client::parseTCPConnect(Packet& packet) packet.WritePrimitive(m_PlayerID); m_Unreliable.Send(packet); - // LOG_INFO("Sent UDP Connect Server"); + // LOG_INFO("Sent UDP Connect Server"); } void Client::parsePlayerConnected(Packet & packet) @@ -676,6 +684,7 @@ void Client::hasServerTimedOut() if (timeSincePing > m_TimeoutMs) { // Clear everything and go to menu. LOG_INFO("Server has timed out, returning to menu, Beep Boop."); + ImGui::OpenPopup("Disconnected"); disconnect(); } } From d3927de7cc1318308144ccdee0a571211a366949 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Sun, 13 Mar 2016 19:51:01 +0100 Subject: [PATCH 3/4] Super fancy new class pick, don't overwrite plz --- assets | 2 +- resources/Schema/Entities/OverwatchCamera.xml | 2927 +++++++++++++++-- src/Game/Systems/SpectatorCameraSystem.cpp | 6 +- 3 files changed, 2639 insertions(+), 296 deletions(-) diff --git a/assets b/assets index 504752c9..6ffc1ab8 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 504752c94966c432513cac35acf906f8c9a3f965 +Subproject commit 6ffc1ab82aa36a933b84b9eb4d50e013e9ad9911 diff --git a/resources/Schema/Entities/OverwatchCamera.xml b/resources/Schema/Entities/OverwatchCamera.xml index 92540e5b..6694121e 100644 --- a/resources/Schema/Entities/OverwatchCamera.xml +++ b/resources/Schema/Entities/OverwatchCamera.xml @@ -3,12 +3,12 @@ - 0.049999997019767761 + 0.014999999664723873 - - + + @@ -16,188 +16,1139 @@ - + - + - + - + - + - - - false - Models/Core/UnitQuad.mesh - - Textures/Icons/Classes/Assault-01.png - - PickClass + PickTeam 1 - - + - + - - Assault - Fonts/DroidSans.ttf,64 - - + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + + + + PickClass + 1 + - - + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + + Blend + + + + 1.6000000238418579 + Models/Characters/Assault/AssaultBluePose.mesh + false + + + + + + + + + + + + AssaultPoseF + + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Blue/AssaultWeaponBlue.mesh + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + + + 0.30000001192092896 + + + + + + + + + + + + + + + + + + + + + \1 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + Assault + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + 100 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Team Speed Boost + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \1 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \4 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \7 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dash + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Square/Superman-01.png + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Shoe-01.png + + + + + + + + + + + + x2 Jump + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + - + - - - false - Models/Core/UnitQuad.mesh - - Textures/Icons/Classes/Defender-01.png - - PickClass - 2 + PickTeam + 1 - - - - + - + - - Defender - Fonts/DroidSans.ttf,64 - - + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + + + + PickClass + 2 + - - + - - - - - - - false - Models/Core/UnitQuad.mesh - - Textures/Icons/Classes/Sniper-01.png - - - PickClass - 3 - - - - - - - - + - - Sniper - Fonts/DroidSans.ttf,64 - - + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + + Blend + + + + 1.6000000238418579 + Models/Characters/Defender/DefenderBluePose.mesh + false + - - + + + - + + + + + DefenderPoseF + + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Blue/DefenderWeaponBlue.mesh + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + + + 0.30000001192092896 + + + + + + + + + + + + + + + + + + + + + \2 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + Defender + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + 150 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Team Shield Boost + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \2 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \5 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \7 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Personal Shield + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Square/SheildDots-01.png + + + + + + + + + + + + + + - + - - Pick Class - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - false - Models/Core/UnitQuad.mesh - - Textures/Core/UnitHexagon.png - - - SwapToTeamPick + PickTeam 1 - - + - + - - Change - Fonts/DroidSans.ttf,64 - + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + + + + PickClass + 3 + - - + - + - - Team - Fonts/DroidSans.ttf,64 - + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + + Blend + + + + 1.6000000238418579 + Models/Characters/Sniper/SniperBluePose.mesh + false + - - + + + - + + + + + SniperPoseF + + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Blue/SecondaryWeaponBlue.mesh + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + + + 0.30000001192092896 + + + + + + + + + + + + + + + + + + + + + \3 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + Sniper + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + 100 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Team Accuracy Boost + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \3 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \6 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \7 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sprint + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Square/Dash-01.png + + + + + + + + + + + + + + @@ -214,53 +1165,119 @@ - + - + - - Pick Team - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - false - Models/Core/UnitQuad.mesh - - Textures/Core/UnitHexagon.png - - - - PickTeam - 1 - - - - + - + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + PickTeam + 3 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + - Spectator + Blue Fonts/DroidSans.ttf,64 + + + - - + + @@ -269,123 +1286,228 @@ - - - Models/Core/UnitQuad.mesh - - Textures/Core/UnitHexagon.png - - true - - - PickTeam - 2 - - - + - + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + PickTeam + 2 + + + + + + + + Red Fonts/DroidSans.ttf,64 + + + - - + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + - + - - - false - Models/Core/UnitQuad.mesh - - Textures/Core/UnitHexagon.png - - true - - - PickTeam - 3 - - - + - + - - Blue - Fonts/DroidSans.ttf,64 - + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + PickTeam + 1 + - - + - - - - - - - false - Models/Core/UnitQuad.mesh - - Textures/Core/UnitHexagon.png - - false - - - SwapToClassPick - 1 - - - - - - - - + - Change + Spectator Fonts/DroidSans.ttf,64 - false - - + + - + - - Class - Fonts/DroidSans.ttf,64 - false - - - - - + - + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + @@ -483,6 +1605,7 @@ + 1 @@ -559,8 +1682,7 @@ - 0.10332605343919568 - + 1 @@ -573,7 +1695,7 @@ - + @@ -598,7 +1720,8 @@ - + 1 + @@ -609,7 +1732,7 @@ - + @@ -619,100 +1742,1316 @@ - + - - - false - Models/Core/UnitQuad.mesh - - Textures/Core/UnitHexagon.png - - - - SwapToTeamPick - 1 - - - + - + - - Change - Fonts/DroidSans.ttf,64 - - - + - + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + SwapToTeamPick + 1 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + Change Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + - + - - Team - Fonts/DroidSans.ttf,64 - - - + - + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + SwapToClassPick + 1 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + Change Class + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + - - - false - Models/Core/UnitQuad.mesh - - Textures/Core/UnitHexagon.png - - - SwapToClassPick + PickTeam 1 - - + - + - - Change - Fonts/DroidSans.ttf,64 - + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + + + + PickClass + 1 + - - + - + - - Class - Fonts/DroidSans.ttf,64 - + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + + Blend + + + + 1.6000000238418579 + Models/Characters/Assault/AssaultRedPose.mesh + false + - - + + + + + + + + + + AssaultPoseF + + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Red/AssaultWeaponRed.mesh + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + + + 0.30000001192092896 + + + + + + + + + + + + + + + + + + + + + \1 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + Assault + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + 100 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Team Speed Boost + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \1 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \4 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \7 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dash + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Square/Superman-01.png + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Shoe-01.png + + + + + + + + + + + + x2 Jump + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + PickTeam + 1 + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + + + + PickClass + 2 + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + + Blend + + + + 1.6000000238418579 + Models/Characters/Defender/DefenderRedPose.mesh + false + + + + + + + + + + + + DefenderPoseF + + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Red/DefenderWeaponRed.mesh + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + + + 0.30000001192092896 + + + + + + + + + + + + + + + + + + + + + \2 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + Defender + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + 150 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Team Shield Boost + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \2 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \5 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \7 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Personal Shield + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Square/SheildDots-01.png + + + + + + + + + + + + + + + + + + + + + PickTeam + 1 + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + + + + PickClass + 3 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + + Blend + + + + 1.6000000238418579 + Models/Characters/Sniper/SniperRedPose.mesh + false + + + + + + + + + + + + SniperPoseF + + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Red/SecondaryWeaponRed.mesh + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + + + 0.30000001192092896 + + + + + + + + + + + + + + + + + + + + + \3 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + Sniper + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + 100 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Team Accuracy Boost + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \3 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \6 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + \7 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sprint + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Square/Dash-01.png + + + + + + + + + + + + + + + diff --git a/src/Game/Systems/SpectatorCameraSystem.cpp b/src/Game/Systems/SpectatorCameraSystem.cpp index 23dfb164..59f41a8f 100644 --- a/src/Game/Systems/SpectatorCameraSystem.cpp +++ b/src/Game/Systems/SpectatorCameraSystem.cpp @@ -52,7 +52,11 @@ bool SpectatorCameraSystem::OnInputCommand(const Events::InputCommand& e) // 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"; + if (m_PickedTeam == 2) { + camName = "PickClassCameraRed"; + } else if (m_PickedTeam == 3) { + camName = "PickClassCameraBlue"; + } } else if (e.Command == "SwapToTeamPick") { camName = "PickTeamCamera"; } else { From e76740d72bd40102db6234147ee987d20bbe8f0a Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Sun, 13 Mar 2016 19:53:34 +0100 Subject: [PATCH 4/4] Point lights child of a camera no longer visible to other cameras --- src/Engine/Rendering/RenderSystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Engine/Rendering/RenderSystem.cpp b/src/Engine/Rendering/RenderSystem.cpp index 0bc0eb93..578ab44c 100644 --- a/src/Engine/Rendering/RenderSystem.cpp +++ b/src/Engine/Rendering/RenderSystem.cpp @@ -362,6 +362,11 @@ void RenderSystem::fillPointLights(std::list>& jobs, continue; } + EntityWrapper entity(world, pointlightC.EntityID); + if (!isEntityVisible(entity)) { + continue; + } + std::shared_ptr pointLightJob = std::shared_ptr(new PointLightJob(transformC, pointlightC, m_World)); jobs.push_back(pointLightJob); }