to fix it you just have to modify that one class fileupdateplayer method in playerhandler
|
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?
Friendly bump. needing this fix tho
let me download pi 1min
edit:
open PlayerHandler.java
search
scroll down topublic void updatePlayer(Player plr, Stream str) {
under it addfor(int i = 0; i < size; i++) {
then scroll down toCode:if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
then below addfor(int i = 0; i < Config.MAX_PLAYERS; i++) {
fixedCode:if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
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(); }
the full fix is by adding this line as well
right here?Code:if(updateBlock.currentOffset + str.currentOffset >= 4900) break;
and what are these 2 values supposed to be at client sided: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); } }
client class:stream class:Code:aStream_834 = new Stream(new byte[5000]);Code:stream_1.buffer = new byte[5000];
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |