mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 18:40:01 +00:00
fix using potion as weapon
This commit is contained in:
parent
30d5c7488d
commit
48765f2ff2
@ -229,7 +229,8 @@ namespace MWMechanics
|
||||
osg::Vec3f vAimDir = MWBase::Environment::get().getWorld()->aimToTarget(actor, target);
|
||||
float distToTarget = MWBase::Environment::get().getWorld()->getHitDistance(actor, target);
|
||||
|
||||
storage.mReadyToAttack = (distToTarget <= rangeAttack);
|
||||
bool isPotion = (dynamic_cast<ActionPotion*>(currentAction.get()) != NULL);
|
||||
storage.mReadyToAttack = (!isPotion && distToTarget <= rangeAttack);
|
||||
|
||||
// can't fight if attacker can't go where target is. E.g. A fish can't attack person on land.
|
||||
if (distToTarget > rangeAttack
|
||||
|
Loading…
x
Reference in New Issue
Block a user