Add loadout group check for role proto (#28731)

MFW same bug twice at 2 layers because I'm stupid.
This commit is contained in:
metalgearsloth 2024-06-08 20:03:54 +10:00 committed by null
parent e787d02b73
commit 0da82f6d47
No known key found for this signature in database
GPG Key ID: 212F05528FD678BE
1 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,13 @@ public sealed partial class RoleLoadout : IEquatable<RoleLoadout>
foreach (var (group, groupLoadouts) in SelectedLoadouts)
{
// Check the group is even valid for this role.
if (!roleProto.Groups.Contains(group))
{
groupRemove.Add(group);
continue;
}
// Dump if Group doesn't exist
if (!protoManager.TryIndex(group, out var groupProto))
{