mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-02 09:12:54 +00:00
reworked Tag_FindLineSpecial()
This commit is contained in:
parent
2d9b0e4906
commit
f9b1acb813
1 changed files with 11 additions and 7 deletions
|
@ -114,16 +114,20 @@ INT32 Tag_Iterate_Things (const INT16 tag, const size_t p)
|
||||||
|
|
||||||
INT32 Tag_FindLineSpecial(const INT16 special, const INT16 tag)
|
INT32 Tag_FindLineSpecial(const INT16 special, const INT16 tag)
|
||||||
{
|
{
|
||||||
TAG_ITER_C
|
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
TAG_ITER_LINES(tag, i)
|
if (tag == -1)
|
||||||
{
|
{
|
||||||
if (i == -1)
|
for (i = 0; i < numlines; i++)
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (lines[i].special == special)
|
if (lines[i].special == special)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
else if (tags_lines[tag])
|
||||||
|
{
|
||||||
|
taggroup_t *tagged = tags_lines[tag];
|
||||||
|
for (i = 0; i < tagged->count; i++)
|
||||||
|
if (lines[tagged->elements[i]].special == special)
|
||||||
|
return tagged->elements[i];
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue