fix: properly detect visible characters
This commit is contained in:
parent
538b88c63f
commit
4c575d622a
|
@ -153,6 +153,8 @@ internal class Command : IDisposable {
|
|||
var path = Path.Join(this.Plugin.Config.SaveDirectory, fileName);
|
||||
path += $".{ext}";
|
||||
|
||||
path = Path.GetFullPath(path);
|
||||
|
||||
var parent = Path.Join(path, "..");
|
||||
Directory.CreateDirectory(parent);
|
||||
|
||||
|
|
|
@ -106,8 +106,8 @@ public class ScreenshotMetadata {
|
|||
}
|
||||
})
|
||||
.Select(chara => {
|
||||
var visible = plugin.GameGui.WorldToScreen(chara.Position, out var screenPos, out var inView);
|
||||
return (chara, screenPos, visible: visible && inView);
|
||||
var visible = plugin.GameGui.WorldToScreen(chara.Position, out var screenPos, out _);
|
||||
return (chara, screenPos, visible);
|
||||
})
|
||||
.Where(tuple => tuple.visible)
|
||||
.Select(tuple => new Character(tuple.chara, tuple.screenPos, scale, offsetX, offsetY))
|
||||
|
|
Loading…
Reference in New Issue