forked from teamnwah/openmw-tes3coop
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
1 changed files with 6 additions and 4 deletions
|
@ -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…
Reference in a new issue