bool isVisible(Vec3 shootPos, Vec3 pos)
{
ray_hit tmpHit;
return !this->RayWorldIntersection(shootPos, pos - shootPos, 0x100 | 1, 0xA | 0x400, &tmpHit, 1);
}
bool isVisible(LEntity* pEntity, Vec3 from, Vec3 to, IPhysicalEntity** pSkipEnts = 0, int nSkipEnts = 0, int pierceability = 10)
{
ray_hit rayhit;
if (RayWorldIntersection(from, to - from, 0x100 | 1, 0x400 | pierceability, &rayhit, 1, pSkipEnts, nSkipEnts) > 0)
{
return SSystemGlobalEnvironment::Singleton()->GetIEntitySystem()->GetEntityFromPhysics(rayhit.pCollider) == pEntity;
}
return true;
}
};