Files
cheathell/project/FreeCam.h
T
2026-03-08 16:25:35 -06:00

43 lines
977 B
C++

#pragma once
#include "ModuleManager.h"
class FreeCamModule final : public BaseModule {
public:
FreeCamModule();
void RegisterTab() override;
void Render() override;
void Update() override;
void OnHotkey() override;
private:
struct KeybindState {
int forward = 'W';
int backward = 'S';
int left = 'A';
int right = 'D';
int up = VK_SPACE;
int down = VK_CONTROL;
int inc_fov = VK_OEM_PLUS;
int dec_fov = VK_OEM_MINUS;
int left_roll = 'Q';
int right_roll = 'E';
int reset_roll = 'R';
int toggle = VK_OEM_3;
};
static const char* KeyName(int vk);
KeybindState keys_{};
float move_speed_ = 5.0f;
float look_sensitivity_ = 2.0f;
float roll_speed_ = 2.0f;
float fov_speed_ = 1.0f;
float fov_value_ = 90.0f;
void* active_cam_ptr_ = nullptr;
void* override_cam_ptr_ = nullptr;
bool cam_override_active_ = false;
};