mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-02 13:51:52 +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
|
@ -283,6 +283,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