Sign in to follow this  

CanEntitySeePoint always fails for non-player entities


Tykvesh
  • Fixed

So this functions always returns false if the passed entity has no "inkable" component.

simutil.lua:323
function CanEntitySeePoint(inst, x, y, z)
    return inst ~= nil
        and inst:IsValid()
        and (inst.components.inkable and not inst.components.inkable.inked) --"should be: and (inst.components.inkable == nil or not inst.components.inkable.inked)"
        and (TheSim:GetLightAtPoint(x, y, z) > TUNING.DARK_CUTOFF or
            _CanEntitySeeInDark(inst))
        and (_GetEntitySandstormLevel(inst) < TUNING.SANDSTORM_FULL_LEVEL or
            _CanEntitySeeInStorm(inst) or
            inst:GetDistanceSqToPoint(x, y, z) < TUNING.SANDSTORM_VISION_RANGE_SQ)
end

 


Steps to Reproduce
print(CanEntitySeePoint(c_spawn("butterfly"), 0, 0, 0))

Status: Fixed

This issue has been fixed in either a future version or updated in a previous version.


  • Like 1
  Report Bug
Sign in to follow this  


User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
....


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now