diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-17 14:19:18 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-17 14:19:18 +0000 |
commit | ae65ef53fc8b70ebee3b43bb06ecd091aaae2a26 (patch) | |
tree | d8a2a253314e0bab54edc9ee829aee819a7860bd /src/core/clientstate.cc | |
parent | eb075660e7cb61b138c2da337115c59857f89e17 (diff) |
engine sounds
Diffstat (limited to 'src/core/clientstate.cc')
-rw-r--r-- | src/core/clientstate.cc | 18 |
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) { |