Introduction:
Hey everyone. So, in Conquer Online, there's a teleportation feature where you can teleport a character to any map and (x, y) coordinate on the server. The problem is, when you teleport a character to a map that does not exist in the client, the client seems to freeze. That's because the client cannot find the dmap file that should be in its map folder. You can detect when this happens though, and either teleport the character back to its previous location, or disconnect it.
The Concept:
When a successful teleportation occurs, the client sends a packet to the server requesting for surrounding spawns. This packet is the general action packet, subtype 114. When a unsuccessful teleportation occurs, that packet is not sent.
The Solution:
To detect when a map is not being loaded by the client, you should start a timer on the map change method. When the map has been assigned to the client in server management, it should take no longer than 10 seconds (one ping cycle in Conquer Online) to receive the request for surroundings. If the map loaded successfully, the timer should be stopped (reset at map change). Else, the timer will continue and the timer action will be executed. That action can be what you like, but it only occurs if the map has not been loaded (or the player is attempting to play using a bot that removes entity spawns). This is also helpful for the server so that the character doesn't just stand their defenseless for longer than the protection period (which should also be one ping cycle in Conquer Online). Cheers.
Hey everyone. So, in Conquer Online, there's a teleportation feature where you can teleport a character to any map and (x, y) coordinate on the server. The problem is, when you teleport a character to a map that does not exist in the client, the client seems to freeze. That's because the client cannot find the dmap file that should be in its map folder. You can detect when this happens though, and either teleport the character back to its previous location, or disconnect it.
The Concept:
When a successful teleportation occurs, the client sends a packet to the server requesting for surrounding spawns. This packet is the general action packet, subtype 114. When a unsuccessful teleportation occurs, that packet is not sent.
The Solution:
To detect when a map is not being loaded by the client, you should start a timer on the map change method. When the map has been assigned to the client in server management, it should take no longer than 10 seconds (one ping cycle in Conquer Online) to receive the request for surroundings. If the map loaded successfully, the timer should be stopped (reset at map change). Else, the timer will continue and the timer action will be executed. That action can be what you like, but it only occurs if the map has not been loaded (or the player is attempting to play using a bot that removes entity spawns). This is also helpful for the server so that the character doesn't just stand their defenseless for longer than the protection period (which should also be one ping cycle in Conquer Online). Cheers.