diff --git a/assets b/assets
index c44c64d..de87617 160000
--- a/assets
+++ b/assets
@@ -1 +1 @@
-Subproject commit c44c64df2b51139aaf4d0ba70c84ed4db868ef9f
+Subproject commit de8761706055c079374fe96c170b569c9cd6895d
diff --git a/src/GUI/HealthOverlay.h b/src/GUI/HealthOverlay.h
index f93c243..3e6c9a5 100644
--- a/src/GUI/HealthOverlay.h
+++ b/src/GUI/HealthOverlay.h
@@ -37,7 +37,7 @@ namespace GUI
if (!health)
return false;
- SetColor(glm::vec4(1.f, 1.f, 1.f, 1 - (health->Amount / 100.f * 2)));
+ SetColor(glm::vec4(1.f, 1.f, 1.f, 1 - (health->Amount / 100.f / 2.f)));
return true;
}
diff --git a/src/GUI/PlayerHUD.h b/src/GUI/PlayerHUD.h
index 96b9967..7e89437 100644
--- a/src/GUI/PlayerHUD.h
+++ b/src/GUI/PlayerHUD.h
@@ -63,6 +63,10 @@ namespace GUI
EventRelay m_EDead;
bool OnDead(const Events::Dead &event)
{
+ auto playerCo = m_World->GetComponent(event.Entity);
+ if (!playerCo || m_PlayerID != playerCo->ID)
+ return false;
+
m_VehicleSelection->Show();
m_HealthOverlay->SetColor(glm::vec4(1, 1, 1, 0));
return true;
diff --git a/src/Systems/PhysicsSystem.cpp b/src/Systems/PhysicsSystem.cpp
index 6cf68a5..c6611d3 100644
--- a/src/Systems/PhysicsSystem.cpp
+++ b/src/Systems/PhysicsSystem.cpp
@@ -919,6 +919,12 @@ bool Systems::PhysicsSystem::OnDead( const Events::Dead &e )
{
m_World->RemoveComponent(e.Entity);
}
+
+ auto listener = m_World->GetComponent(e.Entity);
+ if (listener)
+ {
+ m_World->RemoveComponent(e.Entity);
+ }
}
return true;
diff --git a/src/Systems/PhysicsSystem.h b/src/Systems/PhysicsSystem.h
index 9be1694..17ae9f1 100644
--- a/src/Systems/PhysicsSystem.h
+++ b/src/Systems/PhysicsSystem.h
@@ -87,6 +87,7 @@
#include "Components/Trigger.h"
#include "Components/Template.h"
#include "Components/Camera.h"
+#include "Components/Listener.h"
#include "Events/EnterTrigger.h"
#include "Events/JeepSteer.h"
#include "Events/Dead.h"
diff --git a/src/Systems/TankSteeringSystem.cpp b/src/Systems/TankSteeringSystem.cpp
index dddf219..db44598 100644
--- a/src/Systems/TankSteeringSystem.cpp
+++ b/src/Systems/TankSteeringSystem.cpp
@@ -61,7 +61,7 @@ void Systems::TankSteeringSystem::UpdateEntity(double dt, EntityID entity, Entit
if(vehicleComp)
{
auto transform = m_World->GetComponent(entity);
- if(transform->Position.y < 0)
+ if (transform->Position.y < -15 && transform->Position.y > -100)
{
Events::Dead e;
e.Entity = entity;
@@ -596,8 +596,8 @@ EntityID Systems::TankSteeringSystem::CreateTank(int playerID)
auto shape = m_World->CreateEntity(shot);
auto transform = m_World->AddComponent(shape);
auto boxShape = m_World->AddComponent(shape);
- boxShape->Width = 0.5f;
- boxShape->Height = 0.5f;
+ boxShape->Width = 0.1f;
+ boxShape->Height = 0.1f;
boxShape->Depth = 0.5f;
m_World->CommitEntity(shape);
}