mirror of
https://github.com/rei-2/Amalgam
synced 2026-10-10 21:03:09 +08:00
bind related fixes
This commit is contained in:
@@ -64,14 +64,18 @@ void CBinds::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
|
||||
const bool bShouldUse = !I::EngineVGui->IsGameUIVisible() && !I::MatSystemSurface->IsCursorVisible()
|
||||
|| F::Menu.IsOpen && !ImGui::GetIO().WantTextInput && !F::Menu.InKeybind; // allow in menu
|
||||
bKey = bShouldUse && bKey;
|
||||
if (tBind.Not)
|
||||
bKey = !bKey;
|
||||
|
||||
switch (tBind.Info)
|
||||
{
|
||||
case 0: tBind.Active = bKey; break;
|
||||
case 0:
|
||||
if (tBind.Not)
|
||||
bKey = !bKey;
|
||||
tBind.Active = bKey;
|
||||
break;
|
||||
case 1:
|
||||
case 2: if (bKey) tBind.Active = !tBind.Active;
|
||||
case 2:
|
||||
if (bKey)
|
||||
tBind.Active = !tBind.Active;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1598,7 +1598,7 @@ namespace ImGui
|
||||
int iKeyPressed = 0;
|
||||
for (short iKey = 0; iKey < 255; iKey++)
|
||||
{
|
||||
if (U::KeyHandler.Pressed(iKey) && iKey != VK_LBUTTON)
|
||||
if (U::KeyHandler.Pressed(iKey))
|
||||
{
|
||||
iKeyPressed = iKey;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user