diff --git a/source/src/audiomanager.cpp b/source/src/audiomanager.cpp index e9f0c8af..7fe21a14 100644 --- a/source/src/audiomanager.cpp +++ b/source/src/audiomanager.cpp @@ -1009,7 +1009,7 @@ void sortmapsoundslots(char **args, int numargs) tempslots.last().oldslot.add(i); tempslots.last().used = false; } - loopv(ents) if(ents[i].type == SOUND) tempslots[ents[i].attr1 & 255].used = true; + loopv(ents) if(ents[i].type == SOUND && tempslots.inrange(ents[i].attr1)) tempslots[ents[i].attr1].used = true; tempslots.sort(tempmssort); // remove double entries diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 9a382125..9501777f 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -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