Man i have other question i very try fix this camera player round finish for he play
but not sucess no work i very ty your method in my READY BATTEL but not understand well your
this is my
CM_BATTLE_READY_REQ code Java you know in he locate for fix this bug?
[src=java]public class CM_BATTLE_READY_REQ extends ClientPacket {
public CM_BATTLE_READY_REQ (int opcode) {
super(opcode);
}
@Override
public void readImpl() {
}
@Override
public void runImpl() {
final Room room = getConnection().getRoom();
if(room.getLeader().equals(getConnection().getPlayer())) {
if(room.isFigth() == 0) {
room.setFigth(1);
room.setTimeLost(room.getKillTime() * 60);
room.blueTeamCount = 0;
room.redTeamCount = 0;
room.doRound = 0;
}
ThreadPoolManager.getInstance().executeTask(new Runnable() {
@Override
public void run() {
for(Player member : getConnection().getRoom().getPlayers().values()) {
RoomSlot slot = room.getRoomSlotByPlayer(member);
if(slot.getState() == SlotState.SLOT_STATE_READY && !room.getLeader().equals(member)) {
slot.setState(SlotState.SLOT_STATE_LOAD);
member.getConnection().sendPacket(new SM_BATTLE_READY(room, getConnection().getPlayer()));
} else if(room.getLeader().equals(member)) {
slot.setState(SlotState.SLOT_STATE_LOAD);
member.getConnection().sendPacket(new SM_BATTLE_READY(room, member));
}
}
}
});
} else {
RoomSlot slotLeader = room.getRoomSlotByPlayer(room.getLeader());
RoomSlot slot = room.getRoomSlotByPlayer(getConnection().getPlayer());
if(slotLeader.getState() == SlotState.SLOT_STATE_LOAD || slotLeader.getState() == SlotState.SLOT_STATE_RENDEZVOUS || slotLeader.getState() == SlotState.SLOT_STATE_PRESTART || slotLeader.getState() == SlotState.SLOT_STATE_BATTLE_READY || slotLeader.getState() == SlotState.SLOT_STATE_BATTLE) {
slot.setState(SlotState.SLOT_STATE_LOAD);
sendPacket(new SM_BATTLE_READY(room, getConnection().getPlayer()));
}
if(slot.getState() == SlotState.SLOT_STATE_READY) {
slot.setState(SlotState.SLOT_STATE_NORMAL);
} else if(slot.getState() == SlotState.SLOT_STATE_NORMAL) {
slot.setState(SlotState.SLOT_STATE_READY);
}
}
ThreadPoolManager.getInstance().executeTask(new Runnable() {
@Override
public void run() {
for(Player member : getConnection().getRoom().getPlayers().values()) {
member.getConnection().sendPacket(new SM_ROOM_INFO(room));
}
}
});
}
}[/src]