Update Warp.cpp

Made Flamethrower M1 to work with rapidfire (hopefully I didn't screw up anything cause I don't know how to code)
This commit is contained in:
Lewdcifer 2021-05-09 22:14:52 +08:00 committed by LightCat
parent 6b370b8daa
commit bf30db96f4

View File

@ -225,9 +225,9 @@ bool shouldRapidfire()
// Mouse 1 is held, do it. // Mouse 1 is held, do it.
bool buttons_pressed = current_user_cmd && current_user_cmd->buttons & IN_ATTACK; bool buttons_pressed = current_user_cmd && current_user_cmd->buttons & IN_ATTACK;
// Unless we are on a flamethrower, where we only want m2. // Unless we are on a flamethrower, where we want both m1 and m2.
if (LOCAL_W->m_iClassID() == CL_CLASS(CTFFlameThrower)) if (LOCAL_W->m_iClassID() == CL_CLASS(CTFFlameThrower))
buttons_pressed = current_user_cmd && current_user_cmd->buttons & IN_ATTACK2; buttons_pressed = current_user_cmd && current_user_cmd->buttons & (IN_ATTACK | IN_ATTACK2);
if (g_pLocalPlayer->holding_sniper_rifle) if (g_pLocalPlayer->holding_sniper_rifle)
{ {