RPG

Tasklist

FS#684 - Character remains in world after exit

Attached to Project: RPG
Opened by neb (neb) - Thursday, 18 March 2010, 06:50 GMT-7
Last edited by neb (neb) - Tuesday, 17 August 2010, 08:08 GMT-7
Task Type Bug Report
Category Client
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority High
Reported Version 0.8
Due in Version 0.9
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Upon exiting world the avatar may still show up to others.

This was specifically observed in one client (not yet tested with other players connected), when exiting the world via the Set Camp action, then re-entering with another character. The first character was still standing there, and the "In World" ("Nearby") list showed both names. Server logs showed the previous character cleanly logged out.

Now that exiting the world is transactional ( FS#652 ), investigate whether the local client is not receiving/handling the exit result properly. Investigate the protocol signaling other clients that a character is exiting the world.
Closed by  neb (neb)
Tuesday, 17 August 2010, 08:08 GMT-7
Reason for closing:  Fixed
Comment by neb (neb) - Saturday, 27 March 2010, 08:46 GMT-7
The reason may be that the only place the MapContent entities list is maintained is in the Arrival and Departure commands. Enter/exit world uses EnterWorld/ExitWorld commands, which do not maintain the character list. This is OK, however, because after entering the world, the client completes the world enter situation by transacting an Arrival command. This is how the character initially shows up in the world. However, the client does not transact a final Departure command before the ExitWorld command, thus leaving the character in-world.

In addition, there may be a timing issue with an exiting character's state being set out-of-world by the server. If the character content is set out-of-world, the client will no longer render it. If, however, some case exists in which the character's content is not properly set out-of-world (and not removed from MapContent due to lack of final Departure), the client could continue to render the character (and the name remains in the roster list).

To patch this situation, add a Departure command prior to ExitWorld (similar to EnterWorld then Arrival). In the server, add more failsafe logic to clean up the MapContent lists upon client disconnect and session cleanup. Consider brute force iteration of all active MapContent objects, signaling character removal (since character state cannot be trusted upon broken cleanup).

Ideally, improve the entire enter/exit arrive/depart protocol. More to the point, clean up the multiple ways in which character position/status are kept. Consider a central repository of character situation in server.

Loading...