~~~~Harakiri~~~~

5. August 2011

Latest commits

I think my commit notes are verbose enough that they do not warrant another post here. Still...

As you maybe saw from the ticker apart from server side chat filtering, persistent cooldown timers for spells and abilities, i also had to refactor the teleport player method while they are on a boat.

This was one of the things where you thought everything is working perfectly, and then there still was the case you never imagined that it would not work.

On some boat routes, there is a shuttle ship which brings you from the dock to the boat, for example in Erudin. The client tells the server that he either enters or leaves a boat, so we can keep track which player is on which boat, and we know which players to transport to the new zone when the boat wants to zone.

Now the client "feature" is, that it will not tell the server any changes when the player is walking from the shuttle directly on the boat. The client only checks if he should sent new information to the server every 1 sec - since the player immediately is on another boat the client does not feel the need to sent the information that the boat changes. The server will still think the player is on the shuttle ship, even if the player is on the boat. And when the boat tries to zone the server thinks there are no players on the boat and just zones and you fall off the boat in the current zone because it is removed.

Now we still do know that the player is on a boat - but we cant say for certain on which one. So i changed the logic that there isnt a passenger list for each boat anymore. Upon zoning the zone will simply look if there are players near the location of the boats final stop point before zoning. This works pretty well, the correct boat name is then transmitted anyway the moment the client zones and sents us his profile with the boatname information.

As you can see, such a small client "feature" required some refactoring of existing working code - it didnt take too long tho.

Keine Kommentare:

Kommentar veröffentlichen