Skip to content

Commit

Permalink
New signal type
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Nivrak committed Jul 1, 2024
1 parent 86cfea7 commit bedebb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion code/datums/soundOutput.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/movement/movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit bedebb1

Please sign in to comment.