Prevent Keyconf from adding duplicate playerclass

This commit is contained in:
Ed the Bat 2022-08-16 20:59:17 -04:00 committed by Christoph Oelckers
parent 513d8cea8d
commit 88674b5ea0

View file

@ -282,6 +282,16 @@ CCMD(addplayerclass)
newclass.Type = ti;
newclass.Flags = 0;
// If this class was already added, don't add it again
for(unsigned i = 0; i < PlayerClasses.Size(); i++)
{
if(PlayerClasses[i].Type == ti)
{
return;
}
}
int arg = 2;
while (arg < argv.argc())