Doppler scale ruined everything
This commit is contained in:
+1
-1
@@ -661,7 +661,7 @@ EntityID GameWorld::CreateTank(int playerID)
|
||||
transform->Orientation = glm::angleAxis(-glm::pi<float>() / 2.f, glm::vec3(1, 0, 0));
|
||||
transform->Scale = glm::vec3(3.f);
|
||||
AddComponent<Components::Template>(shot);
|
||||
auto soundEmitter = AddComponent<Components::SoundEmitter>(shot);
|
||||
auto soundEmitter = AddComponent<Components::SoundEmitter>(tank);
|
||||
soundEmitter->MinDistance = 1000;
|
||||
soundEmitter->Gain = 1;
|
||||
soundEmitter->Loop = false;
|
||||
|
||||
@@ -20,7 +20,7 @@ void Systems::SoundSystem::Initialize()
|
||||
{
|
||||
LOG_INFO("FMOD initialized successfully");
|
||||
}
|
||||
FMOD_System_Set3DSettings(m_System, 1.f, 1.f, 1.f); //dopplerScale, distancefactor, rolloffscale
|
||||
FMOD_System_Set3DSettings(m_System, 0.f, 1.f, 1.f); //dopplerScale, distancefactor, rolloffscale
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,11 @@ void Systems::TankSteeringSystem::UpdateEntity(double dt, EntityID entity, Entit
|
||||
EventBroker->Publish(eSetVelocity);
|
||||
m_TimeSinceLastShot[tankSteeringComponent->Barrel] = 0;
|
||||
|
||||
Events::PlaySFX e;
|
||||
e.Resource = "Sounds/SFX/LongBoom.wav";
|
||||
e.Emitter = entity;
|
||||
e.Loop = false;
|
||||
EventBroker->Publish(e);
|
||||
|
||||
auto clonePhysicsComponent = m_World->GetComponent<Components::Physics>(clone);
|
||||
//1,670m/s
|
||||
@@ -109,17 +114,14 @@ void Systems::TankSteeringSystem::UpdateEntity(double dt, EntityID entity, Entit
|
||||
m_TimeSinceLastShot[tankSteeringComponent->Barrel] += dt;
|
||||
}
|
||||
|
||||
auto shot = m_World->GetComponent<Components::TankShell>(entity);
|
||||
if(shot)
|
||||
{
|
||||
if(inputController->Shoot && m_TimeSinceLastShot[tankSteeringComponent->Barrel] > 0.5)
|
||||
{
|
||||
Events::PlaySFX e;
|
||||
e.Resource = "Sounds/SFX/LongBoom.wav";
|
||||
e.Emitter = entity;
|
||||
EventBroker->Publish(e);
|
||||
}
|
||||
}
|
||||
// auto shot = m_World->GetComponent<Components::TankShell>(entity);
|
||||
// if(shot)
|
||||
// {
|
||||
// if(inputController->Shoot && m_TimeSinceLastShot[tankSteeringComponent->Barrel] > 0.5)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
bool Systems::TankSteeringSystem::OnCollision( const Events::Collision &e )
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "Components/FrameTimer.h"
|
||||
|
||||
#include "Events/PlaySFX.h"
|
||||
#include "Events/PlayBGM.h"
|
||||
|
||||
#include "Events/Damage.h"
|
||||
#include "Components/Vehicle.h"
|
||||
|
||||
Reference in New Issue
Block a user