inWater
Definition
-- @/=[C]:-1
function inWater(...)
Callers
@/lua/vehicle/bdebugImpl.lua
if partsSelected[node.partPath or v.config.partsTree.partPath] then
local inWater = obj:inWater(node.cid)
if inWater then
@/lua/vehicle/powertrain/combustionEngine.lua
for _, n in ipairs(device.waterDamageNodes) do
isFlooding = isFlooding and obj:inWater(n)
if not isFlooding then
@/lua/vehicle/powertrain/combustionEngineThermals.lua
local exhaustVisualEndFuel = n.afterFireVisualCoef * maxFuel
local exhaustNodeInWater = obj:inWater(n.finish)
if (exhaustVisualEndFuel > 0 or exhaustAudioEndFuel > 0) and not exhaustNodeInWater then
for _, v in pairs(nodes.engine) do
underWaterBlockCoolingCoef = underWaterBlockCoolingCoef + (obj:inWater(v) and 1000 or 0)
end
for _, v in pairs(nodes.engine) do
underWaterBlockCoolingCoef = underWaterBlockCoolingCoef + (obj:inWater(v) and 100 or 0)
end
@/lua/vehicle/sounds.lua
local isRubberTire = mat2 == 4 and wd.hasTire -- if the tire is rubber
local maxContactBase = obj:inWater(wd.node1) and math.huge or 0
local maxContact = maxContactBase
@/lua/vehicle/fire.lua
-- Steam Handling --
local underWater = obj:inWater(mycid) and 1 or 0
currentNode.lastUnderWaterValue = underWater
@/lua/vehicle/wheels.lua
if wd.enableBrakeThermals then
local isUnderWater = 1 + (obj:inWater(wd.node1) and wd.underwaterSurfaceCoolingCoef or 0)
local isRotatingBrakeCouple = wd.obj:isRotatingBrakeCouple() --0,1 coef based on instability detection of the wheel AV inside the core
@/lua/vehicle/controller/playerController.lua
for nodeCid, _ in pairs(ballNodes) do
isTouchingWater = isTouchingWater or obj:inWater(nodeCid)
isTouchingGround = isTouchingGround or obj:isNodeColliding(nodeCid)