forked from teamnwah/openmw-tes3coop
[Client] Use RANGED type for ranged attacks that haven't hit a target
This commit is contained in:
parent
af49f711ca
commit
9d2dc96a2e
2 changed files with 2 additions and 4 deletions
|
@ -1411,7 +1411,7 @@ namespace MWMechanics
|
|||
if (localAttack->pressed != state)
|
||||
{
|
||||
MechanicsHelper::resetAttack(localAttack);
|
||||
localAttack->type = mwmp::Attack::MELEE;
|
||||
localAttack->type = MechanicsHelper::isUsingRangedWeapon(player) ? mwmp::Attack::RANGED : mwmp::Attack::MELEE;
|
||||
localAttack->pressed = state;
|
||||
localAttack->shouldSend = true;
|
||||
}
|
||||
|
|
|
@ -155,7 +155,6 @@ namespace MWMechanics
|
|||
if (localAttack && localAttack->pressed != storage.mAttack)
|
||||
{
|
||||
MechanicsHelper::resetAttack(localAttack);
|
||||
localAttack->type = mwmp::Attack::MELEE;
|
||||
localAttack->pressed = storage.mAttack;
|
||||
localAttack->shouldSend = true;
|
||||
}
|
||||
|
@ -227,7 +226,6 @@ namespace MWMechanics
|
|||
if (localAttack && localAttack->pressed != false)
|
||||
{
|
||||
MechanicsHelper::resetAttack(localAttack);
|
||||
localAttack->type = mwmp::Attack::MELEE;
|
||||
localAttack->pressed = false;
|
||||
localAttack->shouldSend = true;
|
||||
}
|
||||
|
@ -580,7 +578,7 @@ namespace MWMechanics
|
|||
if (localAttack && localAttack->pressed != true)
|
||||
{
|
||||
MechanicsHelper::resetAttack(localAttack);
|
||||
localAttack->type = mwmp::Attack::MELEE;
|
||||
localAttack->type = distantCombat ? mwmp::Attack::MELEE : mwmp::Attack::RANGED;
|
||||
localAttack->pressed = true;
|
||||
localAttack->shouldSend = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue