revert weaponselect

This commit is contained in:
nullifiedcat 2017-07-31 08:24:10 +03:00
parent 37caed4604
commit 1ad4c694d7
2 changed files with 3 additions and 3 deletions

View File

@ -247,13 +247,13 @@ void DoWalking() {
// If the local player is a medic and user settings allow, then keep the medigun out
if (g_pLocalPlayer->clazz == tf_medic && always_medigun) {
if (my_slot != 1) {
g_pUserCmd->weaponselect = 1;
g_IEngine->ExecuteClientCmd("slot2");
}
// Else we attemt to keep our weapon mimiced with our follow target
} else {
if (my_slot != owner_slot) {
g_pUserCmd->weaponselect = owner_slot;
g_IEngine->ExecuteClientCmd(format("slot", owner_slot + 1).c_str());
}
}
}

View File

@ -698,7 +698,7 @@ void UpdateSlot() {
if (vfunc<bool(*)(IClientEntity*)>(weapon, 190, 0)(weapon)) {
int slot = vfunc<int(*)(IClientEntity*)>(weapon, 395, 0)(weapon);
if (slot != int(force_slot) - 1) {
g_pUserCmd->weaponselect = int(force_slot) - 1;
hack::ExecuteCommand(format("slot", int(force_slot)));
}
}
}