Пример #1
0
            void Awake()
            {
                RustAI = GetComponent <NPCAI>();
                RustAI.ServerDestroy();
                RustMetabolism = GetComponent <NPCMetabolism>();
                Base           = GetComponent <BaseNPC>();

                lastTick    = Time.time;
                targetpoint = Vector3.zero;
                action      = Act.None;

                hungerLose  = RustMetabolism.calories.max * 2 / 12000;
                thristyLose = RustMetabolism.hydration.max * 3 / 12000;
                sleepLose   = RustMetabolism.sleep.max / 12000;

                inventory = new ItemContainer();
                inventory.ServerInitialize(null, 6);

                Base.enableSaving = false;
                BaseEntity.saveList.Remove(Base);
                Base.InitializeHealth(Base.health * HealthModificator, Base.MaxHealth() * HealthModificator);
                Base.locomotion.gallopSpeed  *= SpeedModificator;
                Base.locomotion.trotSpeed    *= SpeedModificator;
                Base.locomotion.acceleration *= SpeedModificator;
            }