From 02e623574c4c12c40a0757ed934a93353f34a653 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 24 Aug 2008 22:55:28 +0000 Subject: impulse disables thrust --- src/client/targets.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/client') diff --git a/src/client/targets.cc b/src/client/targets.cc index e53e530..7e852ad 100644 --- a/src/client/targets.cc +++ b/src/client/targets.cc @@ -332,11 +332,16 @@ void render_entity_sound(core::EntityControlable *entity) } float speed = entity->speed(); - float pitch = 0.2f + entity->thrust() * 0.8f; + float pitch = 1.0f; float gain = 0.0; - if (entity->thrust() > 0 ) { + if (entity->eventstate() == core::Entity::Impulse) { + pitch = 1.0f; + gain = 1.0f; + } else if (entity->thrust() > 0 ) { + pitch = 0.2f + entity->thrust() * 0.8f; gain = 1.0f; } + if (entity->eventstate() == core::Entity::ImpulseInitiate ) { -- cgit v1.2.3