From bedebb1fba7380da6bc2b602ad6775574b693efc Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:28:39 +0300 Subject: [PATCH] New signal type --- code/__DEFINES/dcs/signals/signals_client.dm | 3 +++ code/datums/soundOutput.dm | 2 +- code/modules/movement/movement.dm | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/dcs/signals/signals_client.dm b/code/__DEFINES/dcs/signals/signals_client.dm index 36a60c153d0f..e3da9d31ba97 100644 --- a/code/__DEFINES/dcs/signals/signals_client.dm +++ b/code/__DEFINES/dcs/signals/signals_client.dm @@ -27,3 +27,6 @@ /// Called when something is removed from a client's screen : /client/proc/remove_from_screen(screen_remove) #define COMSIG_CLIENT_SCREEN_REMOVE "client_screen_remove" + +/// From movement.dm: /atom/movable/proc/Moved(atom/oldloc, direction, Forced = FALSE) +#define COMSIG_CLIENT_MOB_MOVED "client_mob_moved" diff --git a/code/datums/soundOutput.dm b/code/datums/soundOutput.dm index b6e4109bf627..cb581d85f989 100644 --- a/code/datums/soundOutput.dm +++ b/code/datums/soundOutput.dm @@ -13,7 +13,7 @@ qdel(src) return owner = C - RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(update_sounds)) + RegisterSignal(owner, COMSIG_CLIENT_MOB_MOVED, PROC_REF(update_sounds)) . = ..() #define SMOOTHING 1 // How much smoothing when moving between tiles, smaller value means more smoothing diff --git a/code/modules/movement/movement.dm b/code/modules/movement/movement.dm index 54dad26cb9db..d889f6e342ba 100644 --- a/code/modules/movement/movement.dm +++ b/code/modules/movement/movement.dm @@ -95,7 +95,7 @@ if(ismob(src)) var/mob/moved = src if(moved.client) - SEND_SIGNAL(moved.client, COMSIG_MOVABLE_MOVED, direction) + SEND_SIGNAL(moved.client, COMSIG_CLIENT_MOB_MOVED, direction) for(var/datum/dynamic_light_source/light as anything in hybrid_light_sources) light.source_atom.update_light() if(!isturf(loc))