Numbered Steps to Reproduce Problem:1.Create a blank Project.
2.Replace it with the code below.
ALSO make sure you have a map for the player.
And some visible icons for terrain/player or it'll be harder to see the effect.
3.Host it in Dream Daemon.
4.Join using the web-client.
Notice it's in the wrong position, go back and join using DS and you'll notice it's directly above the players head where it should be where-as in the webclient it wasn't.
Code Snippet (if applicable) to Reproduce Problem:
mob
icon='Testing Environment.dmi' //Replace with an actual icon file here.
icon_state="Warrior3" //Replace with a visible state.
Login()
..()
var/obj/a=new
a.maptext="<center><font color=\"red\">[key]</font></center>"
a.maptext_width=320
a.screen_loc="5,5"//Setting screen_loc should've had no effect since it only applies to client.screen positioning
a.pixel_x=-144
a.pixel_y=24
overlays+=a
Expected Results:The players key should display over the head of the player.
Actual Results: It's not centering the text properly after setting screen_loc.
Does the problem occur:
Every time? Or how often?Every Time
In other games?Yes
In other user accounts?Yes
On other computers?Yes
When does the problem NOT occur?Always
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.)
Untested.
Workarounds:
Don't set screen_loc on it if your going to be adding it as an overlay/underlay.
***I know there's no reason to set screen_loc unless it's being added to the client's screen, it's useless to do so, but in my case I am using something that's used 90% of the time on the client's screen, and since it already did everything I needed, had re-used it as an overlay object and re-positioned it.
I hadn't thought about the screen_loc being set since it should've had no effect but on the web-client it's throwing off the text's positioning.
The screen_loc thing appears to be a red herring, though. When I commented out that line--this was using your exact same code--the problem persisted. IE appears to not respect the centering.