Исправляет краш сервера при двойной выдаче генокрада. (#574)

This commit is contained in:
Rinary 2024-10-30 19:26:37 +02:00 committed by GitHub
parent e5ef1df427
commit c79517ba71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,7 +58,8 @@ public sealed partial class ChangelingRuleSystem : GameRuleSystem<ChangelingRule
_antag.SendBriefing(target, briefing, Color.Yellow, BriefingSound);
_role.MindHasRole<ChangelingRoleComponent>(mindId, out var changelingRole);
if (changelingRole is not null)
_role.MindHasRole<RoleBriefingComponent>(mindId, out var briefingComp);
if (changelingRole is not null && briefingComp is null)
{
AddComp<RoleBriefingComponent>(changelingRole.Value.Owner);
Comp<RoleBriefingComponent>(changelingRole.Value.Owner).Briefing = briefing;