native changes for MovingObjects and TractionRopes

This commit is contained in:
2024-09-06 16:57:05 -04:00
parent 72a5edfc64
commit 24d319a836
2 changed files with 3 additions and 0 deletions

View File

@@ -271,6 +271,7 @@ function MovingObjects:RotateRelayCogs3()
self.Controller_End:Play() self.Controller_End:Play()
end end
@native
function MovingObjects:RotateRotodials(Elevator_Y_Velocity) function MovingObjects:RotateRotodials(Elevator_Y_Velocity)
local rad = math.rad(Elevator_Y_Velocity/MovingObjects.RotateRotodialsSensitivity) local rad = math.rad(Elevator_Y_Velocity/MovingObjects.RotateRotodialsSensitivity)
for n: number = 1, #self.Rotodials do for n: number = 1, #self.Rotodials do
@@ -278,6 +279,7 @@ function MovingObjects:RotateRotodials(Elevator_Y_Velocity)
end end
end end
@native
function MovingObjects:RotatePulleyWheel(TravelingUpwards, Elevator_Y_Velocity) function MovingObjects:RotatePulleyWheel(TravelingUpwards, Elevator_Y_Velocity)
self.PulleyWheel.CFrame*=CFrame.Angles(math.rad((TravelingUpwards and -Elevator_Y_Velocity or Elevator_Y_Velocity)/MovingObjects.PulleyWheelRotationSensitivity),0,0) self.PulleyWheel.CFrame*=CFrame.Angles(math.rad((TravelingUpwards and -Elevator_Y_Velocity or Elevator_Y_Velocity)/MovingObjects.PulleyWheelRotationSensitivity),0,0)
end end

View File

@@ -45,6 +45,7 @@ function TractionRopes.constructor(CabRopesObject, PulleyRopesObject)
}, TractionRopes) }, TractionRopes)
end end
@native
function TractionRopes:Update() function TractionRopes:Update()
local StudLength = (self.PulleyRopesObject.Position-self.CabRopesObject.Position).Magnitude+1 local StudLength = (self.PulleyRopesObject.Position-self.CabRopesObject.Position).Magnitude+1
for n: number = 1, #self.PulleyCables do for n: number = 1, #self.PulleyCables do