This commit is contained in:
vis2k 2022-09-17 16:35:19 +08:00
parent 5c04b84108
commit fc0a40f802

View File

@ -69,7 +69,7 @@ internal static int FindPlayerLoopEntryIndex(PlayerLoopSystem.UpdateFunction fun
// recursively keep looking
if (playerLoop.subSystemList != null)
{
for(int i = 0; i < playerLoop.subSystemList.Length; ++i)
for (int i = 0; i < playerLoop.subSystemList.Length; ++i)
{
int index = FindPlayerLoopEntryIndex(function, playerLoop.subSystemList[i], playerLoopSystemType);
if (index != -1) return index;
@ -128,7 +128,6 @@ internal static bool AddToPlayerLoop(PlayerLoopSystem.UpdateFunction function, T
// shift to the right, write into first array element
Array.Copy(playerLoop.subSystemList, 0, playerLoop.subSystemList, 1, playerLoop.subSystemList.Length - 1);
playerLoop.subSystemList[0] = system;
}
// append our custom loop to the end
else if (addMode == AddMode.End)
@ -148,7 +147,7 @@ internal static bool AddToPlayerLoop(PlayerLoopSystem.UpdateFunction function, T
// recursively keep looking
if (playerLoop.subSystemList != null)
{
for(int i = 0; i < playerLoop.subSystemList.Length; ++i)
for (int i = 0; i < playerLoop.subSystemList.Length; ++i)
{
if (AddToPlayerLoop(function, ownerType, ref playerLoop.subSystemList[i], playerLoopSystemType, addMode))
return true;