Skip to content

Commit

Permalink
No hurt cam fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezeEngine committed Aug 1, 2024
1 parent 95f4c60 commit 89be4b2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Client/Module/Modules/NoHurtCam/NoHurtCamListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,27 @@ class NoHurtCamListener : public Listener {
}

void onTick(TickEvent &event) override {
if (module->isEnabled() && !module->restricted) {
if (!module->restricted) {
patch();
} else {
unpatch();
}
}

void onUnregister() override {
unpatch();
}

NoHurtCamListener(const char string[5], Module *module) {
this->name = string;
this->module = module;

originalCameraAngle.resize(3);

sigOffset = Memory::findSig(GET_SIG("CameraAssignAngle")) + 4;
if(sigOffset == NULL) {
sigOffset = Memory::findSig(GET_SIG("CameraAssignAngle")) + 4;
}

memcpy(originalCameraAngle.data(), (LPVOID) sigOffset, 3);
Memory::patchBytes( originalCameraAngle.data(), (LPVOID)sigOffset, 3);
}
};

0 comments on commit 89be4b2

Please sign in to comment.