Thread: 255 region fix

Results 1 to 8 of 8
  1. #1 255 region fix 
    Registered Member
    Join Date
    Sep 2010
    Posts
    841
    Thanks given
    1
    Thanks received
    3
    Rep Power
    1
    what is edited concerned this 80/255 region fix?

    stream class client sided
    stream class server sided
    updateplayer method in playerhandler


    are those the only 3 and the 3 right ones?
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    updateplayer method in playerhandler
    to fix it you just have to modify that one class file
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2010
    Posts
    841
    Thanks given
    1
    Thanks received
    3
    Rep Power
    1
    Quote Originally Posted by Martin View Post
    to fix it you just have to modify that one class file
    is the client buffer size in stream class suppose to stay 5000?

    I once had it fixed by lmc who put it to 35000, but now its not working too good with a lot of players online
    Reply With Quote  
     

  4. #4  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    Friendly bump. needing this fix tho
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    let me download pi 1min

    edit:

    open PlayerHandler.java

    search

    public void updatePlayer(Player plr, Stream str) {
    scroll down to

    for(int i = 0; i < size; i++) {
    under it add

    Code:
    if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
    then scroll down to

    for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    then below add

    Code:
    if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
    fixed
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Sep 2010
    Posts
    841
    Thanks given
    1
    Thanks received
    3
    Rep Power
    1
    Quote Originally Posted by Martin View Post
    let me download pi 1min

    edit:

    open PlayerHandler.java

    search



    scroll down to



    under it add

    Code:
    if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
    then scroll down to



    then below add

    Code:
    if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
    fixed

    will this method (you made it for sabsabii think)

    Code:
    	public void updatePlayer(Player plr, Stream str) {
    
    			updateBlock.currentOffset = 0;
    			if(updateRunning && !updateAnnounced) {
    				str.createFrame(114);
    				str.writeWordBigEndian(updateSeconds*50/30);
    			}
    			plr.updateThisPlayerMovement(str);		
    			boolean saveChatTextUpdate = plr.isChatTextUpdateRequired();
    			plr.setChatTextUpdateRequired(false);
    			plr.appendPlayerUpdateBlock(updateBlock);
    			plr.setChatTextUpdateRequired(saveChatTextUpdate);
    			str.writeBits(8, plr.playerListSize);
    			int size = plr.playerListSize;
    			plr.playerListSize = 0;	
    			for(int i = 0; i < size; i++) {			
    				if(!plr.didTeleport && !plr.playerList[i].didTeleport && plr.withinDistance(plr.playerList[i])) {
    					plr.playerList[i].updatePlayerMovement(str);
    					plr.playerList[i].appendPlayerUpdateBlock(updateBlock);
    					plr.playerList[plr.playerListSize++] = plr.playerList[i];
    				} else {
    					int id = plr.playerList[i].playerId;
    					plr.playerInListBitmap[id>>3] &= ~(1 << (id&7));
    					str.writeBits(1, 1);
    					str.writeBits(2, 3);
    				}
    			}
    			int j = 0;
    			for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    
    				if(plr.playerListSize >= 254)
    				break;
    				if(updateBlock.currentOffset+str.currentOffset >= 4900)
    				break;
    				if(players[i] == null || !players[i].isActive || players[i] == plr) 
    				continue;
    				int id = players[i].playerId;
    				if((plr.playerInListBitmap[id>>3]&(1 << (id&7))) != 0) 
    				continue;
    				if(j >= 10) 
    				break;	
    				if(!plr.withinDistance(players[i])) continue;		
    				plr.addNewPlayer(players[i], str, updateBlock);
    				j++;
    			}	
    			if(updateBlock.currentOffset > 0) {
    				str.writeBits(11, 2047);	
    				str.finishBitAccess();				
    				str.writeBytes(updateBlock.buffer, updateBlock.currentOffset, 0);
    			}
    			else str.finishBitAccess();	
    			str.endFrameVarSizeWord();		
    	}
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    Quote Originally Posted by Mickt3 View Post
    will this method (you made it for sabsabii think)

    Code:
    	public void updatePlayer(Player plr, Stream str) {
    
    			updateBlock.currentOffset = 0;
    			if(updateRunning && !updateAnnounced) {
    				str.createFrame(114);
    				str.writeWordBigEndian(updateSeconds*50/30);
    			}
    			plr.updateThisPlayerMovement(str);		
    			boolean saveChatTextUpdate = plr.isChatTextUpdateRequired();
    			plr.setChatTextUpdateRequired(false);
    			plr.appendPlayerUpdateBlock(updateBlock);
    			plr.setChatTextUpdateRequired(saveChatTextUpdate);
    			str.writeBits(8, plr.playerListSize);
    			int size = plr.playerListSize;
    			plr.playerListSize = 0;	
    			for(int i = 0; i < size; i++) {			
    				if(!plr.didTeleport && !plr.playerList[i].didTeleport && plr.withinDistance(plr.playerList[i])) {
    					plr.playerList[i].updatePlayerMovement(str);
    					plr.playerList[i].appendPlayerUpdateBlock(updateBlock);
    					plr.playerList[plr.playerListSize++] = plr.playerList[i];
    				} else {
    					int id = plr.playerList[i].playerId;
    					plr.playerInListBitmap[id>>3] &= ~(1 << (id&7));
    					str.writeBits(1, 1);
    					str.writeBits(2, 3);
    				}
    			}
    			int j = 0;
    			for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    
    				if(plr.playerListSize >= 254)
    				break;
    				if(updateBlock.currentOffset+str.currentOffset >= 4900)
    				break;
    				if(players[i] == null || !players[i].isActive || players[i] == plr) 
    				continue;
    				int id = players[i].playerId;
    				if((plr.playerInListBitmap[id>>3]&(1 << (id&7))) != 0) 
    				continue;
    				if(j >= 10) 
    				break;	
    				if(!plr.withinDistance(players[i])) continue;		
    				plr.addNewPlayer(players[i], str, updateBlock);
    				j++;
    			}	
    			if(updateBlock.currentOffset > 0) {
    				str.writeBits(11, 2047);	
    				str.finishBitAccess();				
    				str.writeBytes(updateBlock.buffer, updateBlock.currentOffset, 0);
    			}
    			else str.finishBitAccess();	
    			str.endFrameVarSizeWord();		
    	}
    thats only half the fix.
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Sep 2010
    Posts
    841
    Thanks given
    1
    Thanks received
    3
    Rep Power
    1
    Quote Originally Posted by Martin View Post
    thats only half the fix.
    the full fix is by adding this line as well

    Code:
    if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
    right here?

    Code:
    			for(int i = 0; i < size; i++) {	
    				if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
    				if(!plr.didTeleport && !plr.playerList[i].didTeleport && plr.withinDistance(plr.playerList[i])) {
    					plr.playerList[i].updatePlayerMovement(str);
    					plr.playerList[i].appendPlayerUpdateBlock(updateBlock);
    					plr.playerList[plr.playerListSize++] = plr.playerList[i];
    				} else {
    					int id = plr.playerList[i].playerId;
    					plr.playerInListBitmap[id>>3] &= ~(1 << (id&7));
    					str.writeBits(1, 1);
    					str.writeBits(2, 3);
    				}
    			}
    and what are these 2 values supposed to be at client sided:

    client class:
    Code:
    aStream_834 = new Stream(new byte[5000]);
    stream class:
    Code:
    stream_1.buffer = new byte[5000];
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Construct map region packet aka 'secondary map region packet'
    By Graham in forum Informative Threads
    Replies: 95
    Last Post: 06-22-2015, 12:19 PM
  2. Region Map
    By Ayton in forum Requests
    Replies: 8
    Last Post: 05-15-2012, 04:07 PM
  3. Replies: 50
    Last Post: 09-06-2010, 06:55 PM
  4. What region
    By Mrquarterx in forum Help
    Replies: 9
    Last Post: 11-24-2009, 06:57 AM
  5. Region IDS
    By G0nzo in forum Requests
    Replies: 3
    Last Post: 11-01-2009, 08:23 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •