diff options
Diffstat (limited to '')
| -rw-r--r-- | src/hl2h.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/src/hl2h.cpp b/src/hl2h.cpp index 4ba30bc..ee2e990 100644 --- a/src/hl2h.cpp +++ b/src/hl2h.cpp | |||
| @@ -500,34 +500,36 @@ static void do_move(int seq, float frametime) { | |||
| 500 | if (jumpbug_apply(cmd, localIdx, ent, flags, vel, frametime)) | 500 | if (jumpbug_apply(cmd, localIdx, ent, flags, vel, frametime)) |
| 501 | note_modified(cmd, flags, vel); | 501 | note_modified(cmd, flags, vel); |
| 502 | 502 | ||
| 503 | if (!feature_active(FEAT_AIMBOT) || !feature_has_bind(FEAT_AIMBOT)) | 503 | bool melee = feature_active(FEAT_MELEE) && melee_weapon_active(ent); |
| 504 | |||
| 505 | if (!feature_active(FEAT_AIMBOT) || !feature_has_bind(FEAT_AIMBOT) || melee) | ||
| 504 | aimbot_reset_lock(); | 506 | aimbot_reset_lock(); |
| 505 | if (!feature_active(FEAT_SILENTAIM) || !feature_has_bind(FEAT_SILENTAIM)) | 507 | if (!feature_active(FEAT_SILENTAIM) || !feature_has_bind(FEAT_SILENTAIM) || |
| 508 | melee) | ||
| 506 | silentaim_reset_lock(); | 509 | silentaim_reset_lock(); |
| 507 | 510 | ||
| 508 | if (feature_active(FEAT_AIMBOT)) { | 511 | if (melee) { |
| 509 | static bool aim_feature_logged = false; | 512 | if (melee_aimbot_apply(cmd)) |
| 510 | if (!aim_feature_logged) { | ||
| 511 | aim_feature_logged = true; | ||
| 512 | logf("aimbot: feature active (bind held)"); | ||
| 513 | } | ||
| 514 | if (aimbot_apply(cmd)) { | ||
| 515 | const float *vel = (const float *)(e + g_net.velocity); | ||
| 516 | note_modified(cmd, flags, vel); | 513 | note_modified(cmd, flags, vel); |
| 514 | } else { | ||
| 515 | if (feature_active(FEAT_AIMBOT)) { | ||
| 516 | static bool aim_feature_logged = false; | ||
| 517 | if (!aim_feature_logged) { | ||
| 518 | aim_feature_logged = true; | ||
| 519 | logf("aimbot: feature active (bind held)"); | ||
| 520 | } | ||
| 521 | if (aimbot_apply(cmd)) | ||
| 522 | note_modified(cmd, flags, vel); | ||
| 517 | } | 523 | } |
| 518 | } | ||
| 519 | 524 | ||
| 520 | if (feature_active(FEAT_TRIGGERBOT)) { | 525 | if (feature_active(FEAT_TRIGGERBOT)) { |
| 521 | if (triggerbot_apply(cmd)) { | 526 | if (triggerbot_apply(cmd)) |
| 522 | const float *vel = (const float *)(e + g_net.velocity); | 527 | note_modified(cmd, flags, vel); |
| 523 | note_modified(cmd, flags, vel); | ||
| 524 | } | 528 | } |
| 525 | } | ||
| 526 | 529 | ||
| 527 | if (feature_active(FEAT_SILENTAIM)) { | 530 | if (feature_active(FEAT_SILENTAIM)) { |
| 528 | if (silent_aim_apply(cmd)) { | 531 | if (silent_aim_apply(cmd)) |
| 529 | const float *vel = (const float *)(e + g_net.velocity); | 532 | note_modified(cmd, flags, vel); |
| 530 | note_modified(cmd, flags, vel); | ||
| 531 | } | 533 | } |
| 532 | } | 534 | } |
| 533 | } | 535 | } |
