After triggering Double Tap, the trajectory of the first bullet always inherits the direction of the last shot fired, instead of using my current view angles.
Code:
Code:
- void ragebot::double_tap()
- {
- if (!settings.cfg().ragebot.b_ragebot || !settings.cfg().ragebot.m_doubletap || !sdk::m_cmd || !sdk::m_local_pawn || !sdk::m_local_pawn->ActiveWeapon()) return;
- static int shot_count{};
- static int old_shot_count{ };
- double offset_tick{ };
- auto temp = sdk::m_local_pawn->ActiveWeapon()->m_next_primary_attack_tick_ratio() + modf(sdk::m_local_pawn->ActiveWeapon()->m_iWatTickOffset(), &offset_tick);
- auto next_attack = sdk::m_local_pawn->ActiveWeapon()->m_next_primary_attack_tick();
- auto shoot_tick = (int)next_attack + offset_tick;
- if (temp >= 0.0) {
- if (temp >= 1.0) {
- ++shoot_tick;
- }
- }
- else {
- --shoot_tick;
- }
- bool f = shot_count % 2;
- if (sdk::m_cmd->pb.attack1_start_history_index() > -1)
- shot_count++;
- for (int i = 0; i < sdk::m_cmd->pb.input_history_size(); i++) {
- auto input_history = sdk::m_cmd->pb.mutable_input_history(i);
- if (!input_history) {
- continue;
- }
- input_history->set_player_tick_count(f ? shoot_tick - 1 : 0);
- input_history->set_player_tick_fraction(0.f);
- }
- sdk::m_cmd->pb.set_attack1_start_history_index(-1);
- old_shot_count = shot_count;
- }