Diff of /gemrb/plugins/Core/Actor.cpp [dca68d] .. [7f4ce8]  Maximize  Restore

Switch to side-by-side view

--- a/gemrb/plugins/Core/Actor.cpp
+++ b/gemrb/plugins/Core/Actor.cpp
@@ -2680,7 +2680,8 @@
 		return;
 	}
 
-	SetStance(IE_ANI_ATTACK);
+	SetStance(AttackStance) ;
+
 	//last chance to disable attacking
 	//
 	attackcount = GetStat(IE_NUMBEROFATTACKS);
@@ -3480,9 +3481,10 @@
 		return true;
 	}
 	if (StanceID == IE_ANI_ATTACK || StanceID == IE_ANI_ATTACK_JAB ||
-		StanceID == IE_ANI_ATTACK_SLASH || StanceID == IE_ANI_ATTACK_BACKSLASH)
+		StanceID == IE_ANI_ATTACK_SLASH || StanceID == IE_ANI_ATTACK_BACKSLASH ||
+		StanceID == IE_ANI_SHOOT)
 	{
-		SetStance( IE_ANI_ATTACK );
+		SetStance( AttackStance );
 		return true;
 	}
 	return false;
@@ -3869,7 +3871,7 @@
 	}
 
 	if (!silent) {
-		ieByte stance = IE_ANI_ATTACK;
+		ieByte stance = AttackStance;
 		for (int i=0;i<animcount;i++) {
 			if ( strnicmp(item->ItemResRef, itemanim[i].itemname, 8) == 0) {
 				stance = itemanim[i].animation;
@@ -3953,6 +3955,13 @@
 	        //update the paperdoll weapon animation
         	core->SetEventFlag(EF_UPDATEANIM);
 	}
+	ITMExtHeader *header ;
+	GetWeapon(header, NULL) ;
+	if(header && header->AttackType == ITEM_AT_BOW) {
+		AttackStance = IE_ANI_SHOOT ;
+		return ;
+	}
+	AttackStance =  IE_ANI_ATTACK;
 }
 
 void Actor::SetUsedShield(const char* AnimationType, int wt)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks