@@ -691,7 +691,7 @@ public static void setConfigToDefaults() {
691
691
Class40_Sub5_Sub15 .systemUpdateTime = 0 ;
692
692
IncomingPackets .cyclesSinceLastPacket = 0 ;
693
693
Player .headIconDrawType = 0 ;
694
- SceneCluster . packetBuffer .currentPosition = 0 ;
694
+ OutgoingPackets . buffer .currentPosition = 0 ;
695
695
SceneCluster .idleLogout = 0 ;
696
696
IncomingPackets .thirdLastOpcode = -1 ;
697
697
IncomingPackets .incomingPacketBuffer .currentPosition = 0 ;
@@ -887,10 +887,10 @@ public static void method364(boolean arg1) {
887
887
if (MovedStatics .anInt537 >= 50 || arg1 ) {
888
888
MovedStatics .anInt537 = 0 ;
889
889
if (!aBoolean871 && MovedStatics .gameServerSocket != null ) {
890
- SceneCluster . packetBuffer .putPacket (13 );
890
+ OutgoingPackets . buffer .putPacket (13 );
891
891
try {
892
- MovedStatics .gameServerSocket .sendDataFromBuffer (SceneCluster . packetBuffer .currentPosition , 0 , SceneCluster . packetBuffer .buffer );
893
- SceneCluster . packetBuffer .currentPosition = 0 ;
892
+ MovedStatics .gameServerSocket .sendDataFromBuffer (OutgoingPackets . buffer .currentPosition , 0 , OutgoingPackets . buffer .buffer );
893
+ OutgoingPackets . buffer .currentPosition = 0 ;
894
894
} catch (java .io .IOException ioexception ) {
895
895
aBoolean871 = true ;
896
896
}
@@ -1272,16 +1272,16 @@ public static void updateGame() {
1272
1272
for (int i = 0 ; i < Item .obfuscatedKeyStatus .length ; i ++)
1273
1273
Item .obfuscatedKeyStatus [i ] = false ;
1274
1274
}
1275
- ClientScriptRunner .createClientScriptCheckPacket (205 , SceneCluster . packetBuffer );
1275
+ ClientScriptRunner .createClientScriptCheckPacket (205 , OutgoingPackets . buffer );
1276
1276
synchronized (mouseCapturer .objectLock ) {
1277
1277
if (MovedStatics .accountFlagged ) {
1278
1278
if (MouseHandler .clickType != 0 || mouseCapturer .coord >= 40 ) {
1279
1279
int coordinateCount = 0 ;
1280
- SceneCluster . packetBuffer .putPacket (210 );
1281
- SceneCluster . packetBuffer .putByte (0 );
1282
- int originalOffset = SceneCluster . packetBuffer .currentPosition ;
1280
+ OutgoingPackets . buffer .putPacket (210 );
1281
+ OutgoingPackets . buffer .putByte (0 );
1282
+ int originalOffset = OutgoingPackets . buffer .currentPosition ;
1283
1283
for (int c = 0 ; c < mouseCapturer .coord ; c ++) {
1284
- if (-originalOffset + SceneCluster . packetBuffer .currentPosition >= 240 )
1284
+ if (-originalOffset + OutgoingPackets . buffer .currentPosition >= 240 )
1285
1285
break ;
1286
1286
coordinateCount ++;
1287
1287
int pixelOffset = mouseCapturer .coordsY [c ];
@@ -1312,18 +1312,18 @@ else if(x > 764)
1312
1312
if (duplicateClickCount < 8 && differenceX >= -32 && differenceX <= 31 && differenceY >= -32 && differenceY <= 31 ) {
1313
1313
differenceX += 32 ;
1314
1314
differenceY += 32 ;
1315
- SceneCluster . packetBuffer .putShortBE (differenceY + (differenceX << 6 ) + (duplicateClickCount << 12 ));
1315
+ OutgoingPackets . buffer .putShortBE (differenceY + (differenceX << 6 ) + (duplicateClickCount << 12 ));
1316
1316
duplicateClickCount = 0 ;
1317
1317
} else if (duplicateClickCount < 8 ) {
1318
- SceneCluster . packetBuffer .putMediumBE (y + 8388608 + (duplicateClickCount << 19 ));
1318
+ OutgoingPackets . buffer .putMediumBE (y + 8388608 + (duplicateClickCount << 19 ));
1319
1319
duplicateClickCount = 0 ;
1320
1320
} else {
1321
- SceneCluster . packetBuffer .putIntBE ((duplicateClickCount << 19 ) + -1073741824 + y );
1321
+ OutgoingPackets . buffer .putIntBE ((duplicateClickCount << 19 ) + -1073741824 + y );
1322
1322
duplicateClickCount = 0 ;
1323
1323
}
1324
1324
}
1325
1325
}
1326
- SceneCluster . packetBuffer .finishVarByte (SceneCluster . packetBuffer .currentPosition + -originalOffset );
1326
+ OutgoingPackets . buffer .finishVarByte (OutgoingPackets . buffer .currentPosition + -originalOffset );
1327
1327
if (coordinateCount < mouseCapturer .coord ) {
1328
1328
mouseCapturer .coord -= coordinateCount ;
1329
1329
for (int i_9_ = 0 ; mouseCapturer .coord > i_9_ ; i_9_ ++) {
@@ -1358,9 +1358,9 @@ else if(x > 764)
1358
1358
if (l > 4095 )
1359
1359
l = 4095L ;
1360
1360
int i_12_ = (int ) l ;
1361
- SceneCluster . packetBuffer .putPacket (234 );
1361
+ OutgoingPackets . buffer .putPacket (234 );
1362
1362
int i_13_ = i_10_ * 765 + i ;
1363
- SceneCluster . packetBuffer .putIntLE ((i_11_ << 19 ) + (i_12_ << 20 ) + i_13_ );
1363
+ OutgoingPackets . buffer .putIntLE ((i_11_ << 19 ) + (i_12_ << 20 ) + i_13_ );
1364
1364
}
1365
1365
if (InteractiveObject .anInt487 > 0 )
1366
1366
InteractiveObject .anInt487 --;
@@ -1369,19 +1369,19 @@ else if(x > 764)
1369
1369
if (MovedStatics .aBoolean565 && InteractiveObject .anInt487 <= 0 ) {
1370
1370
InteractiveObject .anInt487 = 20 ;
1371
1371
MovedStatics .aBoolean565 = false ;
1372
- SceneCluster . packetBuffer .putPacket (58 );
1373
- SceneCluster . packetBuffer .putShortBE (Game .playerCamera .getYaw ());
1374
- SceneCluster . packetBuffer .putShortBE (Game .playerCamera .getPitch ());
1372
+ OutgoingPackets . buffer .putPacket (58 );
1373
+ OutgoingPackets . buffer .putShortBE (Game .playerCamera .getYaw ());
1374
+ OutgoingPackets . buffer .putShortBE (Game .playerCamera .getPitch ());
1375
1375
}
1376
1376
if (MovedStatics .aBoolean571 && !aBoolean1735 ) {
1377
1377
aBoolean1735 = true ;
1378
- SceneCluster . packetBuffer .putPacket (160 );
1379
- SceneCluster . packetBuffer .putByte (1 );
1378
+ OutgoingPackets . buffer .putPacket (160 );
1379
+ OutgoingPackets . buffer .putByte (1 );
1380
1380
}
1381
1381
if (!MovedStatics .aBoolean571 && aBoolean1735 ) {
1382
1382
aBoolean1735 = false ;
1383
- SceneCluster . packetBuffer .putPacket (160 );
1384
- SceneCluster . packetBuffer .putByte (0 );
1383
+ OutgoingPackets . buffer .putPacket (160 );
1384
+ OutgoingPackets . buffer .putByte (0 );
1385
1385
}
1386
1386
LinkedList .method910 ();
1387
1387
if (Class51 .gameStatusCode == 30 || Class51 .gameStatusCode == 35 ) {
@@ -1550,27 +1550,27 @@ else if(ChatBox.dialogueId != -1)
1550
1550
for (int i_19_ = 0 ; i_19_ < 5 ; i_19_ ++)
1551
1551
SceneCamera .customCameraTimer [i_19_ ]++;
1552
1552
GameInterface .manageTextInputs ();
1553
- int i_20_ = Npc . method400 (- 1 );
1554
- int i_21_ = Class17 . method274 ();
1553
+ int i_20_ = MouseHandler . resetFramesSinceMouseInput ( );
1554
+ int i_21_ = KeyFocusListener . resetFramesSinceKeyboardInput ();
1555
1555
if (i_20_ > 4500 && i_21_ > 4500 ) {
1556
1556
SceneCluster .idleLogout = 250 ;
1557
1557
MovedStatics .method650 (4000 );
1558
- SceneCluster . packetBuffer .putPacket (216 );
1558
+ OutgoingPackets . buffer .putPacket (216 );
1559
1559
}
1560
1560
1561
1561
// antibot camera/minimap randomisation used to happen here
1562
1562
1563
1563
MovedStatics .anInt537 ++;
1564
1564
if (MovedStatics .anInt537 > 50 ) {
1565
- SceneCluster . packetBuffer .putPacket (13 );
1565
+ OutgoingPackets . buffer .putPacket (13 );
1566
1566
}
1567
1567
do {
1568
1568
try {
1569
- if (MovedStatics .gameServerSocket == null || SceneCluster . packetBuffer .currentPosition <= 0 )
1569
+ if (MovedStatics .gameServerSocket == null || OutgoingPackets . buffer .currentPosition <= 0 )
1570
1570
break ;
1571
- MovedStatics .gameServerSocket .sendDataFromBuffer (SceneCluster . packetBuffer .currentPosition , 0 , SceneCluster . packetBuffer .buffer );
1571
+ MovedStatics .gameServerSocket .sendDataFromBuffer (OutgoingPackets . buffer .currentPosition , 0 , OutgoingPackets . buffer .buffer );
1572
1572
MovedStatics .anInt537 = 0 ;
1573
- SceneCluster . packetBuffer .currentPosition = 0 ;
1573
+ OutgoingPackets . buffer .currentPosition = 0 ;
1574
1574
} catch (java .io .IOException ioexception ) {
1575
1575
Class59 .dropClient ();
1576
1576
break ;
@@ -1615,11 +1615,11 @@ public static void handleLoginScreenActions() {
1615
1615
}
1616
1616
if (loginStatus == 2 ) {
1617
1617
long l = MovedStatics .aLong853 = RSString .nameToLong (Native .username .toString ());
1618
- SceneCluster . packetBuffer .currentPosition = 0 ;
1619
- SceneCluster . packetBuffer .putByte (14 );
1618
+ OutgoingPackets . buffer .currentPosition = 0 ;
1619
+ OutgoingPackets . buffer .putByte (14 );
1620
1620
int i = (int ) (0x1fL & l >> 16 );
1621
- SceneCluster . packetBuffer .putByte (i );
1622
- MovedStatics .gameServerSocket .sendDataFromBuffer (2 , 0 , SceneCluster . packetBuffer .buffer );
1621
+ OutgoingPackets . buffer .putByte (i );
1622
+ MovedStatics .gameServerSocket .sendDataFromBuffer (2 , 0 , OutgoingPackets . buffer .buffer );
1623
1623
loginStatus = 3 ;
1624
1624
IncomingPackets .incomingPacketBuffer .currentPosition = 0 ;
1625
1625
}
@@ -1656,17 +1656,17 @@ public static void handleLoginScreenActions() {
1656
1656
seeds [1 ] = (int ) (Math .random () * 9.9999999E7 );
1657
1657
seeds [2 ] = (int ) (Renderable .aLong2858 >> 32 );
1658
1658
seeds [3 ] = (int ) Renderable .aLong2858 ;
1659
- SceneCluster . packetBuffer .currentPosition = 0 ;
1660
- SceneCluster . packetBuffer .putByte (10 );
1661
- SceneCluster . packetBuffer .putIntBE (seeds [0 ]);
1662
- SceneCluster . packetBuffer .putIntBE (seeds [1 ]);
1663
- SceneCluster . packetBuffer .putIntBE (seeds [2 ]);
1664
- SceneCluster . packetBuffer .putIntBE (seeds [3 ]);
1665
- SceneCluster . packetBuffer .putIntBE (signlink .uid );
1666
- SceneCluster . packetBuffer .putLongBE (RSString .nameToLong (Native .username .toString ()));
1667
- SceneCluster . packetBuffer .method505 (Native .password );
1659
+ OutgoingPackets . buffer .currentPosition = 0 ;
1660
+ OutgoingPackets . buffer .putByte (10 );
1661
+ OutgoingPackets . buffer .putIntBE (seeds [0 ]);
1662
+ OutgoingPackets . buffer .putIntBE (seeds [1 ]);
1663
+ OutgoingPackets . buffer .putIntBE (seeds [2 ]);
1664
+ OutgoingPackets . buffer .putIntBE (seeds [3 ]);
1665
+ OutgoingPackets . buffer .putIntBE (signlink .uid );
1666
+ OutgoingPackets . buffer .putLongBE (RSString .nameToLong (Native .username .toString ()));
1667
+ OutgoingPackets . buffer .method505 (Native .password );
1668
1668
if (Configuration .RSA_ENABLED ) {
1669
- SceneCluster . packetBuffer .applyRSA (Configuration .RSA_MODULUS , Configuration .RSA_PUBLIC_KEY );
1669
+ OutgoingPackets . buffer .applyRSA (Configuration .RSA_MODULUS , Configuration .RSA_PUBLIC_KEY );
1670
1670
}
1671
1671
1672
1672
@@ -1680,7 +1680,7 @@ public static void handleLoginScreenActions() {
1680
1680
// New session
1681
1681
MovedStatics .packetBuffer .putByte (16 );
1682
1682
}
1683
- MovedStatics .packetBuffer .putByte (57 + SceneCluster . packetBuffer .currentPosition );
1683
+ MovedStatics .packetBuffer .putByte (57 + OutgoingPackets . buffer .currentPosition );
1684
1684
MovedStatics .packetBuffer .putIntBE (435 );
1685
1685
MovedStatics .packetBuffer .putByte (VertexNormal .lowMemory ? 1 : 0 );
1686
1686
MovedStatics .packetBuffer .putIntBE (CacheArchive .skeletonCacheArchive .crc8 );
@@ -1696,12 +1696,12 @@ public static void handleLoginScreenActions() {
1696
1696
MovedStatics .packetBuffer .putIntBE (CacheArchive .huffmanCacheArchive .crc8 );
1697
1697
MovedStatics .packetBuffer .putIntBE (CacheArchive .jingleCacheArchive .crc8 );
1698
1698
MovedStatics .packetBuffer .putIntBE (CacheArchive .clientScriptCacheArchive .crc8 );
1699
- MovedStatics .packetBuffer .putBytes (0 , SceneCluster . packetBuffer .currentPosition , SceneCluster . packetBuffer .buffer );
1699
+ MovedStatics .packetBuffer .putBytes (0 , OutgoingPackets . buffer .currentPosition , OutgoingPackets . buffer .buffer );
1700
1700
MovedStatics .gameServerSocket .sendDataFromBuffer (MovedStatics .packetBuffer .currentPosition , 0 , MovedStatics .packetBuffer .buffer );
1701
- SceneCluster . packetBuffer .initOutCipher (seeds );
1701
+ OutgoingPackets . buffer .initOutCipher (seeds );
1702
1702
1703
1703
// TODO (Jameskmonger) this allows the OutgoingPackets to access the ISAAC cipher. This is a hack and should be fixed.
1704
- OutgoingPackets .init (SceneCluster . packetBuffer .outCipher );
1704
+ OutgoingPackets .init (OutgoingPackets . buffer .outCipher );
1705
1705
1706
1706
for (int i = 0 ; i < 4 ; i ++) {
1707
1707
seeds [i ] += 50 ;
0 commit comments