Raise hand (un)equipped events on container insert/remove (#15664)

This commit is contained in:
Menshin
2023-04-23 21:38:52 +02:00
committed by GitHub
parent 5272198729
commit c1ef48cee9
7 changed files with 56 additions and 33 deletions

View File

@@ -361,7 +361,7 @@ public abstract class SharedActionsSystem : EntitySystem
// for client-exclusive actions, the client shouldn't mark the comp as dirty. Otherwise that just leads to
// unnecessary prediction resetting and state handling.
if (dirty)
if (dirty && !action.ClientExclusive)
Dirty(comp);
}
@@ -380,12 +380,15 @@ public abstract class SharedActionsSystem : EntitySystem
{
comp ??= EnsureComp<ActionsComponent>(uid);
bool allClientExclusive = true;
foreach (var action in actions)
{
AddAction(uid, action, provider, comp, false);
allClientExclusive = allClientExclusive && action.ClientExclusive;
}
if (dirty)
if (dirty && !allClientExclusive)
Dirty(comp);
}