When adding an object to a client's screen, if the object has mouse_opacity set to 0 and the displace filter attached, atoms on the client's screen will no longer register mouse-hits.
Numbered Steps to Reproduce Problem:
1. Download / extract source.
2. Run the source.
3. Mouse over turf or player to see maptext of atom's name.
4. Click the 'MapOnly' verb in the commands tab.
5. Mouse over the turf or player.
Code Snippet (if applicable) to Reproduce Problem:
Soure code can be found here. (Redirects to Mega.Nz filehosting site.)
Relevant Snippet(s):
mob
MouseEntered() //defined to show mouse handling.
maptext = name
MouseExited()
if(maptext) maptext = null
turf
MouseEntered() //defined to show mouse handling
maptext = name
MouseExited()
if(maptext) maptext = null
Effect //Defining the on-screen effects.
parent_type = /obj
Shrooms
layer = 10
mouse_opacity = 0
screen_loc = "CENTER, CENTER"
filters = filter(type = "displace", size = 0, icon = 'Map.dmi')
appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR
proc
AnimateDisplacement() //proc being used in-game at time of bug being found, replicated here.
var
randhigh = rand(12, 16)
randlow = rand(0, 4)
randInterval = 40//rand(50, 70)
inverse = 0
while(src)
animate(filters[filters.len], size = randlow, x = 0, y = 0, time = randInterval, easing = QUAD_EASING)
sleep(randInterval)
if(inverse)
animate(filters[filters.len], size = randhigh, x = randlow, y = randlow, time = randInterval, easing = QUAD_EASING)
else
animate(filters[filters.len], size = randhigh, x = -randlow, y = -randlow, time = randInterval, easing = QUAD_EASING)
inverse = !inverse
sleep(randInterval)
mob/verb
MapOnly()
ScrubScreen(usr)
var/Effect/Shrooms/S = new
usr.client.screen += S
//S.AnimateDisplacement() // Commented out just to ensure the animation wasn't the issue, can uncomment as needed.
Expected Results:
Maptext will continue to display despite the map being present.
Actual Results:
Maptext is not displayed when the map is present.
Does the problem occur:
Every time? Or how often? Every time.
In other games? In my main game, LifeRP.
When does the problem NOT occur? When the displacement filter is removed from the object, atoms react as expected.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? The issue was present in 513.1542 and 514.1589.
Workarounds: Unsure, I tried tweaking the object's alpha but didn't gain much ground there.