ID:2325350
 
Resolved
When the map was cleared in certain cases, like an eye moving to nowhere, some info on the client did not reset resulting in phantom objects and in some cases unnecessary glides from the old position.
BYOND Version:512.1398
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 63.0.3239.84
Applies to:Dream Seeker
Status: Resolved (512.1400)

This issue has been resolved.
Descriptive Problem Summary:
If a user logs out while you are currently viewing them, your screen doesn't clear the user you were spying and will leave an after image only you can see.




Numbered Steps to Reproduce Problem:
1) Switch client.eye to another user mob
2) Have the other user log out

Code Snippet (if applicable) to Reproduce Problem:
mob/var/Spy;
mob/verb/View_Players()
if(usr.Spy)
usr.client.perspective= MOB_PERSPECTIVE; usr.client.eye = usr
usr.Spy=0
else
var/mob/M=input("Spy on whom?","Spy") as null|mob in world
if(M)
usr.client.perspective= EYE_PERSPECTIVE; usr.client.eye = M
usr.Spy=1


Expected Results:
User spying should view a completely black screen and have no ghost images.

Actual Results:
Users see a partial black screen with a ghost that does not disappear until they close their client.
Example: https://puu.sh/yG62e/a8124f4235.png

The ghost can't be seen by anyone aside from the client, and they aren't able to interact with it in any way including density. They can still right click it though.

Example right clicking ghost: https://puu.sh/yG66N/f1b0ebe3b9.png
Attempting to use a verb: https://puu.sh/yG66X/cf01f10d61.png

When does the problem NOT occur?
Anyone still currently using 511 (tested with 511.1385) won't have an issue with the same files compiled on 512.

I tried to run a quick test on this like so:

mob/verb/EyeFail()
var/obj/O = new(locate(20,20,1))
client.perspective = EYE_PERSPECTIVE
client.eye = O
sleep(10)
del(O)

sleep(50)
client.perspective &= ~EYE_PERSPECTIVE
client.eye = src

However I can't get the problem to happen there. The client screen does blank out except for HUD objects when the eye is deleted. I also tried it with a mob as the eye, just in case.

Are you able to narrow this down at all to a better test case? Obviously running the full game and having two clients connected is going to be rather a stretch, although I could probably try. If so I would need the source, and instructions how to get quickly to a place where this could be seen and how to do the spying thing. But better still would be a simpler test, like the one I did.

Now as a workaround for your issue, a good thing to do would be to keep track of who's spying on which mobs, so when a logout occurs you can unlink the spies properly. (Use a /tmp list var that's null until you need it, then create it and add the users who are spying.) Also, the Spy var being only 0 or 1 is obviously way less useful than being null or the other mob.
Lummox JR changed status to 'Unverified'
Hmm, perhaps I was being a bit unclear in the direction of the "black screen". That was just bonus information as I was trying to get as much as I could in there to help.

To attempt again, the real issue here is that it creates ghost images. This seems to be happening on other things (considering players are reporting it and they don't have access to view others) however the only confirmed case I have is for spy.


To explain, after using the code you used above for both a mob and obj, I was still able to see these images after they were deleted. (On Client 2), however Client 1 watches them disappear just fine.
https://puu.sh/yHvwS/c011694ee2.jpg



Here is the source I tested with:
https://puu.sh/yHvIo/22fb9659ac.zip
Thanks for the test case. That should help.
Aha, I see the ghost images now. I'll get to the bottom of it.
Lummox JR resolved issue with message:
When the map was cleared in certain cases, like an eye moving to nowhere, some info on the client did not reset resulting in phantom objects and in some cases unnecessary glides from the old position.

Login to reply.