Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean newPlayerClient(Client client1)
- {
- int slot = -1;
- for(int i = 1; i < Config.MAX_PLAYERS; i++) {
- if(players[i] == null || players[i].disconnected) {
- slot = i;
- break;
- }
- }
- if(slot == -1)
- return false;
- client1.handler = this;
- client1.playerId = slot;
- players[slot] = client1;
- players[slot].isActive = true;
- players[slot].connectedFrom = ((InetSocketAddress) client1.getSession().getRemoteAddress()).getAddress().getHostAddress();
- if(Config.SERVER_DEBUG)
- Misc.println("Player Slot "+slot+" slot 0 "+players[0]+" Player Hit "+players[slot]);//does nothing.... ;;players dont give the right amount of playesr? i am getting the right amount why not me? logout log inand u wont get the right
- return true;
- }
Add Comment
Please, Sign In to add comment