Merge pull request #4 from scrawl/melee

Fixes weapon input to use A_Use instead of hardcoding to mouse button
This commit is contained in:
gugus 2013-07-16 07:35:21 -07:00
commit 9043fe427f

View file

@ -161,6 +161,12 @@ namespace MWInput
resetIdleTime ();
int action = channel->getNumber();
if (action == A_Use)
{
MWWorld::Class::get(mPlayer.getPlayer()).getCreatureStats(mPlayer.getPlayer()).setAttackingOrSpell(currentValue);
}
if (currentValue == 1)
{
// trigger action activated
@ -522,8 +528,6 @@ namespace MWInput
}
}
MWWorld::Class::get(mPlayer.getPlayer()).getCreatureStats(mPlayer.getPlayer()).setAttackingOrSpell(true);
return true;
}
@ -533,8 +537,6 @@ namespace MWInput
MyGUI::InputManager::getInstance().injectMouseRelease(mMouseX, mMouseY, sdlButtonToMyGUI(id));
MWWorld::Class::get(mPlayer.getPlayer()).getCreatureStats(mPlayer.getPlayer()).setAttackingOrSpell(false);
return true;
}