1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-04 00:52:33 +00:00

Merge pull request #569 from fixinit75/dev

#568, #551
This commit is contained in:
Ilya Krasnow
2025-12-05 16:58:51 +03:00
committed by GitHub
4 changed files with 10 additions and 10 deletions

View File

@@ -572,7 +572,7 @@ function ENT:Think()
-- These corrections are required to beat source engine friction at very low values of motor power -- These corrections are required to beat source engine friction at very low values of motor power
local P = math.max(0,0.04449 + 1.06879*math.abs(A) - 0.465729*A^2) local P = math.max(0,0.04449 + 1.06879*math.abs(A) - 0.465729*A^2)
if math.abs(A) > 0.4 then P = math.abs(A) end if math.abs(A) > 0.4 then P = math.abs(A) end
--if math.abs(A) < 0.05 then P = 0 end if math.abs(A) < 0.05 then P = 0 end
if self.Speed < 10 and A > 0 then P = P*(1.0 + 2.5*(10.0-self.Speed)/10.0) end if self.Speed < 10 and A > 0 then P = P*(1.0 + 2.5*(10.0-self.Speed)/10.0) end
self.RearBogey.MotorPower = P*0.5*((A > 0) and 1 or -1) self.RearBogey.MotorPower = P*0.5*((A > 0) and 1 or -1)
self.FrontBogey.MotorPower = P*0.5*((A > 0) and 1 or -1) self.FrontBogey.MotorPower = P*0.5*((A > 0) and 1 or -1)

View File

@@ -336,7 +336,7 @@ function ENT:Think()
-- These corrections are required to beat source engine friction at very low values of motor power -- These corrections are required to beat source engine friction at very low values of motor power
local P = math.max(0,0.04449 + 1.06879*math.abs(A) - 0.465729*A^2) local P = math.max(0,0.04449 + 1.06879*math.abs(A) - 0.465729*A^2)
if math.abs(A) > 0.4 then P = math.abs(A) end if math.abs(A) > 0.4 then P = math.abs(A) end
--if math.abs(A) < 0.05 then P = 0 end if math.abs(A) < 0.05 then P = 0 end
if self.Speed < 10 and A > 0 then P = P*(1.0 + 2.5*(10.0-self.Speed)/10.0) end if self.Speed < 10 and A > 0 then P = P*(1.0 + 2.5*(10.0-self.Speed)/10.0) end
self.RearBogey.MotorPower = P*0.5*((A > 0) and 1 or -1) self.RearBogey.MotorPower = P*0.5*((A > 0) and 1 or -1)
self.FrontBogey.MotorPower = P*0.5*((A > 0) and 1 or -1) self.FrontBogey.MotorPower = P*0.5*((A > 0) and 1 or -1)

View File

@@ -49,13 +49,13 @@ function ENT:Initialize()
if Metrostroi.BogeyOldMap then if Metrostroi.BogeyOldMap then
self.FrontBogey = self:CreateBogey(Vector( 317-5,0,-89),Angle(0,180,0),true,"717") self.FrontBogey = self:CreateBogey(Vector( 317-5,0,-89),Angle(0,180,0),true,"717")
self.RearBogey = self:CreateBogey(Vector(-317+0,0,-89),Angle(0,0,0),false,"717") self.RearBogey = self:CreateBogey(Vector(-317+0,0,-89),Angle(0,0,0),false,"717")
self.FrontCouple = self:CreateCouple(Vector( 419.5,0,-75),Angle(0,0,0),true,"702") self.FrontCouple = self:CreateCouple(Vector( 419.5+3.5,0,-75),Angle(0,0,0),true,"702")
self.RearCouple = self:CreateCouple(Vector(-421.5,0,-75),Angle(0,180,0),false,"702") self.RearCouple = self:CreateCouple(Vector(-421.5-3.5,0,-75),Angle(0,180,0),false,"702")
else else
self.FrontBogey = self:CreateBogey(Vector( 317-11,1.0,-85),Angle(0,180,0),true,"717") self.FrontBogey = self:CreateBogey(Vector( 317-11,1.0,-85),Angle(0,180,0),true,"717")
self.RearBogey = self:CreateBogey(Vector(-317+0,1.3,-85),Angle(0,0,0),false,"717") self.RearBogey = self:CreateBogey(Vector(-317+0,1.3,-85),Angle(0,0,0),false,"717")
self.FrontCouple = self:CreateCouple(Vector( 421-4-3.6-2,1.0,-72),Angle(0,0,0),true,"702") self.FrontCouple = self:CreateCouple(Vector( 421-4-3.6+4.5,1.0,-72),Angle(0,0,0),true,"702")
self.RearCouple = self:CreateCouple(Vector(-421+2+3.6,1.3,-72),Angle(0,180,0),false,"702") self.RearCouple = self:CreateCouple(Vector(-421+2+3.6-4.5,1.3,-72),Angle(0,180,0),false,"702")
end end
self.FrontBogey:SetNWInt("MotorSoundType",0) self.FrontBogey:SetNWInt("MotorSoundType",0)
self.RearBogey:SetNWInt("MotorSoundType",0) self.RearBogey:SetNWInt("MotorSoundType",0)

View File

@@ -53,13 +53,13 @@ function ENT:Initialize()
if Metrostroi.BogeyOldMap then if Metrostroi.BogeyOldMap then
self.FrontBogey = self:CreateBogey(Vector( 317-5,0,-89),Angle(0,180,0),true,"717") self.FrontBogey = self:CreateBogey(Vector( 317-5,0,-89),Angle(0,180,0),true,"717")
self.RearBogey = self:CreateBogey(Vector(-317+0,0,-89),Angle(0,0,0),false,"717") self.RearBogey = self:CreateBogey(Vector(-317+0,0,-89),Angle(0,0,0),false,"717")
self.FrontCouple = self:CreateCouple(Vector( 419.5,0,-75),Angle(0,0,0),true,"702") self.FrontCouple = self:CreateCouple(Vector( 419.5+3.5,0,-75),Angle(0,0,0),true,"702")
self.RearCouple = self:CreateCouple(Vector(-421.5,0,-75),Angle(0,180,0),false,"702") self.RearCouple = self:CreateCouple(Vector(-421.5-3.5,0,-75),Angle(0,180,0),false,"702")
else else
self.FrontBogey = self:CreateBogey(Vector( 317-11,1.0,-85),Angle(0,180,0),true,"717") self.FrontBogey = self:CreateBogey(Vector( 317-11,1.0,-85),Angle(0,180,0),true,"717")
self.RearBogey = self:CreateBogey(Vector(-317+0,1.3,-85),Angle(0,0,0),false,"717") self.RearBogey = self:CreateBogey(Vector(-317+0,1.3,-85),Angle(0,0,0),false,"717")
self.FrontCouple = self:CreateCouple(Vector( 421-4-3.6-2,1.0,-72),Angle(0,0,0),true,"702") self.FrontCouple = self:CreateCouple(Vector( 421-4-3.6+4.5,1.0,-72),Angle(0,0,0),true,"702")
self.RearCouple = self:CreateCouple(Vector(-421+2+3.6,1.3,-72),Angle(0,180,0),false,"702") self.RearCouple = self:CreateCouple(Vector(-421+2+3.6-4.5,1.3,-72),Angle(0,180,0),false,"702")
end end
self.FrontBogey:SetNWInt("MotorSoundType",0) self.FrontBogey:SetNWInt("MotorSoundType",0)
self.RearBogey:SetNWInt("MotorSoundType",0) self.RearBogey:SetNWInt("MotorSoundType",0)