Moved Actor TID selector out of header
This commit is contained in:
parent
f5ceaafbbc
commit
de8d839885
2 changed files with 19 additions and 17 deletions
|
|
@ -2400,6 +2400,24 @@ void FLevelLocals::ApplyCompatibility2()
|
|||
i_compatflags2 = GetCompatibility2(compatflags2) | ii_compatflags2;
|
||||
}
|
||||
|
||||
AActor* FLevelLocals::SelectActorFromTID(int tid, size_t index, AActor* defactor)
|
||||
{
|
||||
if (tid == 0)
|
||||
return defactor;
|
||||
|
||||
AActor* actor = nullptr;
|
||||
size_t cur = 0u;
|
||||
auto it = GetActorIterator(tid);
|
||||
while ((actor = it.Next()) != nullptr)
|
||||
{
|
||||
if (cur == index)
|
||||
return actor;
|
||||
++cur;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
// IsPointInMap
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue