Skip to content

Commit

Permalink
Actually Fixed Say
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuckleberry-Finn committed Feb 25, 2014
1 parent 2a69810 commit 87a22a4
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ proc/recursive_mob_check(var/atom/O, var/client_check=1, var/sight_check=1, var/
var/list/processed_list = list()
var/list/found_mobs = list()

if(!O.contents.len)
return found_mobs

while(processing_list.len)

var/atom/A = processing_list[1]
Expand All @@ -163,11 +166,13 @@ proc/recursive_mob_check(var/atom/O, var/client_check=1, var/sight_check=1, var/
if(sight_check && !isInSight(A, O))
passed=0

else passed = 0

if(passed)
if(!(A in found_mobs)) found_mobs += A

for(var/atom/B in A)
if(!(B in processed_list))
if(!(B in processed_list) && (istype(A, /obj/item/device/radio)||ismob(B)) )
processing_list += B

processing_list-=A
Expand All @@ -189,8 +194,17 @@ proc/recursive_mob_check(var/atom/O, var/client_check=1, var/sight_check=1, var/
var/list/range = hear(R, T)

for(var/atom/A in range)

/*if(ismob(A))
var/mob/M = A
if(M.client)
hear += M
//world.log << "Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
else if(istype(A, /obj/item/device/radio))
hear += A*/

if(isobj(A) || ismob(A))
hear = recursive_mob_check(A, 1, 0, 1)
hear += recursive_mob_check(A, 1, 0, 1)

return hear

Expand Down

0 comments on commit 87a22a4

Please sign in to comment.