ID:1528583
 
Not a bug
BYOND Version:504
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Internet Explorer 10.0
Applies to:Dream Maker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
I believe there's a bug in bounds() calculations.

Numbered Steps to Reproduce Problem:

Code Snippet (if applicable) to Reproduce Problem:
// Define a mob
mob
bound_x = 0 ; bound_width = 16 ;
bound_y = 0 ; bound_height = 16 ;

verb
test()
for(var/mob/M in bounds(src, -2, -2, -2, -2)
world << "[M] was hit!" // Shows up


Expected Results:
The way I understood bounds() to work was that the calculation of the bounding box started at 0,0 relative to the ref. But this should create a 2x2 box that is completely outside the Ref's bounding box. If this wording (take from F1):

An object's bounding box can also be offset. bounds(src,-6,0) shows what src would touching if it moved 6 pixels west.

Is meant to imply that the object is always "touching itself" then I would like to see this noted in the file.
Actual Results:
The mob is always going to hit itself.

Does the problem occur:
Every time? Or how often? Always
On other computers? Yes

When does the problem NOT occur?
It always occurs

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I tested all the way back to 5.02. It occurs in all versions.

Workarounds:
If you change the first parameters to something that exceeds the bound_height/bound_width you can "break out" of this problem, but it seems that for small numbers, the attempt is to keep calculations within the bounding box of Ref. This seems inconsistent, but it's the way it looks.

bounds(src, -2, -2, -2, -2) uses a rectangle of size 14x14. Its southwest corner is 2 pixels southwest of the mob, so it's overlapping the mob by 12 pixels.
Lummox JR resolved issue (Not a bug)