Пример #1
0
        private void AddVehicleWheels(VehicleEntity vehicle)
        {
            int  wheelCount        = GetWheelCount(vehicle);
            bool serverAuthorative = SharedConfig.ServerAuthorative;

            if (wheelCount >= 1)
            {
                if (!vehicle.hasCarFirstRewnWheel)
                {
                    vehicle.AddCarFirstRewnWheel(serverAuthorative);
                }
            }

            if (wheelCount >= 2)
            {
                if (!vehicle.hasCarSecondRewnWheel)
                {
                    vehicle.AddCarSecondRewnWheel(serverAuthorative);
                }
            }

            if (wheelCount >= 3)
            {
                if (!vehicle.hasCarThirdRewnWheel)
                {
                    vehicle.AddCarThirdRewnWheel(serverAuthorative);
                }
            }

            if (wheelCount >= 4)
            {
                if (!vehicle.hasCarFourthRewnWheel)
                {
                    vehicle.AddCarFourthRewnWheel(serverAuthorative);
                }
            }
        }