mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 23:41:57 +00:00
As Rageroro suggested I made it so the proc checks for headsets first. This will reduce lag in the cases that the player has a headset. Which is often.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4339 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -240,15 +240,27 @@
|
||||
var/turf/ear = get_turf(M)
|
||||
if(!ear) continue
|
||||
|
||||
|
||||
// Checking for a headset on the mob and if it is in radios list
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.ears != null)
|
||||
var/isHeadsetRadios = 0
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
if(H.ears == R)
|
||||
isHeadsetRadios = 1
|
||||
break
|
||||
if(isHeadsetRadios)
|
||||
hearers += M
|
||||
continue
|
||||
|
||||
// Now see if they're near any broadcasting radio
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
var/turf/radio_loc = get_turf(R)
|
||||
if(ear in view(R.canhear_range,radio_loc))
|
||||
hearers += M
|
||||
break
|
||||
else if(ear == radio_loc)
|
||||
hearers += M
|
||||
break
|
||||
|
||||
return hearers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user