only add emag component if the event was handled (#14627)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-03-16 02:19:08 +00:00
committed by GitHub
parent 3b5354c2f2
commit e0cfc42360

View File

@@ -164,7 +164,7 @@ namespace Content.Shared.Emag.Systems
var emaggedEvent = new GotEmaggedEvent(user);
RaiseLocalEvent(target, ref emaggedEvent);
if (!emaggedEvent.Repeatable)
if (emaggedEvent.Handled && !emaggedEvent.Repeatable)
EnsureComp<EmaggedComponent>(target);
return emaggedEvent.Handled;
}