Пример #1
0
        // Token: 0x060028E8 RID: 10472 RVA: 0x000F9798 File Offset: 0x000F7B98
        private void Update()
        {
            if (!Level.isLoaded)
            {
                return;
            }
            if (!Provider.isServer)
            {
                return;
            }
            bool flag = true;

            while (flag)
            {
                flag = this.updateObjects();
                ObjectRegion objectRegion = ObjectManager.regions[(int)ObjectManager.updateObjects_X, (int)ObjectManager.updateObjects_Y];
                objectRegion.updateObjectIndex += 1;
                if ((int)ObjectManager.regions[(int)ObjectManager.updateObjects_X, (int)ObjectManager.updateObjects_Y].updateObjectIndex >= LevelObjects.objects[(int)ObjectManager.updateObjects_X, (int)ObjectManager.updateObjects_Y].Count)
                {
                    ObjectManager.regions[(int)ObjectManager.updateObjects_X, (int)ObjectManager.updateObjects_Y].updateObjectIndex = 0;
                }
                ObjectManager.updateObjects_X += 1;
                if (ObjectManager.updateObjects_X >= Regions.WORLD_SIZE)
                {
                    ObjectManager.updateObjects_X  = 0;
                    ObjectManager.updateObjects_Y += 1;
                    if (ObjectManager.updateObjects_Y >= Regions.WORLD_SIZE)
                    {
                        ObjectManager.updateObjects_Y = 0;
                        flag = false;
                    }
                }
            }
        }
Пример #2
0
 public void tellObjectRubble(CSteamID steamID, byte x, byte y, ushort index, byte section, bool isAlive, Vector3 ragdoll)
 {
     if (base.channel.checkServer(steamID))
     {
         if (!Regions.checkSafe((int)x, (int)y))
         {
             return;
         }
         ObjectRegion objectRegion = ObjectManager.regions[(int)x, (int)y];
         if (!Provider.isServer && !objectRegion.isNetworked)
         {
             return;
         }
         if ((int)index >= LevelObjects.objects[(int)x, (int)y].Count)
         {
             return;
         }
         InteractableObjectRubble rubble = LevelObjects.objects[(int)x, (int)y][(int)index].rubble;
         if (rubble != null)
         {
             rubble.updateRubble(section, isAlive, true, ragdoll);
         }
     }
 }
Пример #3
0
 public void tellToggleObjectBinaryState(CSteamID steamID, byte x, byte y, ushort index, bool isUsed)
 {
     if (base.channel.checkServer(steamID))
     {
         if (!Regions.checkSafe((int)x, (int)y))
         {
             return;
         }
         ObjectRegion objectRegion = ObjectManager.regions[(int)x, (int)y];
         if (!Provider.isServer && !objectRegion.isNetworked)
         {
             return;
         }
         if ((int)index >= LevelObjects.objects[(int)x, (int)y].Count)
         {
             return;
         }
         InteractableObjectBinaryState interactableObjectBinaryState = LevelObjects.objects[(int)x, (int)y][(int)index].interactable as InteractableObjectBinaryState;
         if (interactableObjectBinaryState != null)
         {
             interactableObjectBinaryState.updateToggle(isUsed);
         }
     }
 }
Пример #4
0
 public void tellObjectResource(CSteamID steamID, byte x, byte y, ushort index, ushort amount)
 {
     if (base.channel.checkServer(steamID))
     {
         if (!Regions.checkSafe((int)x, (int)y))
         {
             return;
         }
         ObjectRegion objectRegion = ObjectManager.regions[(int)x, (int)y];
         if (!Provider.isServer && !objectRegion.isNetworked)
         {
             return;
         }
         if ((int)index >= LevelObjects.objects[(int)x, (int)y].Count)
         {
             return;
         }
         InteractableObjectResource interactableObjectResource = LevelObjects.objects[(int)x, (int)y][(int)index].interactable as InteractableObjectResource;
         if (interactableObjectResource != null)
         {
             interactableObjectResource.updateAmount(amount);
         }
     }
 }