void P_BuildLineTagLists(void) { int i; P_DestroyLineTagLists(); for(i = 0; i < numlines; ++i) { Line* line = P_ToPtr(DMU_LINE, i); xline_t* xline = P_ToXLine(line); #if !__JHEXEN__ if(xline->tag) { iterlist_t* list = P_GetLineIterListForTag(xline->tag, true); IterList_PushBack(list, line); } #else switch(xline->special) { default: break; case 121: ///< Line_SetIdentification. if(xline->arg1) { iterlist_t* list = P_GetLineIterListForTag((int) xline->arg1, true); IterList_PushBack(list, line); } xline->special = 0; break; } #endif } }
void P_BuildSectorTagLists() { P_DestroySectorTagLists(); for(int i = 0; i < numsectors; ++i) { Sector *sec = (Sector *)P_ToPtr(DMU_SECTOR, i); xsector_t *xsec = P_ToXSector(sec); if(xsec->tag) { iterlist_t *list = P_GetSectorIterListForTag(xsec->tag, true); IterList_PushBack(list, sec); } } }