updateplayer 更新

This commit is contained in:
yuexin 2020-12-24 10:25:01 +08:00
parent ace0d0cd2a
commit 1fa48ee9cb

View File

@ -72,10 +72,14 @@ export class BattleHandler {
} }
}); });
this._players.delete(oldplayer); this._players.delete(oldplayer);
if(ph){
this._players.set(newplayer, ph);
this._playerids.set(aplayerid + '', newplayer);
}
} }
if(ph){
this._players.set(newplayer, ph); if(!ph){
this._playerids.set(aplayerid + '', newplayer); this.addPlayer(newplayer);
} }
}; };