Skip to content

Commit

Permalink
fix: fix hook origin type check
Browse files Browse the repository at this point in the history
  • Loading branch information
RimuruChan committed Jan 13, 2025
1 parent 39ba27a commit 197a033
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/ll/api/event/player/PlayerJumpEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ LL_STATIC_HOOK(
ActorDataFlagComponent& actorDataFlag,
ActorDataDirtyFlagsComponent& actorDataDirtyFlags,
VanillaClientGameplayComponent& vanillaClientGameplayComponent,
void* sneakingComponent,
void* isInWater,
::Optional<const ::SneakingComponent> sneakingComponent,
::Optional<const ::WasInWaterFlagComponent> isInWater,
OptionalGlobal<::PlayerMovementSettingsComponent const>& playerMovementSettingsComponent
) {
origin(
Expand Down
9 changes: 2 additions & 7 deletions src/ll/api/memory/Hook.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <atomic>
#include <atomic> // IWYU pragma: keep
#include <cstdint>
#include <memory>
#include <string>
Expand Down Expand Up @@ -80,11 +80,6 @@ constexpr FuncPtr resolveIdentifier(uintptr_t address) {
return toFuncPtr(address);
}

template <class T>
constexpr FuncPtr resolveIdentifier(void* address) {
return address;
}

template <class T, auto>
requires(!std::is_member_function_pointer_v<T>)
consteval bool virtualDetector() noexcept {
Expand Down Expand Up @@ -122,7 +117,7 @@ class HookRegistrar {
HookRegistrar& operator=(HookRegistrar&&) noexcept = default;
};

struct LL_EBO Hook {};
struct LL_EBO Hook{};

} // namespace ll::memory

Expand Down

0 comments on commit 197a033

Please sign in to comment.