Skip to content

Commit

Permalink
Allow offset on fillArm to be in range (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnwop committed Feb 13, 2018
1 parent d782813 commit 70d5669
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions specializations/HoseSystemFillTriggerInteractive.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function HoseSystemFillTriggerInteractive:update(dt)
raycast(x, y, z, gp.raycastNode, self, 1)

if self.object.lastRaycastDistance ~= 0 then
local isUnderFillplane, planeY = self.object.lastRaycastObject:checkPlaneY(y)
local isUnderFillplane, planeY = self.object.lastRaycastObject:checkPlaneY(y, { x, y, z })

if isUnderFillplane and HoseSystemFillTriggerInteractive:allowFillTypeAffectDirtMask(self.object.lastRaycastObject.fillType) then
-- Todo: make this direction based!
Expand Down Expand Up @@ -186,7 +186,7 @@ function HoseSystemFillTriggerInteractive:fillableObjectRaycastCallback(transfor
if vehicle:allowFillType(fillType) then
self.object.lastRaycastObject = vehicle
self.object.lastRaycastDistance = distance
print("found trailer")

return false
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ end
-- @param entry
--
function HoseSystemArmStrategy:load(xmlFile, key, entry)
-- entry.needsTransfer = Utils.getNoNil(getXMLBool(xmlFile, key .. '#needsTransfer'), false)
entry.offset = Utils.getNoNil(getXMLFloat(xmlFile, key .. '#offset'), 0)

self.object.supportedFillTypes = {}

local fillTypeCategories = getXMLString(xmlFile, key .. '#supportedFillTypeCategories')
Expand Down

0 comments on commit 70d5669

Please sign in to comment.