ID:2352648
 
Resolved
When a mouse hit was detected on an overlay, it didn't always have the correct icon-x/icon-y parameters relative to the parent icon.
BYOND Version:511
Operating System:Windows 10 Pro 64-bit
Web Browser:Firefox 58.0
Applies to:Dream Seeker
Status: Resolved (512.1414)

This issue has been resolved.
Descriptive Problem Summary:
The mouse control 'params' var can be missing information in at least the case of applying a Turn transform on an atom. Testing seems to indicate that it is related to the visible portion of the object consisting of overlays, and having a transform applied. Does not occur without overlays. Easily reproducible in a test scenario.

Numbered Steps to Reproduce Problem:
1) Have an object with a completely blank iconstate (as in, the iconstate exists, but is just a full 0 alpha image)
2) Apply a rotation via transform
3) Mouse events will no longer contain all params

Code Snippet (if applicable) to Reproduce Problem:
/obj/entertest
icon = 'Basics.dmi'
icon_state = "empty_state" //A completely empty iconstate

/obj/entertest/New()
..()
overlays += image('Basics.dmi',"obj") //An iconstate with content

/obj/entertest/MouseEntered(location,control,params)
world << params

/obj/entertest/plain
name = "plain entertest"

/obj/entertest/turned
name = "turned entertest"

/obj/entertest/turned/New()
..()
var/matrix/M = matrix()
M.Turn(90)
transform = M


Expected Results:
World output when mousing over Plain, then Turned:
icon-x=18;icon-y=9;screen-loc=12:18,12:9
icon-x=18;icon-y=9;screen-loc=14:21,12:9


Actual Results:
World output when mousing over Plain, then Turned:
icon-x=18;icon-y=9;screen-loc=12:18,12:9
screen-loc=14:21,12:9


Does the problem occur:
Every time? Or how often? Every time
In other games? Any game, test case above
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? Nowhere that I can find

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Occurs in all betas and back to final 511 verison

Workarounds:
None that I can find.
Now that's odd. Transforms shouldn't impact which parameters are sent at all. I'll run some tests and see if I can reproduce it on my end.
Lummox JR changed status to 'Verified'
So it seems the issue at hand is that because this is an overlay, it's looking for the main icon and trying to find the coordinates relative to that. Unfortunately the method of doing so is somewhat borked.
Interesting. Well, glad you were able to see it on your end at least.
Lummox JR resolved issue with message:
When a mouse hit was detected on an overlay, it didn't always have the correct icon-x/icon-y parameters relative to the parent icon.