mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fixed several line ID functions accessing the sector tag array.
This commit is contained in:
parent
bf0e74447d
commit
f6c3ce6b15
1 changed files with 5 additions and 5 deletions
|
@ -111,7 +111,7 @@ void FTagManager::RemoveLineIDs(int line)
|
||||||
{
|
{
|
||||||
while (allIDs[start].target == line)
|
while (allIDs[start].target == line)
|
||||||
{
|
{
|
||||||
allTags[start].tag = allTags[start].target = -1;
|
allIDs[start].tag = allIDs[start].target = -1;
|
||||||
start++;
|
start++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,12 +371,12 @@ int FTagManager::CountLineIDs(const line_t *line)
|
||||||
|
|
||||||
if (LineHasIDs(i))
|
if (LineHasIDs(i))
|
||||||
{
|
{
|
||||||
const int n = allTags.Size();
|
const int n = allIDs.Size();
|
||||||
|
|
||||||
int j = startForLine[i];
|
int j = startForLine[i];
|
||||||
int c = 0;
|
int c = 0;
|
||||||
|
|
||||||
while(j < n && allTags[j].target == i)
|
while(j < n && allIDs[j].target == i)
|
||||||
{
|
{
|
||||||
j++;
|
j++;
|
||||||
c++;
|
c++;
|
||||||
|
@ -394,11 +394,11 @@ int FTagManager::GetLineID(const line_t *line, int index)
|
||||||
|
|
||||||
if (LineHasIDs(i))
|
if (LineHasIDs(i))
|
||||||
{
|
{
|
||||||
const int n = allTags.Size();
|
const int n = allIDs.Size();
|
||||||
|
|
||||||
int j = startForLine[i] + index;
|
int j = startForLine[i] + index;
|
||||||
|
|
||||||
return (j < n && allTags[j].target == i) ? allTags[j].tag : 0;
|
return (j < n && allIDs[j].target == i) ? allIDs[j].tag : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue