diff --git a/regamedll/dlls/pathcorner.cpp b/regamedll/dlls/pathcorner.cpp index 31d55289..4132b05f 100644 --- a/regamedll/dlls/pathcorner.cpp +++ b/regamedll/dlls/pathcorner.cpp @@ -65,10 +65,7 @@ void CPathTrack::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller if (ShouldToggle(useType, on)) { - if (on) - pev->spawnflags |= SF_PATH_ALTERNATE; - else - pev->spawnflags &= ~SF_PATH_ALTERNATE; + pev->spawnflags ^= SF_PATH_ALTERNATE; } } else // Use toggles between enabled/disabled @@ -77,10 +74,7 @@ void CPathTrack::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller if (ShouldToggle(useType, on)) { - if (on) - pev->spawnflags |= SF_PATH_DISABLED; - else - pev->spawnflags &= ~SF_PATH_DISABLED; + pev->spawnflags ^= SF_PATH_DISABLED; } } } diff --git a/regamedll/game_shared/bot/bot.cpp b/regamedll/game_shared/bot/bot.cpp index bab5d40b..4a371f9f 100644 --- a/regamedll/game_shared/bot/bot.cpp +++ b/regamedll/game_shared/bot/bot.cpp @@ -204,10 +204,7 @@ void CBot::__MAKE_VHOOK(ClearPrimaryAttack)() void CBot::__MAKE_VHOOK(TogglePrimaryAttack)() { - if (m_buttonFlags & IN_ATTACK) - m_buttonFlags &= ~IN_ATTACK; - else - m_buttonFlags |= IN_ATTACK; + m_buttonFlags ^= IN_ATTACK; } void CBot::__MAKE_VHOOK(SecondaryAttack)()