Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-08 22:17:29 +0000
committerStijn Buys <ingar@osirion.org>2008-08-08 22:17:29 +0000
commit56b0856541446cbafee4eed9ef0ee9fb69af565a (patch)
tree8cec133fb9b0a02fc2f415c26b69fcd4c6db1ef9 /src/core
parentf540e8dac10de8ff443692e78404b1508dde9d1e (diff)
improved truster indicator, impulse engine sounds
Diffstat (limited to 'src/core')
-rw-r--r--src/core/clientstate.cc30
-rw-r--r--src/core/clientstate.h18
2 files changed, 42 insertions, 6 deletions
diff --git a/src/core/clientstate.cc b/src/core/clientstate.cc
index 8e9c2e5..84e1fe0 100644
--- a/src/core/clientstate.cc
+++ b/src/core/clientstate.cc
@@ -16,7 +16,16 @@ ClientState::ClientState()
state_detailvisible = false;
state_targetable = false;
- state_enginesound = 0;
+ state_thusterloopbuffer = 0;
+ state_impulseloopbuffer = 0;
+ state_impulsestartbuffer = 0;
+ state_impulsestopbuffer = 0;
+
+ state_engineloopbuffer = 0;
+ state_engineloopsource = 0;
+ state_engineeventbuffer = 0;
+ state_engineeventsource = 0;
+
state_engine_trail_offset = 0;
state_fuzz = math::randomf();
@@ -29,7 +38,16 @@ ClientState::ClientState(Entity *entity)
state_detailvisible = false;
state_targetable = false;
- state_enginesound = 0;
+ state_thusterloopbuffer = 0;
+ state_impulseloopbuffer = 0;
+ state_impulsestartbuffer = 0;
+ state_impulsestopbuffer = 0;
+
+ state_engineloopbuffer = 0;
+ state_engineloopsource = 0;
+ state_engineeventbuffer = 0;
+ state_engineeventsource = 0;
+
state_engine_trail_offset = 0;
state_fuzz = math::randomf();
@@ -45,9 +63,11 @@ ClientState::~ClientState()
void ClientState::clearsound()
{
- if (state_enginesound) {
- application()->notify_remove_sound(state_enginesound);
- state_enginesound = 0;
+ if (state_engineloopsource) {
+ application()->notify_remove_sound(state_engineloopsource);
+ application()->notify_remove_sound(state_engineeventsource);
+ state_engineloopsource = 0;
+ state_engineloopbuffer = 0;
}
}
diff --git a/src/core/clientstate.h b/src/core/clientstate.h
index f914d0e..ffd6331 100644
--- a/src/core/clientstate.h
+++ b/src/core/clientstate.h
@@ -70,7 +70,23 @@ public:
/// distance from the camera eye to the entity
float state_distance;
- size_t state_enginesound;
+ /// index of the audio buffer containing the thruster sound loop
+ size_t state_thusterloopbuffer;
+ /// index of the audio buffer containing the impulse sound loop
+ size_t state_impulseloopbuffer;
+ /// index of the audio buffer containing the impulse drive start sound
+ size_t state_impulsestartbuffer;
+ /// index of the audio buffer containing the impulse drive stop sound
+ size_t state_impulsestopbuffer;
+
+ /// index of the audio buffer currently looping in enginesource
+ size_t state_engineloopbuffer;
+ /// index of the audio source used to play the engine sound loop
+ size_t state_engineloopsource;
+ /// index of the audio last played on the event source
+ size_t state_engineeventbuffer;
+ /// index of the audio source used to play engine sound events
+ size_t state_engineeventsource;
};
}