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:
rockdtben@gmail.com
2012-08-08 16:28:53 +00:00
parent 6efd2ea76a
commit 40495a6adb

View File

@@ -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