@@ -3657,4 +3657,91 @@ public static boolean method472(CacheArchive arg1, int arg2) {
3657
3657
return true ;
3658
3658
3659
3659
}
3660
+
3661
+ public static void method789 (int chunkLocalX , int chunkY , int chunkX , int chunkLocalY , int level ) {
3662
+ if (chunkX != regionX || chunkY != regionY || onBuildTimePlane != level && VertexNormal .lowMemory ) {
3663
+ onBuildTimePlane = level ;
3664
+ regionX = chunkX ;
3665
+ if (!VertexNormal .lowMemory )
3666
+ onBuildTimePlane = 0 ;
3667
+ regionY = chunkY ;
3668
+ processGameStatus (25 );
3669
+ method940 (English .loadingPleaseWait , false , null );
3670
+ int i = baseY ;
3671
+ int i_33_ = baseX ;
3672
+ baseX = (chunkX - 6 ) * 8 ;
3673
+ int i_34_ = baseX + -i_33_ ;
3674
+ i_33_ = baseX ;
3675
+ baseY = (-6 + chunkY ) * 8 ;
3676
+ int i_35_ = baseY + -i ;
3677
+ i = baseY ;
3678
+ for (int i_36_ = 0 ; i_36_ < 32768 ; i_36_ ++) {
3679
+ Npc class40_sub5_sub17_sub4_sub2 = Player .npcs [i_36_ ];
3680
+ if (class40_sub5_sub17_sub4_sub2 != null ) {
3681
+ for (int i_37_ = 0 ; i_37_ < 10 ; i_37_ ++) {
3682
+ class40_sub5_sub17_sub4_sub2 .pathY [i_37_ ] -= i_34_ ;
3683
+ class40_sub5_sub17_sub4_sub2 .pathX [i_37_ ] -= i_35_ ;
3684
+ }
3685
+ class40_sub5_sub17_sub4_sub2 .worldX -= 128 * i_34_ ;
3686
+ class40_sub5_sub17_sub4_sub2 .worldY -= i_35_ * 128 ;
3687
+ }
3688
+ }
3689
+ for (int i_38_ = 0 ; i_38_ < 2048 ; i_38_ ++) {
3690
+ Player class40_sub5_sub17_sub4_sub1 = Player .trackedPlayers [i_38_ ];
3691
+ if (class40_sub5_sub17_sub4_sub1 != null ) {
3692
+ for (int i_39_ = 0 ; i_39_ < 10 ; i_39_ ++) {
3693
+ class40_sub5_sub17_sub4_sub1 .pathY [i_39_ ] -= i_34_ ;
3694
+ class40_sub5_sub17_sub4_sub1 .pathX [i_39_ ] -= i_35_ ;
3695
+ }
3696
+ class40_sub5_sub17_sub4_sub1 .worldY -= 128 * i_35_ ;
3697
+ class40_sub5_sub17_sub4_sub1 .worldX -= 128 * i_34_ ;
3698
+ }
3699
+ }
3700
+ Player .worldLevel = level ;
3701
+ int i_40_ = 0 ;
3702
+ Player .localPlayer .method787 (chunkLocalY , false , chunkLocalX );
3703
+ int i_41_ = 104 ;
3704
+ int i_42_ = 1 ;
3705
+ if (i_34_ < 0 ) {
3706
+ i_41_ = -1 ;
3707
+ i_40_ = 103 ;
3708
+ i_42_ = -1 ;
3709
+ }
3710
+ int i_43_ = 104 ;
3711
+ int i_44_ = 0 ;
3712
+ int i_45_ = 1 ;
3713
+ if (i_35_ < 0 ) {
3714
+ i_44_ = 103 ;
3715
+ i_43_ = -1 ;
3716
+ i_45_ = -1 ;
3717
+ }
3718
+ for (int i_46_ = i_40_ ; i_41_ != i_46_ ; i_46_ += i_42_ ) {
3719
+ for (int i_47_ = i_44_ ; i_43_ != i_47_ ; i_47_ += i_45_ ) {
3720
+ int i_48_ = i_34_ + i_46_ ;
3721
+ int i_49_ = i_35_ + i_47_ ;
3722
+ for (int i_50_ = 0 ; i_50_ < 4 ; i_50_ ++) {
3723
+ if (i_48_ < 0 || i_49_ < 0 || i_48_ >= 104 || i_49_ >= 104 )
3724
+ groundItems [i_50_ ][i_46_ ][i_47_ ] = null ;
3725
+ else
3726
+ groundItems [i_50_ ][i_46_ ][i_47_ ] = groundItems [i_50_ ][i_48_ ][i_49_ ];
3727
+ }
3728
+ }
3729
+ }
3730
+ for (InteractiveObjectTemporary obj = (InteractiveObjectTemporary ) interactiveObjectTemporaryNodeCache .peekFirst (); obj != null ; obj = (InteractiveObjectTemporary ) interactiveObjectTemporaryNodeCache .pollFirst ()) {
3731
+ obj .y -= i_35_ ;
3732
+ obj .x -= i_34_ ;
3733
+ if (obj .x < 0 || obj .y < 0 || obj .x >= 104 || obj .y >= 104 )
3734
+ obj .unlink ();
3735
+ }
3736
+ anInt1985 = -1 ;
3737
+ if (destinationX != 0 ) {
3738
+ destinationX -= i_34_ ;
3739
+ Game .destinationY -= i_35_ ;
3740
+ }
3741
+ Player .cutsceneActive = false ;
3742
+ SoundSystem .reset ();
3743
+ spotAnimQueue .clear ();
3744
+ projectileQueue .clear ();
3745
+ }
3746
+ }
3660
3747
}
0 commit comments