mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 12:39:53 +00:00
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:
commit
9043fe427f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user