diff options
author | Stijn Buys <ingar@osirion.org> | 2008-08-24 22:55:28 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-08-24 22:55:28 +0000 |
commit | 02e623574c4c12c40a0757ed934a93353f34a653 (patch) | |
tree | 49fa76c6dd8bab80520601d5d5f0436e7befad5f /src/client | |
parent | e422dc200a1036ec6c1a93eea2f0b6abdcdadb7a (diff) |
impulse disables thrust
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/targets.cc | 9 |
1 files changed, 7 insertions, 2 deletions
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 ) { |