Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 9a390df

Browse files
committed
c++ is stupid
so yeah, the toggle patch function wasn't getting called for some reason
1 parent abf587f commit 9a390df

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/shared/hacks/respawn-delay/respawn-delay.cpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,9 @@ namespace openhack::hacks {
77
static ToggleComponent* s_respawnDelay = nullptr;
88

99
void toggleDelayPatch() {
10-
L_TRACE("Toggling Respawn Delay patch");
11-
if (!s_respawnDelay) {
12-
L_WARN("Respawn Delay not initialized");
13-
return;
14-
}
10+
if (!s_respawnDelay) return;
1511
bool enabled = config::get<bool>("hack.respawn_delay.enabled");
16-
bool success = s_respawnDelay->applyPatch(enabled);
17-
if (success) {
18-
L_INFO("Respawn Delay patch {}!", enabled ? "enabled" : "disabled");
19-
} else {
20-
L_WARN("Failed to patch Respawn Delay");
21-
}
12+
s_respawnDelay->applyPatch(enabled);
2213
}
2314

2415
void RespawnDelay::onInit() {
@@ -62,13 +53,9 @@ namespace openhack::hacks {
6253
}
6354

6455
// Merge opcodes and customBypass
65-
L_TRACE("Merging opcodes and customBypass ({} + {})", opcodes.size(), customBypass.size());
6656
opcodes.insert(opcodes.end(), customBypass.begin(), customBypass.end());
67-
L_TRACE("Merged opcodes size: {}", opcodes.size());
6857
s_respawnDelay = new ToggleComponent("", "", opcodes);
69-
L_TRACE("Respawn Delay initialized");
7058
toggleDelayPatch();
71-
L_TRACE("Respawn Delay patched");
7259

7360
// Initialize keybind
7461
menu::keybinds::setKeybindCallback("respawn_delay.enabled", []() {

0 commit comments

Comments
 (0)