mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-19 03:50:32 +01:00
Add null checks to client prefs checks
client.prefs. -> client?.prefs?.
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
body = new mob_type(T)
|
||||
var/mob/ghostie = mind.get_ghost(TRUE)
|
||||
if(ghostie.client && ghostie.client.prefs)
|
||||
ghostie.client.prefs.copy_to(body)
|
||||
ghostie.client?.prefs?.copy_to(body)
|
||||
mind.transfer_to(body)
|
||||
else
|
||||
body.forceMove(T)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if((world.time - MUSICIAN_HEARCHECK_MINDELAY) > last_hearcheck)
|
||||
LAZYCLEARLIST(hearing_mobs)
|
||||
for(var/mob/M in get_hearers_in_view(15, source))
|
||||
if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
|
||||
if(!M.client || !(M.client?.prefs?.toggles & SOUND_INSTRUMENTS))
|
||||
continue
|
||||
LAZYADD(hearing_mobs, M)
|
||||
last_hearcheck = world.time
|
||||
|
||||
Reference in New Issue
Block a user