UPDATE
This commit is contained in:
parent
aa596db8b7
commit
97403a249a
@ -9,7 +9,7 @@ local Vehicle, POWERTRAIN_COMPONENT = unpack(require('/koptilnya/engine_remaster
|
|||||||
local WheelConfig = {
|
local WheelConfig = {
|
||||||
BrakePower = 800,
|
BrakePower = 800,
|
||||||
CustomWheel = {},
|
CustomWheel = {},
|
||||||
Offset = 90,
|
Offset = 180,
|
||||||
Model = 'models/sprops/trans/wheel_d/t_wheel25.mdl'
|
Model = 'models/sprops/trans/wheel_d/t_wheel25.mdl'
|
||||||
}
|
}
|
||||||
local FrontWheelsConfig = table.merge(table.copy(WheelConfig), { SteerLock = 10 })
|
local FrontWheelsConfig = table.merge(table.copy(WheelConfig), { SteerLock = 10 })
|
||||||
|
|||||||
@ -32,7 +32,7 @@ function Wheel:initialize(vehicle, name, config)
|
|||||||
|
|
||||||
self.entity = config.Entity or NULL_ENTITY
|
self.entity = config.Entity or NULL_ENTITY
|
||||||
|
|
||||||
self.holo = self:createHolo(self.entity, config.Model or 'models/sprops/trans/wheel_b/t_wheel15.mdl', self.offset)
|
self.holo = self:createHolo(self.entity)
|
||||||
|
|
||||||
self.customWheel = CustomWheel:new(config.CustomWheel)
|
self.customWheel = CustomWheel:new(config.CustomWheel)
|
||||||
|
|
||||||
@ -62,14 +62,16 @@ function Wheel:getEntityRadius()
|
|||||||
return self.entity:getModelRadius() * UNITS_TO_METERS
|
return self.entity:getModelRadius() * UNITS_TO_METERS
|
||||||
end
|
end
|
||||||
|
|
||||||
function Wheel:createHolo(entity, model, offset)
|
function Wheel:createHolo(entity)
|
||||||
if not isValid(entity) then
|
if not isValid(entity) then
|
||||||
return NULL_ENTITY
|
return NULL_ENTITY
|
||||||
end
|
end
|
||||||
|
|
||||||
print(model)
|
local holo = holograms.create(
|
||||||
|
entity:getPos(),
|
||||||
local holo = holograms.create(entity:getPos(), entity:getAngles() + Angle(0, offset, 0), model)
|
entity:getAngles() + Angle(0, self.offset, 0),
|
||||||
|
self.CONFIG.Model or 'models/sprops/trans/wheel_b/t_wheel15.mdl'
|
||||||
|
)
|
||||||
holo:setParent(entity)
|
holo:setParent(entity)
|
||||||
|
|
||||||
entity:setColor(Color(0,0,0,0))
|
entity:setColor(Color(0,0,0,0))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user