Skip to content

Commit

Permalink
Reattach hardAttached objects when we add the vehicle back to physics
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnwop committed Oct 31, 2017
1 parent 933b450 commit e2c01ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions specializations/HoseSystemUtil.lua
Expand Up @@ -187,6 +187,14 @@ function HoseSystemUtil:addToPhysicsRecursively(vehicle)
-- Set firstTimeRun to prevent the wheel shape not found warning!
vehicle.firstTimeRun = false

if #vehicle.attachedImplements > 0 then
for _, implement in pairs(vehicle.attachedImplements) do
if implement.object.isHardAttached then
vehicle:hardAttachImplement(implement)
end
end
end

HoseSystemUtil:addToPhysicsRecursively(vehicle.attacherVehicle)
end
end
Expand Down

0 comments on commit e2c01ed

Please sign in to comment.