- Fixed a freeze in the Tag Range plug-in when using the "relative" and "skip used tags" options. Fixes #125.

This commit is contained in:
biwa 2019-04-20 13:22:35 +02:00
parent 36361de889
commit fbf4b259d6

View file

@ -102,10 +102,12 @@ namespace CodeImp.DoomBuilder.TagRange
//mxd. Get relative tag range //mxd. Get relative tag range
if(relative) if(relative)
{ {
int addtag = 0; // biwa
// Go for the number of tags we need // Go for the number of tags we need
for(int i = 0; i < selectioncount; i++) for(int i = 0; i < selectioncount; i++)
{ {
int newtag = initialtags[i] + starttag; int newtag = initialtags[i] + starttag + addtag;
if(newtag > General.Map.FormatInterface.MaxTag || newtag < General.Map.FormatInterface.MinTag) if(newtag > General.Map.FormatInterface.MaxTag || newtag < General.Map.FormatInterface.MinTag)
{ {
@ -124,7 +126,8 @@ namespace CodeImp.DoomBuilder.TagRange
return newtags; return newtags;
} }
starttag += increment; //mxd newtag += increment; //mxd // biwa
addtag += increment; // biwa
} }
} }
else else
@ -133,7 +136,7 @@ namespace CodeImp.DoomBuilder.TagRange
} }
newtags.Add(newtag); newtags.Add(newtag);
starttag += increment; addtag += increment;
} }
} }
else //mxd. Get absolute tag range else //mxd. Get absolute tag range