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-12-21 18:02:43 +0000
committerStijn Buys <ingar@osirion.org>2008-12-21 18:02:43 +0000
commit6b9fdfab38a3c068817a9d2e562ed2245e537004 (patch)
tree62f840a5fc9d2a7969adffafc84cad08208bd3cc
parent7d06239dcc150a7bd2521972ee680fd2c9003580 (diff)
unload sounds on zone change
-rw-r--r--src/client/client.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 769aacb..edec13c 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -266,6 +266,14 @@ void Client::notify_disconnect()
void Client::notify_zonechange()
{
+ // unload entity sounds
+ for (core::Entity::Registry::iterator it = core::Entity::registry().begin(); it != core::Entity::registry().end(); it++) {
+ core::Entity *entity = (*it).second;
+
+ if (ext_sound(entity))
+ delete ext_sound(entity);
+ }
+
render::unload();
}