don't use a pointer for ActionWeapon

pull/335/head^2
rexelion 7 years ago
parent cab0002461
commit 983c33c4c8

@ -504,13 +504,8 @@ namespace MWMechanics
targetWeapon = *weaponSlot;
}
std::shared_ptr<Action> targetWeaponAction(new ActionWeapon(targetWeapon));
bool isRangedCombat = false;
if (targetWeaponAction.get())
{
rangeAttackOfTarget = targetWeaponAction->getCombatRange(isRangedCombat);
}
rangeAttackOfTarget = ActionWeapon(targetWeapon).getCombatRange(isRangedCombat);
if (mMovement.mPosition[0] || mMovement.mPosition[1])
{

Loading…
Cancel
Save