1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-07-15 01:51:45 +00:00

don't use a pointer for ActionWeapon

This commit is contained in:
rexelion 2017-11-09 14:23:26 +00:00
parent cab0002461
commit 983c33c4c8

View file

@ -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])
{ {