Explorar o código

Fixed Clone links cleanup.

AlexVinS %!s(int64=9) %!d(string=hai) anos
pai
achega
44753866ec
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      lib/NetPacksLib.cpp

+ 7 - 0
lib/NetPacksLib.cpp

@@ -1712,6 +1712,13 @@ DLL_LINKAGE void BattleStacksRemoved::applyGs( CGameState *gs )
 					toRemove->cloneID = -1;
 				}
 
+				//cleanup remaining clone links if any
+				for(CStack * s : gs->curB->stacks)
+				{
+					if(s->cloneID == toRemove->ID)
+						s->cloneID = -1;
+				}
+
 				break;
 			}
 		}