view() is picking up the same atoms multiple times when the viewer is on multiple turfs
This seems to occur with oview() as well
Numbered Steps to Reproduce Problem:
Stand in the middle of multiple turfs(I drew black lines to define the borders of each turf),
Click count overlays verb
Notice that there are triple the atoms being listed than there should be
Code used for count overlays verb
set category = "Debug"
set desc = "Display overlays in view"
set name = "Count Overlays"
var/atoms = 0
var/overlays = 0
var/underlays = 0
var/viscontents = 0
for(var/atom/A in view())
overlays += A.overlays.len
underlays += A.underlays.len
var/screenobj = screen.len
var/screenobjoverlays = 0
var/screenobjunderlays = 0
for(var/atom/B in screen)
screenobjoverlays += B.overlays.len
screenobjunderlays += B.underlays.len
var/imagesL = images.len
var/imagesunderlays = 0
var/imagesoverlays = 0
for(var/image/I in images)
imagesoverlays += I.overlays.len
imagesunderlays += I.underlays.len
src << "[atoms] atoms in view, these atoms have [overlays] overlays, [underlays] underlays, and [viscontents] vis_contents."
src << "There are [screenobj] screenobjs, There are [screenobjoverlays] screen overlays, [screenobjunderlays] screen underlays."
src << "There are [imagesL] images, [imagesoverlays] of these are image overlays and [imagesunderlays] are underlays."
Only atoms in view would be counted
Atoms in view were counted multiple times
Does the problem occur:
Occurs everytime you stand in multiple turfs
When does the problem NOT occur?
When you are centered on a turf
Standing in the middle of a turf