Category: Code.
Summary: Stab or bash attack of the melee weapons does 25% less damage than it supposed to IF this attack is executed after playing purely horizontal light or heavy strike.
Description:
As it is known, purely horizontal melee strikes (attacks while moving left or right) do no more than 75% and not less than 50% damage than vertical strikes (while moving forward or backward).
However every stab or bash attack shares the same traits and depends of whatever kind of attack was executed prior to it: do forward strike and your next stab will be doing 100% of damage, do horizontal strike and your next stab will be doing only 75% of the damage.
The entire flow starting from StartFire if pretty complicated to figure but if got it right, KFMeleeHelperWeapon.uc: Process Hitbox Collision -> GetDamageScaleByAngle -> ProcessMeleeHit -> TakeDamage
During GetDamageScaleByAngle its goes through the list of CurrentAttackDir, picks matching damage multiplier and returns it. CurrentAttackDir updates in function BeginMeleeAttack and depends on NextAttackDir variable which is being processed at the very begining of the flow, in KFWeap_MeleeBase's function StartFire(byte FireModeNum)
simulated function StartFire(byte FireModeNum) // our FireModeNum is 3 which is Bash
{
if( FireModeNum == DEFAULT_FIREMODE || FireModeNum == HEAVY_ATK_FIREMODE ) // this does not happen
{
StartMeleeFire(FireModeNum, MeleeAttackHelper.ChooseAttackDir(), ATK_Normal);
return;
}
if( FireModeNum == BASH_FIREMODE && WeaponFireTypes[FireModeNum] == EWFT_None ) // i believe this doesn't happen either, pretty hard to figure exact meaning of this but for melee weapons WeaponFireTypes[FireModeNum] == EWFT_None is FALSE because WeaponFireTypes[BASH_FIREMODE] is rather = EWFT_Custom
{
StartMeleeFire(FireModeNum, MeleeAttackHelper.ChooseAttackDir(), ATK_Normal);
return;
}
Super.StartFire(FireModeNum);
}
Meaning that for Bash attack ChooseAttackDir() doesn't happen and game does not update NextAttackDir hence does not update CurrentAttackDir. CurrentAttackDir stays the same as it was assigned with during the last Light / Heavy attack.
Summary: Stab or bash attack of the melee weapons does 25% less damage than it supposed to IF this attack is executed after playing purely horizontal light or heavy strike.
Description:
As it is known, purely horizontal melee strikes (attacks while moving left or right) do no more than 75% and not less than 50% damage than vertical strikes (while moving forward or backward).
However every stab or bash attack shares the same traits and depends of whatever kind of attack was executed prior to it: do forward strike and your next stab will be doing 100% of damage, do horizontal strike and your next stab will be doing only 75% of the damage.
Spoiler!
The entire flow starting from StartFire if pretty complicated to figure but if got it right, KFMeleeHelperWeapon.uc: Process Hitbox Collision -> GetDamageScaleByAngle -> ProcessMeleeHit -> TakeDamage
During GetDamageScaleByAngle its goes through the list of CurrentAttackDir, picks matching damage multiplier and returns it. CurrentAttackDir updates in function BeginMeleeAttack and depends on NextAttackDir variable which is being processed at the very begining of the flow, in KFWeap_MeleeBase's function StartFire(byte FireModeNum)
Spoiler!
simulated function StartFire(byte FireModeNum) // our FireModeNum is 3 which is Bash
{
if( FireModeNum == DEFAULT_FIREMODE || FireModeNum == HEAVY_ATK_FIREMODE ) // this does not happen
{
StartMeleeFire(FireModeNum, MeleeAttackHelper.ChooseAttackDir(), ATK_Normal);
return;
}
if( FireModeNum == BASH_FIREMODE && WeaponFireTypes[FireModeNum] == EWFT_None ) // i believe this doesn't happen either, pretty hard to figure exact meaning of this but for melee weapons WeaponFireTypes[FireModeNum] == EWFT_None is FALSE because WeaponFireTypes[BASH_FIREMODE] is rather = EWFT_Custom
{
StartMeleeFire(FireModeNum, MeleeAttackHelper.ChooseAttackDir(), ATK_Normal);
return;
}
Super.StartFire(FireModeNum);
}
Meaning that for Bash attack ChooseAttackDir() doesn't happen and game does not update NextAttackDir hence does not update CurrentAttackDir. CurrentAttackDir stays the same as it was assigned with during the last Light / Heavy attack.
Last edited: