update
This commit is contained in:
parent
138d91b9f9
commit
9b50dbe33d
@ -119,14 +119,14 @@ function Engine:forwardStep(torque, inertia)
|
|||||||
self.angularVelocity = self.angularVelocity + finalTorque / inertiaSum * TICK_INTERVAL
|
self.angularVelocity = self.angularVelocity + finalTorque / inertiaSum * TICK_INTERVAL
|
||||||
self.angularVelocity = math.max(self.angularVelocity, 0)
|
self.angularVelocity = math.max(self.angularVelocity, 0)
|
||||||
|
|
||||||
net.start("ENGINE_RPM")
|
-- net.start("ENGINE_RPM")
|
||||||
net.writeFloat(self:getRPM() / self.maxRPM)
|
-- net.writeFloat(self:getRPM() / self.maxRPM)
|
||||||
net.send(self.vehicle.playersConnectedToHUD, true)
|
-- net.send(self.vehicle.playersConnectedToHUD, true)
|
||||||
|
|
||||||
net.start("ENGINE_FULLRPM")
|
-- net.start("ENGINE_FULLRPM")
|
||||||
net.writeUInt(self:getRPM(), 16)
|
-- net.writeUInt(self:getRPM(), 16)
|
||||||
net.writeFloat(self.masterThrottle)
|
-- net.writeFloat(self.masterThrottle)
|
||||||
net.send(nil, true)
|
-- net.send(nil, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
return Engine
|
return Engine
|
||||||
|
|||||||
@ -91,7 +91,7 @@ function PowertrainComponent:updateWireOutputs()
|
|||||||
WireComponent.updateWireOutputs(self)
|
WireComponent.updateWireOutputs(self)
|
||||||
|
|
||||||
if self.DEBUG then
|
if self.DEBUG then
|
||||||
-- self:DEBUG_SEND_DATA_DEBOUNCED()
|
self:DEBUG_SEND_DATA_DEBOUNCED()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ function Sound:initialize(redline, parent, sounds)
|
|||||||
[8500] = "https://raw.githubusercontent.com/koptilnya/gmod-data/main/engine_sounds/bmw_s54/ext_e30s54_on_8500.ogg"
|
[8500] = "https://raw.githubusercontent.com/koptilnya/gmod-data/main/engine_sounds/bmw_s54/ext_e30s54_on_8500.ogg"
|
||||||
}
|
}
|
||||||
local redline = redline or 7000
|
local redline = redline or 7000
|
||||||
self.active = true
|
self.active = false
|
||||||
local soundObjects = {}
|
local soundObjects = {}
|
||||||
local soundRpms = {}
|
local soundRpms = {}
|
||||||
local maxValue = 0
|
local maxValue = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user