mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Maybe fix sound token hard deletes (#96903)
## About The Pull Request `remove_listener` would fail on logout so instead I figure we could track the tokens on the mob, rather than the client Functionally not much is changed - but if you go from ghost to mob it'll remove the token from the ghost and adds the token to the new mob, so it should fix the issue There also doesn't need to be any code in `/mob/destroy` because we listen for `listener_deleted` and remove listeners on the token itself
This commit is contained in:
@@ -15,10 +15,7 @@ SUBSYSTEM_DEF(sound_tokens)
|
||||
var/client/client = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
var/mob/owned_mob = client.mob
|
||||
if(!owned_mob)
|
||||
continue
|
||||
for(var/datum/sound_token/token in client.sound_tokens)
|
||||
for(var/datum/sound_token/token as anything in owned_mob?.sound_tokens)
|
||||
token.update_listener(owned_mob)
|
||||
if(MC_TICK_CHECK)
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user