From b4cec1747e73be8ebfbf6875e5a071c6fe2c230c Mon Sep 17 00:00:00 2001 From: Tleety Date: Thu, 5 Jun 2014 06:53:34 +0200 Subject: [PATCH 1/3] turrets now aiming as they should --- src/GameWorld.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/GameWorld.cpp b/src/GameWorld.cpp index 6fc68ea..45918ff 100755 --- a/src/GameWorld.cpp +++ b/src/GameWorld.cpp @@ -688,9 +688,11 @@ void GameWorld::CreateGate(EntityID parent, glm::vec3 position, glm::quat orient EntityID GameWorld::CreateTower(EntityID parent, glm::vec3 pos, int teamID) { - auto towerBase = CreateEntity(parent); + auto parentTransform = GetComponent(parent); + + auto towerBase = CreateEntity(); auto transform = AddComponent(towerBase); - transform->Position = pos; + transform->Position = parentTransform->Orientation * pos; auto towerComponent = AddComponent(towerBase); @@ -1408,7 +1410,8 @@ void GameWorld::CreateBase(glm::quat orientation, int teamID) CreateTower(base, glm::vec3(273.01227f, 40.30102f, -62.82098f), teamID); CreateTower(base, glm::vec3(357.36978f, 40.43885f, -62.82098f), teamID); CreateTower(base, glm::vec3(357.36978f, 40.43885f, 32.99123f), teamID); - CreateTower(base, glm::vec3(119.64996f, 28.90156f, 16.63123f), teamID); + + CreateTower(base, glm::vec3(119.64996f, 28.90156f, -16.63123f), teamID); CreateTower(base, glm::vec3(119.05541f, 29.54314f, 18.33529f), teamID); CreateGarage(base, glm::vec3(323.2f, 41.4f, -10.2f), glm::quat(glm::vec3(0, glm::pi() / 2.f, 0)), teamID); From d3dca03f476046d88b27dae641f6b0e02d2c0a21 Mon Sep 17 00:00:00 2001 From: ViktorLjung Date: Thu, 5 Jun 2014 06:56:42 +0200 Subject: [PATCH 2/3] fix --- src/Systems/PhysicsSystem.cpp | 12 +++++++++++- src/Systems/PhysicsSystem.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Systems/PhysicsSystem.cpp b/src/Systems/PhysicsSystem.cpp index b031c87..2ce99da 100644 --- a/src/Systems/PhysicsSystem.cpp +++ b/src/Systems/PhysicsSystem.cpp @@ -908,7 +908,17 @@ bool Systems::PhysicsSystem::OnDead( const Events::Dead &e ) m_RigidBodyEntities.erase(m_RigidBodies[e.Entity]); m_RigidBodies.erase(e.Entity);*/ - m_World->RemoveComponent(e.Entity); + auto jeep = m_World->GetComponent(e.Entity); + if(jeep) + { + m_World->RemoveComponent(e.Entity); + } + + auto tank = m_World->GetComponent(e.Entity); + if(tank) + { + m_World->RemoveComponent(e.Entity); + } } return true; diff --git a/src/Systems/PhysicsSystem.h b/src/Systems/PhysicsSystem.h index 1adc355..9be1694 100644 --- a/src/Systems/PhysicsSystem.h +++ b/src/Systems/PhysicsSystem.h @@ -90,6 +90,7 @@ #include "Events/EnterTrigger.h" #include "Events/JeepSteer.h" #include "Events/Dead.h" +#include "Components/JeepSteering.h" namespace Systems { From 75a19fbfe07ad4a62de5d32b15f30842d24e9e1e Mon Sep 17 00:00:00 2001 From: ViktorLjung Date: Thu, 5 Jun 2014 06:57:46 +0200 Subject: [PATCH 3/3] Merge branch 'master' of github.com:sippeangelo/Return-to-the-Return-of-Return-Fire-2-Returngeance --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 8ab7df0..c44c64d 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 8ab7df0d7fdb3bd0a1355192670c28826a860bb1 +Subproject commit c44c64df2b51139aaf4d0ba70c84ed4db868ef9f