-Changed recursive_mob_check and get_mobs_in_view. It might also fix the cause of some people being able to hear behind walls (unconfirmed)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4389 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-08-13 08:43:42 +00:00
parent e9671308bf
commit 38d209e662

View File

@@ -128,7 +128,9 @@
/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/client_check = 1, var/sight_check = 1, var/include_radio = 1)
//debug_mob += O.contents.len
for(var/A as mob|obj in O)
for(var/atom/A in O)
if(isturf(A))
continue
if(ismob(A))
var/mob/M = A
if(client_check && !M.client)
@@ -152,17 +154,18 @@
var/turf/T = get_turf(source)
var/list/hear = list()
var/list/range = range(R, T)
var/list/range = view(R, T)
//debug_mob += range.len
for(var/A as mob|obj in range)
for(var/A in range)
if(isturf(A))
continue
if(ismob(A))
var/mob/M = A
if(M.client && isInSight(M, source))
if(M.client)
hear += M
else if(istype(A, /obj/item/device/radio))
if(isInSight(A, source))
hear += A
hear += A
hear += recursive_mob_check(A)
//world.log << "NEW: [debug_mob]"
//debug_mob = 0