Move check for valid model to actor display instead of identifier list.

This commit is contained in:
Ottermandias 2025-02-19 23:36:52 +01:00
parent e5b2114ac2
commit 9e7679e70f
3 changed files with 6 additions and 5 deletions

View file

@ -91,9 +91,10 @@ public class ActorSelector(ObjectManager objects, ActorManager actors, Ephemeral
objects.Update();
_world = new WorldId(objects.Player.Valid ? objects.Player.HomeWorld : (ushort)0);
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, _defaultItemSpacing);
var skips = ImGuiClip.GetNecessarySkips(ImGui.GetTextLineHeight());
var remainder = ImGuiClip.FilteredClippedDraw(objects.Identifiers, skips, CheckFilter, DrawSelectable);
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, _defaultItemSpacing);
var skips = ImGuiClip.GetNecessarySkips(ImGui.GetTextLineHeight());
var remainder = ImGuiClip.FilteredClippedDraw(objects.Identifiers.Where(p => p.Value.Objects.Any(a => a.Model)), skips, CheckFilter,
DrawSelectable);
ImGuiClip.DrawEndDummy(remainder, ImGui.GetTextLineHeight());
}

View file

@ -83,7 +83,7 @@ public class ObjectManager(
private void HandleIdentifier(ActorIdentifier identifier, Actor character)
{
if (!character.Model || !identifier.IsValid)
if (!identifier.IsValid)
return;
if (!_identifiers.TryGetValue(identifier, out var data))

@ -1 +1 @@
Subproject commit 332852ffa81387b59f260781d7e5c967f24d8be2
Subproject commit 06422a893348a18a013e6dbc558370db8d21a446