don't use a pointer for ActionWeapon

pull/1544/head
rexelion 7 years ago
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…
Cancel
Save