mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-03 09:42:45 +00:00
Do not add -1 to the global taglists.
This commit is contained in:
parent
95c7690a40
commit
786e448f16
1 changed files with 10 additions and 0 deletions
|
@ -25,6 +25,10 @@ boolean Tag_Compare (const taglist_t* list1, const taglist_t* list2)
|
||||||
void Taglist_AddToSectors (const size_t tag, const size_t itemid)
|
void Taglist_AddToSectors (const size_t tag, const size_t itemid)
|
||||||
{
|
{
|
||||||
taggroup_t* tagelems;
|
taggroup_t* tagelems;
|
||||||
|
|
||||||
|
if (tag == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!tags_sectors[tag])
|
if (!tags_sectors[tag])
|
||||||
tags_sectors[tag] = Z_Calloc(sizeof(taggroup_t), PU_LEVEL, NULL);
|
tags_sectors[tag] = Z_Calloc(sizeof(taggroup_t), PU_LEVEL, NULL);
|
||||||
|
|
||||||
|
@ -40,6 +44,9 @@ void Taglist_AddToLines (const size_t tag, const size_t itemid)
|
||||||
if (!tags_lines[tag])
|
if (!tags_lines[tag])
|
||||||
tags_lines[tag] = Z_Calloc(sizeof(taggroup_t), PU_LEVEL, NULL);
|
tags_lines[tag] = Z_Calloc(sizeof(taggroup_t), PU_LEVEL, NULL);
|
||||||
|
|
||||||
|
if (tag == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
tagelems = tags_lines[tag];
|
tagelems = tags_lines[tag];
|
||||||
tagelems->count++;
|
tagelems->count++;
|
||||||
tagelems->elements = Z_Realloc(tagelems->elements, tagelems->count * sizeof(size_t), PU_LEVEL, NULL);
|
tagelems->elements = Z_Realloc(tagelems->elements, tagelems->count * sizeof(size_t), PU_LEVEL, NULL);
|
||||||
|
@ -52,6 +59,9 @@ void Taglist_AddToMapthings (const size_t tag, const size_t itemid)
|
||||||
if (!tags_mapthings[tag])
|
if (!tags_mapthings[tag])
|
||||||
tags_mapthings[tag] = Z_Calloc(sizeof(taggroup_t), PU_LEVEL, NULL);
|
tags_mapthings[tag] = Z_Calloc(sizeof(taggroup_t), PU_LEVEL, NULL);
|
||||||
|
|
||||||
|
if (tag == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
tagelems = tags_mapthings[tag];
|
tagelems = tags_mapthings[tag];
|
||||||
tagelems->count++;
|
tagelems->count++;
|
||||||
tagelems->elements = Z_Realloc(tagelems->elements, tagelems->count * sizeof(size_t), PU_LEVEL, NULL);
|
tagelems->elements = Z_Realloc(tagelems->elements, tagelems->count * sizeof(size_t), PU_LEVEL, NULL);
|
||||||
|
|
Loading…
Reference in a new issue