mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Merge pull request #1082 from Gladdy/master
Fix for segmentation fault on entering a cell
This commit is contained in:
commit
140be70a90
@ -229,6 +229,9 @@ namespace MWMechanics
|
|||||||
osg::Vec3f vAimDir = MWBase::Environment::get().getWorld()->aimToTarget(actor, target);
|
osg::Vec3f vAimDir = MWBase::Environment::get().getWorld()->aimToTarget(actor, target);
|
||||||
float distToTarget = MWBase::Environment::get().getWorld()->getHitDistance(actor, target);
|
float distToTarget = MWBase::Environment::get().getWorld()->getHitDistance(actor, target);
|
||||||
|
|
||||||
|
if (!currentAction)
|
||||||
|
return;
|
||||||
|
|
||||||
storage.mReadyToAttack = (currentAction->isAttackingOrSpell() && distToTarget <= rangeAttack);
|
storage.mReadyToAttack = (currentAction->isAttackingOrSpell() && distToTarget <= rangeAttack);
|
||||||
|
|
||||||
// can't fight if attacker can't go where target is. E.g. A fish can't attack person on land.
|
// can't fight if attacker can't go where target is. E.g. A fish can't attack person on land.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user