Player/Team specific triggers
This commit is contained in:
@@ -8,8 +8,6 @@ namespace Components
|
||||
|
||||
struct SpawnPoint : Component
|
||||
{
|
||||
EntityID Player;
|
||||
|
||||
virtual SpawnPoint* Clone() const override { return new SpawnPoint(*this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef Components_Team_h__
|
||||
#define Components_Team_h__
|
||||
|
||||
#include "Component.h"
|
||||
#include "Entity.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Team : Component
|
||||
{
|
||||
unsigned int TeamID;
|
||||
|
||||
virtual Team* Clone() const override { return new Team(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
#endif // !Components_Team_h__
|
||||
@@ -9,6 +9,7 @@ namespace Components
|
||||
struct Trigger : Component
|
||||
{
|
||||
bool TriggerOnce;
|
||||
int TeamID;
|
||||
virtual Trigger* Clone() const override { return new Trigger(*this); }
|
||||
};
|
||||
|
||||
|
||||
+18
-131
@@ -421,6 +421,7 @@ void GameWorld::RegisterComponents()
|
||||
m_ComponentFactory.Register<Components::Flag>([]() { return new Components::Flag(); });
|
||||
m_ComponentFactory.Register<Components::Move>([]() { return new Components::Move(); });
|
||||
m_ComponentFactory.Register<Components::Rotate>([]() { return new Components::Rotate(); });
|
||||
m_ComponentFactory.Register<Components::Team>([]() { return new Components::Team(); });
|
||||
}
|
||||
|
||||
void GameWorld::RegisterSystems()
|
||||
@@ -507,7 +508,7 @@ void GameWorld::BindGamepadButton(Gamepad::Button button, std::string command, f
|
||||
EventBroker->Publish(e);
|
||||
}
|
||||
|
||||
void GameWorld::CreateGate(EntityID parent, glm::vec3 position, glm::quat orientation)
|
||||
void GameWorld::CreateGate(EntityID parent, glm::vec3 position, glm::quat orientation, int teamID)
|
||||
{
|
||||
auto gateParent = CreateEntity(parent);
|
||||
auto transform = AddComponent<Components::Transform>(gateParent);
|
||||
@@ -614,9 +615,11 @@ void GameWorld::CreateGate(EntityID parent, glm::vec3 position, glm::quat orient
|
||||
auto transform = AddComponent<Components::Transform>(gateTrigger);
|
||||
transform->Position = glm::vec3(0, 2.8241, 0);
|
||||
auto trigger = AddComponent<Components::Trigger>(gateTrigger);
|
||||
trigger->TeamID = teamID;
|
||||
auto triggerMove = AddComponent<Components::TriggerMove>(gateTrigger);
|
||||
triggerMove->Entity = gate;
|
||||
|
||||
auto teamComponent = AddComponent<Components::Team>(gateTrigger);
|
||||
teamComponent->TeamID = teamID;
|
||||
{
|
||||
auto shape = CreateEntity(gateTrigger);
|
||||
auto transform = AddComponent<Components::Transform>(shape);
|
||||
@@ -663,126 +666,6 @@ EntityID GameWorld::CreateWall(EntityID parent, glm::vec3 pos, glm::quat orienta
|
||||
|
||||
}
|
||||
|
||||
EntityID GameWorld::CreateJeep(int playerID)
|
||||
{
|
||||
auto jeep = CreateEntity();
|
||||
auto transform = AddComponent<Components::Transform>(jeep);
|
||||
transform->Position = glm::vec3(0, 5, 0);
|
||||
transform->Orientation = glm::angleAxis(glm::pi<float>() / 2, glm::vec3(0, 1, 0));
|
||||
auto physics = AddComponent<Components::Physics>(jeep);
|
||||
physics->Mass = 1800;
|
||||
physics->MotionType = Components::Physics::MotionTypeEnum::Dynamic;
|
||||
auto vehicle = AddComponent<Components::Vehicle>(jeep);
|
||||
vehicle->DownshiftRPM = 3500.f;
|
||||
vehicle->UpshiftRPM = 6000.f;
|
||||
|
||||
AddComponent<Components::Input>(jeep);
|
||||
auto player = AddComponent<Components::Player>(jeep);
|
||||
player->ID = playerID;
|
||||
auto health = AddComponent<Components::Health>(jeep);
|
||||
health->Amount = 100.f;
|
||||
|
||||
{
|
||||
auto shape = CreateEntity(jeep);
|
||||
auto transform = AddComponent<Components::Transform>(shape);
|
||||
auto meshShape = AddComponent<Components::MeshShape>(shape);
|
||||
meshShape->ResourceName = "Models/Jeep/Chassi/ChassiCollision.obj";
|
||||
CommitEntity(shape);
|
||||
}
|
||||
|
||||
{
|
||||
auto chassis = CreateEntity(jeep);
|
||||
auto transform = AddComponent<Components::Transform>(chassis);
|
||||
transform->Position = glm::vec3(0, 0, 0); // 0.6577f
|
||||
auto model = AddComponent<Components::Model>(chassis);
|
||||
model->ModelFile = "Models/Jeep/Chassi/chassi.obj";
|
||||
}
|
||||
|
||||
//Create wheels
|
||||
float wheelOffset = 0.4f;
|
||||
float springLength = 0.3f;
|
||||
float suspensionStrength = 35.f;
|
||||
{
|
||||
auto wheel = CreateEntity(jeep);
|
||||
auto transform = AddComponent<Components::Transform>(wheel);
|
||||
transform->Position = glm::vec3(1.9f, 0.5546f - wheelOffset, -0.9242f);
|
||||
transform->Scale = glm::vec3(1.0f);
|
||||
auto model = AddComponent<Components::Model>(wheel);
|
||||
model->ModelFile = "Models/Jeep/WheelFront/wheelFront.obj";
|
||||
auto Wheel = AddComponent<Components::Wheel>(wheel);
|
||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
||||
Wheel->AxleID = 0;
|
||||
Wheel->Mass = 50;
|
||||
Wheel->Radius = 0.837f;
|
||||
Wheel->Steering = true;
|
||||
Wheel->SuspensionStrength = suspensionStrength;
|
||||
Wheel->Friction = 4.f;
|
||||
Wheel->ConnectedToHandbrake = true;
|
||||
CommitEntity(wheel);
|
||||
}
|
||||
|
||||
{
|
||||
auto wheel = CreateEntity(jeep);
|
||||
auto transform = AddComponent<Components::Transform>(wheel);
|
||||
transform->Position = glm::vec3(-1.9f, 0.5546f - wheelOffset, -0.9242f);
|
||||
transform->Scale = glm::vec3(1.0f);
|
||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 0, 1));
|
||||
auto model = AddComponent<Components::Model>(wheel);
|
||||
model->ModelFile = "Models/Jeep/WheelFront/wheelFront.obj";
|
||||
auto Wheel = AddComponent<Components::Wheel>(wheel);
|
||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
||||
Wheel->AxleID = 0;
|
||||
Wheel->Mass = 50;
|
||||
Wheel->Radius = 0.837f;
|
||||
Wheel->Steering = true;
|
||||
Wheel->SuspensionStrength = suspensionStrength;
|
||||
Wheel->Friction = 4.f;
|
||||
Wheel->ConnectedToHandbrake = true;
|
||||
CommitEntity(wheel);
|
||||
}
|
||||
|
||||
{
|
||||
auto wheel = CreateEntity(jeep);
|
||||
auto transform = AddComponent<Components::Transform>(wheel);
|
||||
transform->Position = glm::vec3(0.2726f, 0.2805f - wheelOffset, 1.9307f);
|
||||
auto model = AddComponent<Components::Model>(wheel);
|
||||
model->ModelFile = "Models/Jeep/WheelBack/wheelBack.obj";
|
||||
auto Wheel = AddComponent<Components::Wheel>(wheel);
|
||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
||||
Wheel->AxleID = 1;
|
||||
Wheel->Mass = 50;
|
||||
Wheel->Radius = 0.737f;
|
||||
Wheel->Steering = false;
|
||||
Wheel->SuspensionStrength = suspensionStrength;
|
||||
Wheel->Friction = 4.f;
|
||||
Wheel->ConnectedToHandbrake = true;
|
||||
CommitEntity(wheel);
|
||||
}
|
||||
|
||||
{
|
||||
auto wheel = CreateEntity(jeep);
|
||||
auto transform = AddComponent<Components::Transform>(wheel);
|
||||
transform->Position = glm::vec3(-0.2726f, 0.2805f - wheelOffset, 1.9307f);
|
||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 0, 1));
|
||||
auto model = AddComponent<Components::Model>(wheel);
|
||||
model->ModelFile = "Models/Jeep/WheelBack/wheelBack.obj";
|
||||
auto Wheel = AddComponent<Components::Wheel>(wheel);
|
||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
||||
Wheel->AxleID = 1;
|
||||
Wheel->Mass = 50;
|
||||
Wheel->Radius = 0.737f;
|
||||
Wheel->Steering = false;
|
||||
Wheel->SuspensionStrength = suspensionStrength;
|
||||
Wheel->Friction = 4.f;
|
||||
Wheel->ConnectedToHandbrake = true;
|
||||
CommitEntity(wheel);
|
||||
}
|
||||
|
||||
CommitEntity(jeep);
|
||||
|
||||
return jeep;
|
||||
}
|
||||
|
||||
void GameWorld::CreateTerrain()
|
||||
{
|
||||
{
|
||||
@@ -938,7 +821,7 @@ void GameWorld::CreateTerrain()
|
||||
}
|
||||
}
|
||||
|
||||
void GameWorld::CreateBase(glm::quat orientation, int playerID)
|
||||
void GameWorld::CreateBase(glm::quat orientation, int teamID)
|
||||
{
|
||||
auto base = CreateEntity();
|
||||
auto transform = AddComponent<Components::Transform>(base);
|
||||
@@ -1200,7 +1083,7 @@ void GameWorld::CreateBase(glm::quat orientation, int playerID)
|
||||
}
|
||||
#pragma endregion Terrain
|
||||
|
||||
CreateGate(base, glm::vec3(273.f, 40.185f, 0.06f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)));
|
||||
CreateGate(base, glm::vec3(273.f, 40.185f, 0.06f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)), teamID);
|
||||
|
||||
CreateWall(base, glm::vec3(273.f, 40.3f, -55.f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)));
|
||||
CreateWall(base, glm::vec3(273.f, 40.3f, -45.f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)));
|
||||
@@ -1210,19 +1093,16 @@ void GameWorld::CreateBase(glm::quat orientation, int playerID)
|
||||
CreateWall(base, glm::vec3(273.f, 40.3f, 15.f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)));
|
||||
CreateWall(base, glm::vec3(273.f, 40.3f, 25.f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)));
|
||||
|
||||
CreateGarage(base, glm::vec3(323.2f, 41.4f, -10.2f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)), playerID);
|
||||
CreateGarage(base, glm::vec3(323.2f, 41.4f, -10.2f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)), teamID);
|
||||
}
|
||||
EntityID GameWorld::CreateGarage(EntityID parent, glm::vec3 Position, glm::quat orientation, int playerID)
|
||||
|
||||
EntityID GameWorld::CreateGarage(EntityID parent, glm::vec3 Position, glm::quat orientation, int teamID)
|
||||
{
|
||||
auto garage = CreateEntity(parent);
|
||||
auto transform = AddComponent<Components::Transform>(garage);
|
||||
transform->Position = Position;
|
||||
transform->Orientation = orientation;
|
||||
|
||||
auto player = CreateEntity(garage);
|
||||
auto playerComponent = AddComponent<Components::Player>(player);
|
||||
playerComponent->ID = playerID;
|
||||
|
||||
auto ElevatorBase = CreateEntity(garage);
|
||||
{
|
||||
auto transform = AddComponent<Components::Transform>(ElevatorBase);
|
||||
@@ -1334,7 +1214,8 @@ EntityID GameWorld::CreateGarage(EntityID parent, glm::vec3 Position, glm::quat
|
||||
auto transform = AddComponent<Components::Transform>(spawnPoint);
|
||||
transform->Position.y = 1.f;
|
||||
auto spawnPointComponent = AddComponent<Components::SpawnPoint>(spawnPoint);
|
||||
spawnPointComponent->Player = player;
|
||||
auto teamComponent = AddComponent<Components::Team>(spawnPoint);
|
||||
teamComponent->TeamID = teamID;
|
||||
}
|
||||
CommitEntity(spawnPoint);
|
||||
}
|
||||
@@ -1352,6 +1233,9 @@ EntityID GameWorld::CreateGarage(EntityID parent, glm::vec3 Position, glm::quat
|
||||
auto transform = AddComponent<Components::Transform>(trigger);
|
||||
transform->Position = glm::vec3(0, 44.87521f, 0);
|
||||
auto triggerComponent = AddComponent<Components::Trigger>(trigger);
|
||||
triggerComponent->TeamID = teamID;
|
||||
auto teamComponent = AddComponent<Components::Team>(trigger);
|
||||
teamComponent->TeamID = teamID;
|
||||
{
|
||||
auto shape = CreateEntity(trigger);
|
||||
auto transform = AddComponent<Components::Transform>(shape);
|
||||
@@ -1371,6 +1255,9 @@ EntityID GameWorld::CreateGarage(EntityID parent, glm::vec3 Position, glm::quat
|
||||
auto transform = AddComponent<Components::Transform>(trigger);
|
||||
transform->Position = glm::vec3(0.69385f, -6.7997f, -2.0f);
|
||||
auto triggerComponent = AddComponent<Components::Trigger>(trigger);
|
||||
triggerComponent->TeamID = teamID;
|
||||
auto teamComponent = AddComponent<Components::Team>(trigger);
|
||||
teamComponent->TeamID = teamID;
|
||||
{
|
||||
auto shape = CreateEntity(trigger);
|
||||
auto transform = AddComponent<Components::Transform>(shape);
|
||||
|
||||
+3
-2
@@ -57,6 +57,7 @@
|
||||
#include "Components/TriggerRotate.h"
|
||||
#include "Components/Move.h"
|
||||
#include "Components/Rotate.h"
|
||||
#include "Components/Team.h"
|
||||
|
||||
class GameWorld : public World
|
||||
{
|
||||
@@ -79,11 +80,11 @@ private:
|
||||
void BindGamepadAxis(Gamepad::Axis axis, std::string command, float value);
|
||||
void BindGamepadButton(Gamepad::Button button, std::string command, float value);
|
||||
|
||||
void CreateGate(EntityID parent, glm::vec3 position, glm::quat orientation);
|
||||
void CreateGate(EntityID parent, glm::vec3 position, glm::quat orientation, int teamID);
|
||||
void AddTankWheelPair(EntityID tankEntity, glm::vec3 position, int axleID, bool steering);
|
||||
EntityID CreateJeep(int playerID);
|
||||
EntityID CreateWall(EntityID parent, glm::vec3 pos, glm::quat orientation);
|
||||
EntityID CreateGarage(EntityID parent, glm::vec3 Position, glm::quat orientation, int playerID);
|
||||
EntityID CreateGarage(EntityID parent, glm::vec3 Position, glm::quat orientation, int teamID);
|
||||
void CreateTerrain();
|
||||
void CreateBase(glm::quat orientation, int playerID);
|
||||
std::vector<EntityID> m_WallDebrisTemplates;
|
||||
|
||||
@@ -34,6 +34,14 @@ bool Systems::GarageSystem::OnEnterTrigger(const Events::EnterTrigger &event)
|
||||
if (!garageComponent)
|
||||
return false;
|
||||
|
||||
auto teamComponent = m_World->GetComponent<Components::Team>(event.Trigger);
|
||||
auto playerComponent = m_World->GetComponent<Components::Player>(event.Entity);
|
||||
|
||||
if(!teamComponent || !playerComponent)
|
||||
return false;
|
||||
if (teamComponent->TeamID != playerComponent->ID)
|
||||
return false;
|
||||
|
||||
std::string name = m_World->GetProperty<std::string>(event.Trigger, "Name");
|
||||
|
||||
if (name == "BoundsTrigger")
|
||||
@@ -56,6 +64,15 @@ bool Systems::GarageSystem::OnLeaveTrigger(const Events::LeaveTrigger &event)
|
||||
if (!garageComponent)
|
||||
return false;
|
||||
|
||||
auto teamComponent = m_World->GetComponent<Components::Team>(event.Trigger);
|
||||
auto playerComponent = m_World->GetComponent<Components::Player>(event.Entity);
|
||||
|
||||
if(!teamComponent || !playerComponent)
|
||||
return false;
|
||||
if (teamComponent->TeamID != playerComponent->ID)
|
||||
return false;
|
||||
|
||||
|
||||
std::string name = m_World->GetProperty<std::string>(event.Trigger, "Name");
|
||||
|
||||
if (name == "BoundsTrigger")
|
||||
@@ -76,18 +93,24 @@ bool Systems::GarageSystem::OnCommand(const Events::InputCommand &event)
|
||||
{
|
||||
EntityID trigger = pair.first;
|
||||
auto entities = pair.second;
|
||||
|
||||
std::string name = m_World->GetProperty<std::string>(trigger, "Name");
|
||||
if (name != "ElevatorShaftTrigger")
|
||||
continue;
|
||||
|
||||
auto triggerBaseParent = m_World->GetEntityBaseParent(trigger);
|
||||
auto triggerPlayerComponent = m_World->GetComponent<Components::Player>(triggerBaseParent);
|
||||
auto triggerTeamComponent = m_World->GetComponent<Components::Team>(trigger);
|
||||
if (!triggerTeamComponent)
|
||||
continue;
|
||||
|
||||
for (EntityID entity : entities)
|
||||
{
|
||||
auto entityPlayerComponent = m_World->GetComponent<Components::Player>(triggerBaseParent);
|
||||
if (triggerPlayerComponent == entityPlayerComponent)
|
||||
auto entityPlayerComponent = m_World->GetComponent<Components::Player>(entity);
|
||||
if(!entityPlayerComponent)
|
||||
continue;
|
||||
|
||||
if (entityPlayerComponent->ID != event.PlayerID)
|
||||
continue;
|
||||
|
||||
if (triggerTeamComponent->TeamID == entityPlayerComponent->ID)
|
||||
{
|
||||
EntityID garage = m_World->GetEntityParent(trigger);
|
||||
auto garageComponent = m_World->GetComponent<Components::Garage>(garage);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Events/Rotate.h"
|
||||
#include "Components/Move.h"
|
||||
#include "Components/Rotate.h"
|
||||
#include "Components/Team.h"
|
||||
|
||||
namespace Systems
|
||||
{
|
||||
|
||||
@@ -66,9 +66,17 @@ bool Systems::JeepSteeringSystem::OnSpawnVehicle(const Events::SpawnVehicle &eve
|
||||
{
|
||||
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)
|
||||
auto teamComponent = m_World->GetComponent<Components::Team>(spawnPoint);
|
||||
|
||||
if(!teamComponent)
|
||||
{
|
||||
LOG_ERROR("SpawnPoint has no TeamComponent");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (teamComponent->TeamID != event.PlayerID)
|
||||
continue;
|
||||
|
||||
|
||||
Components::Transform absoluteTransform = m_World->GetSystem<Systems::TransformSystem>()->AbsoluteTransform(spawnPoint);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "Components/Input.h"
|
||||
#include "Components/JeepSteering.h"
|
||||
#include "Events/JeepSteer.h"
|
||||
#include "Components/Team.h"
|
||||
|
||||
#include "Events/SetViewportCamera.h"
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ bool Systems::TankSteeringSystem::OnSpawnVehicle(const Events::SpawnVehicle &eve
|
||||
{
|
||||
if (event.VehicleType != "Tank")
|
||||
return false;
|
||||
|
||||
|
||||
auto spawnPointComponents = m_World->GetComponentsOfType<Components::SpawnPoint>();
|
||||
if (!spawnPointComponents)
|
||||
{
|
||||
@@ -387,8 +387,15 @@ bool Systems::TankSteeringSystem::OnSpawnVehicle(const Events::SpawnVehicle &eve
|
||||
{
|
||||
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)
|
||||
auto teamComponent = m_World->GetComponent<Components::Team>(spawnPoint);
|
||||
|
||||
if(!teamComponent)
|
||||
{
|
||||
LOG_ERROR("SpawnPoint has no TeamComponent");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (teamComponent->TeamID != event.PlayerID)
|
||||
continue;
|
||||
|
||||
Components::Transform absoluteTransform = m_World->GetSystem<Systems::TransformSystem>()->AbsoluteTransform(spawnPoint);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Components/Vehicle.h"
|
||||
#include "Components/Player.h"
|
||||
#include "Components/Model.h"
|
||||
#include "Components/Team.h"
|
||||
#include "Systems/TransformSystem.h"
|
||||
#include "Systems/ParticleSystem.h"
|
||||
#include "InputController.h"
|
||||
|
||||
@@ -44,10 +44,18 @@ void Systems::TriggerSystem::OnEntityRemoved( EntityID entity )
|
||||
|
||||
bool Systems::TriggerSystem::OnEnterTrigger( const Events::EnterTrigger &event )
|
||||
{
|
||||
|
||||
|
||||
auto teamComponent = m_World->GetComponent<Components::Team>(event.Trigger);
|
||||
auto playerComponent = m_World->GetComponent<Components::Player>(event.Entity);
|
||||
|
||||
if(!teamComponent || !playerComponent)
|
||||
return false;
|
||||
if (teamComponent->TeamID != playerComponent->ID)
|
||||
return false;
|
||||
|
||||
auto flagComponent1 = m_World->GetComponent<Components::Flag>(event.Trigger);
|
||||
auto flagComponent2 = m_World->GetComponent<Components::Flag>(event.Entity);
|
||||
|
||||
//HACK: SIMON IS DISSING AMERICA
|
||||
if(flagComponent1)
|
||||
{
|
||||
@@ -77,6 +85,17 @@ bool Systems::TriggerSystem::OnEnterTrigger( const Events::EnterTrigger &event )
|
||||
|
||||
bool Systems::TriggerSystem::OnLeaveTrigger( const Events::LeaveTrigger &event )
|
||||
{
|
||||
auto teamComponent = m_World->GetComponent<Components::Team>(event.Trigger);
|
||||
auto playerComponent = m_World->GetComponent<Components::Player>(event.Entity);
|
||||
|
||||
if(!teamComponent || !playerComponent)
|
||||
return false;
|
||||
if (teamComponent->TeamID != playerComponent->ID)
|
||||
return false;
|
||||
|
||||
auto flagComponent1 = m_World->GetComponent<Components::Flag>(event.Trigger);
|
||||
auto flagComponent2 = m_World->GetComponent<Components::Flag>(event.Entity);
|
||||
|
||||
auto triggerMoveComponent = m_World->GetComponent<Components::TriggerMove>(event.Trigger);
|
||||
if (triggerMoveComponent)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Components/Move.h"
|
||||
#include "Components/Rotate.h"
|
||||
#include "Components/Player.h"
|
||||
#include "Components/Team.h"
|
||||
#include "Events/Move.h"
|
||||
#include "Events/Rotate.h"
|
||||
#include <math.h>
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
<ClInclude Include="..\..\src\Components\JeepSteering.h" />
|
||||
<ClInclude Include="..\..\src\Components\Move.h" />
|
||||
<ClInclude Include="..\..\src\Components\Rotate.h" />
|
||||
<ClInclude Include="..\..\src\Components\Team.h" />
|
||||
<ClInclude Include="..\..\src\Components\TriggerMove.h" />
|
||||
<ClInclude Include="..\..\src\Components\Timer.h" />
|
||||
<ClInclude Include="..\..\src\Components\TriggerExplosion.h" />
|
||||
|
||||
@@ -78,15 +78,16 @@
|
||||
<ClCompile Include="..\..\src\Systems\FollowSystem.cpp">
|
||||
<Filter>Game\Systems</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Systems\WallSystem.cpp">
|
||||
<Filter>Gameplay\Systems</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Systems\GarageSystem.cpp">
|
||||
<Filter>Game\Systems</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Sound.cpp">
|
||||
<Filter>Audio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Systems\WallSystem.cpp" />
|
||||
<ClCompile Include="..\..\src\Systems\JeepSteeringSystem.cpp">
|
||||
<Filter>Physics\Systems</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Util">
|
||||
@@ -526,9 +527,6 @@
|
||||
<ClInclude Include="..\..\src\Components\BlendMap.h">
|
||||
<Filter>Rendering\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Systems\WallSystem.h">
|
||||
<Filter>Gameplay\Systems</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Events\LeaveTrigger.h">
|
||||
<Filter>Physics\Events</Filter>
|
||||
</ClInclude>
|
||||
@@ -565,9 +563,6 @@
|
||||
<ClInclude Include="..\..\src\GUI\VehicleSelection.h">
|
||||
<Filter>GUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Events\OnDead.h">
|
||||
<Filter>Gameplay\Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Events\SpawnVehicle.h">
|
||||
<Filter>Game\Events</Filter>
|
||||
</ClInclude>
|
||||
@@ -577,6 +572,16 @@
|
||||
<ClInclude Include="..\..\src\Components\SpawnPoint.h">
|
||||
<Filter>Game\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Components\JeepSteering.h" />
|
||||
<ClInclude Include="..\..\src\Events\JeepSteer.h" />
|
||||
<ClInclude Include="..\..\src\Events\OnDead.h" />
|
||||
<ClInclude Include="..\..\src\Systems\WallSystem.h" />
|
||||
<ClInclude Include="..\..\src\Components\Team.h">
|
||||
<Filter>Game\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Systems\JeepSteeringSystem.h">
|
||||
<Filter>Physics\Systems</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\src\Shaders\Fragment2.glsl">
|
||||
|
||||
Reference in New Issue
Block a user