fix line-of-sight behavior

Hi, this fixes the line-of-sight behavior that broke in ea1707a2e6dfd11b6e439a9417ac49eb981fc03d.