Fixed physics relative orientations!

This commit is contained in:
2014-06-04 04:18:44 +02:00
parent 7d9f1a7ac7
commit e11f656b3d
6 changed files with 298 additions and 275 deletions
+4 -4
View File
@@ -300,11 +300,11 @@ bool Systems::TankSteeringSystem::OnSpawnVehicle(const Events::SpawnVehicle &eve
return false;
}
for (auto &spawnPointComponent : *spawnPointComponents)
for (auto &component : *spawnPointComponents)
{
auto spawnPoint = spawnPointComponent->Entity;
auto spawnPointBaseParent = m_World->GetEntityBaseParent(spawnPoint);
auto playerComponent = m_World->GetComponent<Components::Player>(spawnPointBaseParent);
auto spawnPoint = component->Entity;
auto spawnPointComponent = std::dynamic_pointer_cast<Components::SpawnPoint>(component);
auto playerComponent = m_World->GetComponent<Components::Player>(spawnPointComponent->Player);
if (!playerComponent || playerComponent->ID != event.PlayerID)
continue;