When you have a nested vis_contents in a screen master, and one of the icons in the nested contents goes beyond the dimensions of the client screen, this can result in undefined behavior with the viewport.
1.) Once you login click "Add Master".
2.) Click "Add hooks".
3.) Move like 5 tiles to the right and you'll find yourself with a blackspace due to the big screen object.
4.) Use "RemoveHooks" and that would clear out the big screen object, but your screen remains stretched out.
5.) "RemoveHooks3" will be a verb that sets the screen master's vis_contents to null, and that will fix you.
Here is the test source that the bug was replicated:
https://www.mediafire.com/file/8hdtyojyelfo0fk/ screenmaster_test.zip/file
Viewport stretches even with a large object in the vis_contents of a screen master object.
Map/viewport is in the bottom left corner and the rest of the map is black.
The problem occurs about 95% of the time.
Another strange issue:
1.) Move 6 tiles diagonally
2.) Generate screen_master.
3.) Add hooks.
The map does not get displaced when it should.
When you do RemoveHook3, suddenly the map get's displaced.
Workarounds: Setting the screen master object's vis_contents to null in mob/Login()
ID:2940131
Aug 8, 1:19 pm (Edited on Aug 8, 1:36 pm)
|
|||||||||||||
| |||||||||||||
Aug 8, 1:32 pm (Edited on Aug 13, 9:05 pm)
|
|
Reuploaded test case to Discord: https://cdn.discordapp.com/attachments/725458744711839873/ 1273130215173918750/screenmaster_test.zip?ex=66bd7e68&is=66b c2ce8&hm=8552614ed6abf4895501342fb3cc32a9f382e12509be36ce514 5d7768bd6cb4b&
|
This is gonna be a nasty one to wrap my head around to fix.
The problem is that when the client gets the update to the visual contents, it doesn't really have the context to know the object whose contents it's updating is a screen object and needs to recalculate bounds. The only way I can picture fixing this for now is a pretty ugly hack of grabbing a list of objects that received the vis contents message, then looping through all screen objects to see if they recursively contain any of them. That's not great. There are also a couple of other places visual contents can be set where this would potentially be an issue. |
Login to reply.