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

Commit 6b8c166

Browse files
committed
Optimize function: enabling ability
Rename some files which make me uncomfortable
1 parent 30a98ad commit 6b8c166

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

LLHelper/command.cpp renamed to LLHelper/Command.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@ void RegisterCommands() {
463463
GmodeCommand::setup(e.mCommandRegistry);
464464
CrashCommand::setup(e.mCommandRegistry);
465465
RunasCommand::setup(e.mCommandRegistry);
466+
//Enable ability command
467+
if (Settings::REG_ABILITY) {
468+
SymCall("?setup@AbilityCommand@@SAXAEAVCommandRegistry@@@Z", void, void*)(e.mCommandRegistry);
469+
}
466470
return true;
467471
});
468472
if (Settings::ENABLE_TPS)

LLHelper/Helper.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,7 @@ void entry() {
145145
logger.setFile("logs/Helper.log", true);
146146
logger.info("Loaded version: {}", LLHELPER_VERSION.toString());
147147
}
148-
// enable ability
149-
THook(void, "?setup@ChangeSettingCommand@@SAXAEAVCommandRegistry@@@Z",
150-
void* self) {
151-
if (Settings::REG_ABILITY)
152-
SymCall("?setup@AbilityCommand@@SAXAEAVCommandRegistry@@@Z", void, void*)(self);
153-
return original(self);
154-
}
155-
// setup custom name
148+
// Setup custom name
156149
THook(string&, "?getNameTag@Actor@@UEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ", void* x) {
157150
if (auto it = ORIG_NAME._map.find((ServerPlayer*)x); it != ORIG_NAME._map.end()) {
158151
return it->second;
File renamed without changes.

0 commit comments

Comments
 (0)