fix crash on used but unassigned slots during config slot sorting

maybe we should have a warning for such entities...
This commit is contained in:
ac-stef
2016-08-29 13:44:58 +02:00
parent 15c4bbe84f
commit 867d522879
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ void sortmapmodelslots(char **args, int numargs)
tempslots.last().oldslot.add(i);
tempslots.last().used = false;
}
loopv(ents) if(ents[i].type == MAPMODEL) tempslots[ents[i].attr2].used = true;
loopv(ents) if(ents[i].type == MAPMODEL && tempslots.inrange(ents[i].attr2)) tempslots[ents[i].attr2].used = true;
tempslots.sort(tempmmsort);
// remove double entries