reload scene now clears arrows + remove agent

This commit is contained in:
STEINNI
2025-11-24 19:39:05 +00:00
parent 9a7626f102
commit 76ff0ecb19
2 changed files with 15 additions and 3 deletions
@@ -156,7 +156,13 @@ export class kfArena{
removeAgent(aid){
const obj3d = this.scene.getObjectByName(aid)
this.clearHighlight3DObj(obj3d, this.scene)
this.scene.remove(obj3d)
const arrow3d = this.scene.getObjectByName(`_speed_${aid}`)
if(arrow3d) {
this.clearHighlight3DObj(arrow3d, this.scene)
this.scene.remove(arrow3d)
}
if(aid in this.agents) delete(this.agents[aid])
}