This commit is contained in:
Solly 2024-11-01 22:55:24 +08:00 committed by GitHub
commit 8caeaae34f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 3 deletions

View file

@ -661,6 +661,8 @@ MACRO_CONFIG_INT(SvConnlimitTime, sv_connlimit_time, 20, 0, 1000, CFGFLAG_SERVER
MACRO_CONFIG_STR(SvConnLoggingServer, sv_conn_logging_server, 128, "", CFGFLAG_SERVER, "Unix socket server for IP address logging (Unix only)")
#endif
MACRO_CONFIG_INT(CLHammerSpinny, cl_spinny_hammer, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Allow your hammer to spin like other weapons")
MACRO_CONFIG_INT(ClUnpredictedShadow, cl_unpredicted_shadow, 0, -1, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show unpredicted shadow tee (0 = off, 1 = on, -1 = don't even show in debug mode)")
MACRO_CONFIG_INT(ClPredictFreeze, cl_predict_freeze, 1, 0, 2, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Predict freeze tiles (0 = off, 1 = on, 2 = partial (allow a small amount of movement in freeze)")
MACRO_CONFIG_INT(ClShowNinja, cl_show_ninja, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show ninja skin")

View file

@ -3370,6 +3370,12 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
Client()->GenerateTimeoutSeed();
}
Miscellaneous.HSplitTop(2.0f, nullptr, &Miscellaneous);
Miscellaneous.HSplitTop(20.0f, &Button, &Miscellaneous);
if(DoButton_CheckBox(&g_Config.m_CLHammerSpinny, Localize("Spinny Hammer"), g_Config.m_CLHammerSpinny, &Button))
g_Config.m_CLHammerSpinny ^= 1;
GameClient()->m_Tooltips.DoToolTip(&g_Config.m_CLHammerSpinny, &Button, Localize("Allow your hammer to spin like other weapons"));
Miscellaneous.HSplitTop(5.0f, nullptr, &Miscellaneous);
Miscellaneous.HSplitTop(20.0f, &Label, &Miscellaneous);
Miscellaneous.HSplitTop(2.0f, nullptr, &Miscellaneous);

View file

@ -571,10 +571,20 @@ void CPlayers::RenderPlayer(
// if active and attack is under way, bash stuffs
if(!Inactive || LastAttackTime < m_pClient->m_aTuning[g_Config.m_ClDummy].GetWeaponFireDelay(Player.m_Weapon))
{
if(Direction.x < 0)
Graphics()->QuadsSetRotation(-pi / 2 - State.GetAttach()->m_Angle * pi * 2);
if(g_Config.m_CLHammerSpinny)
{
if(Direction.x < 0)
Graphics()->QuadsSetRotation(-pi / 2 - State.GetAttach()->m_Angle * pi * 2 + Angle + pi);
else
Graphics()->QuadsSetRotation(-pi / 2 + State.GetAttach()->m_Angle * pi * 2 + Angle);
}
else
Graphics()->QuadsSetRotation(-pi / 2 + State.GetAttach()->m_Angle * pi * 2);
{
if(Direction.x < 0)
Graphics()->QuadsSetRotation(-pi / 2 - State.GetAttach()->m_Angle * pi * 2);
else
Graphics()->QuadsSetRotation(-pi / 2 + State.GetAttach()->m_Angle * pi * 2);
}
}
else
Graphics()->QuadsSetRotation(Direction.x < 0 ? 100.0f : 500.0f);