forked from mirror/openmw-tes3mp
Fixes weapon input to use A_Use instead of hardcoding to mouse button
This commit is contained in:
parent
20341ae8b7
commit
9536b5050b
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