EVENT_SoldierBeginBladeAttack: initialize attack data before other calculations, set bTargetLevel to soldier's level as melee attacks don't work between levels (by Shadooow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8967 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-04-23 07:02:35 +00:00
parent b8aac91b9e
commit 3b3476c379
+5 -5
View File
@@ -12751,6 +12751,11 @@ void SOLDIERTYPE::EVENT_SoldierBeginBladeAttack( INT32 sGridNo, UINT8 ubDirectio
usForceAnimState = INVALID_ANIMATION;
// CHANGE TO ANIMATION
// sevenfm: initialize attack data
this->sTargetGridNo = sGridNo;
this->bTargetLevel = this->pathing.bLevel; // melee attacks don't work between levels
this->ubTargetID = WhoIsThere2(sGridNo, this->bTargetLevel);
// DETERMINE ANIMATION TO PLAY
// LATER BASED ON IF TAREGT KNOWS OF US, STANCE, ETC
// GET POINTER TO TAREGT
@@ -12934,11 +12939,6 @@ void SOLDIERTYPE::EVENT_SoldierBeginBladeAttack( INT32 sGridNo, UINT8 ubDirectio
}
}
}
// SET TARGET GRIDNO
this->sTargetGridNo = sGridNo;
this->bTargetLevel = this->pathing.bLevel;
this->ubTargetID = WhoIsThere2( sGridNo, this->bTargetLevel );
}