Try to fix game hang caused by shelf linking.
Fixing an infinite loop caused by unchecked cache invalidation. Sometime when you link shelves, a storageGroup in cache will not null, but with no SpawnedMember. If unchecked, it will cause groupsOfPriorityCount to decrease by -1, which is a infinite loop. This fix will FixCache when a group have no member.
This commit is contained in:
@@ -291,6 +291,9 @@ public sealed class StoreUtilityPrepatches : ClassWithFishPrepatches
|
|||||||
if (storageGroup != null)
|
if (storageGroup != null)
|
||||||
{
|
{
|
||||||
otherGroupMembers = storageGroup.SpawnedMemberCount() - 1;
|
otherGroupMembers = storageGroup.SpawnedMemberCount() - 1;
|
||||||
|
if (otherGroupMembers < 0)
|
||||||
|
goto FixCache;
|
||||||
|
|
||||||
Debug.VerifyStorageGroup(otherGroupMembers, listInPriorityOrder, i, storageGroup);
|
Debug.VerifyStorageGroup(otherGroupMembers, listInPriorityOrder, i, storageGroup);
|
||||||
|
|
||||||
groupsOfPriorityCount -= otherGroupMembers;
|
groupsOfPriorityCount -= otherGroupMembers;
|
||||||
|
|||||||
Reference in New Issue
Block a user