From 6b9fdfab38a3c068817a9d2e562ed2245e537004 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Dec 2008 18:02:43 +0000 Subject: unload sounds on zone change --- src/client/client.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/client') 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(); } -- cgit v1.2.3