public static bool IsVisiable(AActor actor) { var localMesh = Main.localPawn.Mesh(); var targetMesh = actor.Mesh(); var localRenderTime = localMesh.LastRenderTimeOnScreen; var targetRenderTime = targetMesh.LastRenderTimeOnScreen; bool visiable1 = false, visiable = false; if (localRenderTime == targetRenderTime) { visiable1 = true; } if ((targetMesh.bRecentlyRendered & 0x4) > 0) { visiable = true; } return(visiable == true && visiable1 == true); }