Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-17 14:19:18 +0000
committerStijn Buys <ingar@osirion.org>2008-07-17 14:19:18 +0000
commitae65ef53fc8b70ebee3b43bb06ecd091aaae2a26 (patch)
treed8a2a253314e0bab54edc9ee829aee819a7860bd /src/core/clientstate.cc
parenteb075660e7cb61b138c2da337115c59857f89e17 (diff)
engine sounds
Diffstat (limited to 'src/core/clientstate.cc')
-rw-r--r--src/core/clientstate.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/clientstate.cc b/src/core/clientstate.cc
index cc9c79e..503a71f 100644
--- a/src/core/clientstate.cc
+++ b/src/core/clientstate.cc
@@ -5,6 +5,7 @@
*/
#include "core/clientstate.h"
+#include "core/application.h"
namespace core {
@@ -14,6 +15,8 @@ ClientState::ClientState()
state_detailvisible = false;
state_targetable = false;
+ state_enginesound = 0;
+
for (size_t i = 0; i < 3; i++)
state_screenlocation[i] = 0;
@@ -25,11 +28,24 @@ ClientState::ClientState(Entity *entity)
state_visible = false;
state_detailvisible = false;
state_fuzz = math::randomf();
+
+ state_enginesound = 0;
+
assign(entity);
}
ClientState::~ClientState()
-{}
+{
+ clearsound();
+}
+
+void ClientState::clearsound()
+{
+ if (state_enginesound) {
+ application()->notify_remove_sound(state_enginesound);
+ state_enginesound = 0;
+ }
+}
void ClientState::assign(Entity * entity)
{