diff options
-rw-r--r-- | src/client/client.cc | 8 |
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(); } |