Fixed some issues that lead to indefinite shutdown times
This commit is contained in:
@@ -43,7 +43,7 @@ class AIRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic fun clearAllBots() {
|
@JvmStatic fun clearAllBots() {
|
||||||
PulseRepository.forEach { (_, it) ->
|
PulseRepository.toList().forEach { (_, it) ->
|
||||||
it.stop();
|
it.stop();
|
||||||
it.botScript.bot.clear();
|
it.botScript.bot.clear();
|
||||||
AIPlayer.deregister((it.botScript.bot as AIPlayer).uid)
|
AIPlayer.deregister((it.botScript.bot as AIPlayer).uid)
|
||||||
|
|||||||
@@ -351,6 +351,8 @@ public class Player extends Entity {
|
|||||||
* @param force If we should force removal, a player engaged in combat will otherwise remain active until out of combat.
|
* @param force If we should force removal, a player engaged in combat will otherwise remain active until out of combat.
|
||||||
*/
|
*/
|
||||||
public void clear(boolean force) {
|
public void clear(boolean force) {
|
||||||
|
if (!isActive())
|
||||||
|
return;
|
||||||
if (force) {
|
if (force) {
|
||||||
Repository.getDisconnectionQueue().remove(getName());
|
Repository.getDisconnectionQueue().remove(getName());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,7 +160,6 @@ object Repository {
|
|||||||
playerNames.remove(player.name)
|
playerNames.remove(player.name)
|
||||||
UpdateSequence.renderablePlayers.remove(player)
|
UpdateSequence.renderablePlayers.remove(player)
|
||||||
player.session.disconnect()
|
player.session.disconnect()
|
||||||
player.clear(true)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user