mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 18:39:59 +00:00
don't use a pointer for ActionWeapon
This commit is contained in:
parent
cab0002461
commit
983c33c4c8
@ -504,13 +504,8 @@ namespace MWMechanics
|
|||||||
targetWeapon = *weaponSlot;
|
targetWeapon = *weaponSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Action> targetWeaponAction(new ActionWeapon(targetWeapon));
|
|
||||||
|
|
||||||
bool isRangedCombat = false;
|
bool isRangedCombat = false;
|
||||||
if (targetWeaponAction.get())
|
rangeAttackOfTarget = ActionWeapon(targetWeapon).getCombatRange(isRangedCombat);
|
||||||
{
|
|
||||||
rangeAttackOfTarget = targetWeaponAction->getCombatRange(isRangedCombat);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mMovement.mPosition[0] || mMovement.mPosition[1])
|
if (mMovement.mPosition[0] || mMovement.mPosition[1])
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user