Skip to content

Commit

Permalink
Merge pull request #24 from Superlagg/master
Browse files Browse the repository at this point in the history
Fix parameter order in IS_IN_VIEWER_RECT macro
  • Loading branch information
Tk420634 authored Jul 17, 2024
2 parents ebfbcdb + 74cb793 commit 3bf39eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ GLOBAL_LIST_EMPTY(chat_chuds)
if(coler)
color = coler

#define IS_IN_VIEWER_RECT(turf) TURF_IN_RECTANGLE(turf, westest, eastest, northest, southest)
#define IS_IN_VIEWER_RECT(turf) TURF_IN_RECTANGLE(turf, westest, northest, eastest, southest)

/// returns a datum of players and how well they can hear the source
/proc/get_listening(atom/source, close_range, long_range, quiet)
Expand All @@ -384,7 +384,7 @@ GLOBAL_LIST_EMPTY(chat_chuds)
continue dingus
var/westest = max(viewer_turf.x - 9, 1)
var/eastest = min(viewer_turf.x + 9, world.maxx)
var/northest = max(viewer_turf.y - 6, 1)
var/northest = max(viewer_turf.y - 7, 1)
var/southest = min(viewer_turf.y + 6, world.maxy)
var/list/things_in_viewer_los = view(9, viewer_turf)
if(SSchat.debug_chud)
Expand Down
6 changes: 5 additions & 1 deletion code/__HELPERS/path.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,14 @@
return

/datum/pathfind/proc/checkvis(turf/destination_turf)
if(locate(/mob/living) in destination_turf)
return TRUE
if(destination_turf.opacity)
return FALSE
for(var/atom/iter_atom in destination_turf)
for(var/atom/iter_atom as anything in destination_turf)
if(iter_atom.opacity)
if(istype(iter_atom, /obj/structure/window) || istype(iter_atom, /obj/machinery/door/window))
continue
return FALSE
return TRUE

Expand Down
4 changes: 2 additions & 2 deletions code/datums/chatmessage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ GLOBAL_LIST_INIT(verbal_punch_lasers, list(null,null,null,null,null,null,null,nu
var/turf/targetturf = get_turf(message_loc)
var/westest = max(ownerturf.x - 9, 1)
var/eastest = min(ownerturf.x + 9, world.maxx)
var/northest = max(ownerturf.y - 9, 1)
var/southest = min(ownerturf.y + 9, world.maxy)
var/northest = max(ownerturf.y - 7, 1)
var/southest = min(ownerturf.y + 6, world.maxy)
var/list/turfe = getline(targetturf, ownerturf)
var/turf/where = null
for(var/turf/check in turfe)
Expand Down

0 comments on commit 3bf39eb

Please sign in to comment.