Browse Source

* minor improvements

mateuszb 16 years ago
parent
commit
34ef79d15e
2 changed files with 3 additions and 2 deletions
  1. 3 1
      client/CBattleInterface.cpp
  2. 0 1
      client/CBattleInterface.h

+ 3 - 1
client/CBattleInterface.cpp

@@ -689,7 +689,7 @@ bool CBattleAttack::checkInitialConditions()
 }
 
 CBattleAttack::CBattleAttack(CBattleInterface * _owner, int _stackID)
-: CBattleStackAnimation(_owner, _stackID), hitCount(0), sh(-1)
+: CBattleStackAnimation(_owner, _stackID), sh(-1)
 {
 }
 
@@ -2608,6 +2608,8 @@ void CBattleInterface::showAliveStack(int ID, const std::map<int, CStack> & stac
 	int affectingSpeed = settings.animSpeed;
 	if(animType == 1 || animType == 2) //standing stacks should not stand faster :)
 		affectingSpeed = 2;
+	if(animType == 3 || animType == 11 || animType == 12 || animType == 13) //defend & attack should be slower
+		affectingSpeed = 1;
 	bool incrementFrame = (animCount%(4/affectingSpeed)==0) && animType!=5 && animType!=20 && animType!=2;
 
 	if(animType == 2)

+ 0 - 1
client/CBattleInterface.h

@@ -158,7 +158,6 @@ class CBattleAttack : public CBattleStackAnimation
 protected:
 	int IDby; //attacked stack
 	int dest; //atacked hex
-	int hitCount; //for delaying animation
 	bool reversing;
 	int posShiftDueToDist;
 	bool shooting;