Просмотр исходного кода

* version set to 0.62
* taking last stack from the heroes army should be impossible (or at least harder)

Michał W. Urbańczyk 17 лет назад
Родитель
Сommit
11e1b69bcd
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      CCallback.cpp
  2. 1 1
      CMT.cpp

+ 2 - 2
CCallback.cpp

@@ -558,7 +558,7 @@ const CCreatureSet* CCallback::getGarrison(const CGObjectInstance *obj)
 int CCallback::swapCreatures(const CGObjectInstance *s1, const CGObjectInstance *s2, int p1, int p2)
 {
 	CCreatureSet *S1 = const_cast<CCreatureSet*>(getGarrison(s1)), *S2 = const_cast<CCreatureSet*>(getGarrison(s2));
-	if (false)
+	if (((S1->slots[p1].second==val)&&(S1->slots.size()==2)) || (0/*we are not allowed*/)))
 	{
 		//TODO: check if we are allowed to swap these creatures
 		return -1;
@@ -645,7 +645,7 @@ int CCallback::splitStack(const CGObjectInstance *s1, const CGObjectInstance *s2
 	if(!val)
 		return -1;
 	CCreatureSet *S1 = const_cast<CCreatureSet*>(getGarrison(s1)), *S2 = const_cast<CCreatureSet*>(getGarrison(s2));
-	if ((S1->slots[p1].second<val) && (true /*we are allowed to*/))
+	if ((S1->slots[p1].second<val) || ((S1->slots[p1].second==val)&&(S1->slots.size()==2)) || (0/*we are not allowed*/))
 	{
 		return -1;
 	}

+ 1 - 1
CMT.cpp

@@ -62,7 +62,7 @@
 CGameInfo* CGI;
 #endif
 #define CHUNK 16384
-const char * NAME = "VCMI 0.61";
+const char * NAME = "VCMI 0.62";
 
 SDL_Color playerColorPalette[256]; //palette to make interface colors good