Fix issue with a player not being able to spawn when they join somone in co-op with a singleplayer team of more than the max allowed amount

This commit is contained in:
Melledy
2022-04-19 01:43:38 -07:00
parent 7b0054e936
commit f7752c027d
3 changed files with 6 additions and 5 deletions

View File

@@ -158,7 +158,7 @@ public class TeamManager {
}
public boolean isSpawned() {
return getPlayer().getWorld() != null && getPlayer().getScene().getEntities().containsKey(getCurrentAvatarEntity().getId());
return getPlayer().getScene() != null && getPlayer().getScene().getEntities().containsKey(getCurrentAvatarEntity().getId());
}
public int getMaxTeamSize() {
@@ -256,7 +256,7 @@ public class TeamManager {
updateTeamResonances();
// Packets
getPlayer().getScene().broadcastPacket(new PacketSceneTeamUpdateNotify(getPlayer()));
getPlayer().getWorld().broadcastPacket(new PacketSceneTeamUpdateNotify(getPlayer()));
// Run callback
if (responsePacket != null) {