mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
Prevent Keyconf from adding duplicate playerclass
This commit is contained in:
parent
513d8cea8d
commit
88674b5ea0
1 changed files with 10 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue