Skip to content

Commit 5850221

Browse files
committed
B0.3.0C0.47.4适配CS2
1 parent 228f7ab commit 5850221

31 files changed

Lines changed: 707 additions & 794 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.31)
44
project("MulNX_CS2")
55

66
# 版本定义
7-
add_compile_definitions(MulNXVersion="B0.3.0C0.47.3")
7+
add_compile_definitions(MulNXVersion="B0.3.0C0.47.4")
88

99
# 启用 LTO(仅 Release 配置)
1010
include(CheckIPOSupported)
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

bin/MulNX/CS2OBTool/CS2OBTool.dll

75.5 KB
Binary file not shown.

bin/MulNX/Log/Log_CS2Injector.txt

Lines changed: 100 additions & 100 deletions
Large diffs are not rendered by default.

bin/MulNX/Log/Log_CS2OBTool.txt

Lines changed: 485 additions & 603 deletions
Large diffs are not rendered by default.

source/App/CS2OBTool/DllMain/DllMain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void StartImpl(HMODULE& hModule) {
8686
// CS2 声音功能模块
8787
.CreateModule<SpeakingController>("SpeakingController")
8888
.CreateModule<HitSoundFix>("HitSoundFix")
89-
//.CreateModule<SoundCircleFix>("SoundCircleFix")
89+
.CreateModule<SoundCircleFix>("SoundCircleFix")
9090

9191
// CS2 Demo 相关模块
9292
.CreateModule<HookDemo>("HookDemo")
@@ -128,7 +128,7 @@ void StartImpl(HMODULE& hModule) {
128128
if (MulNXInfo::IsDebugVersion) {
129129
auto pHookConsole = core->ModuleManager()->FindModule<HookConsole>("HookConsole");
130130
auto [msg, rp] = MulNX::Message::Create<MulNX::NetExt>("Demo/Play"_hash);
131-
rp->str1 = "111";
131+
rp->str1 = "1234";
132132
pHookConsole->PublishAsync(std::move(msg));
133133
std::thread([]() {
134134
MessageBoxW(NULL, L"MulNX 注入成功!", L"MulNX", MB_OK | MB_ICONINFORMATION);

source/MulNXExtensions/CS2/Feature/HUD/BombSpotController/BombSpotController.cpp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ bool BombSpotController::Init() {
1818
if (MulNX::MRead(pOBing->iTeamNum()) == CS2::ui8TeamNum::CT) {
1919
*(int*)ctx->rdx = IM_COL32(255, 0, 0, 255);// -16776961 red
2020
}
21-
// ToDo: 在雷包掉落且正在观战T方成员时修改为白色
2221
}
2322
catch (...) {
2423

@@ -27,7 +26,37 @@ bool BombSpotController::Init() {
2726
}).value();
2827
this->hkPos_Spot_WriteBombState->Attach();
2928
this->LogSucc(I18n("hook.attached", "Pos_Spot_WriteBombState where rdx is BombColor*"));
29+
30+
// auto Pos_CallGetPawnMaybeSetAllHUD = this->CS2->client.GetTextRegion().FindRegion(MulNX::CS2::Signatures::Spot::Pos_CallGetPawnMaybeSetAllHUD).Data();
31+
// this->hkPos_CallGetPawnMaybeSetAllHUD = this->CreateHook("Pos_CallGetPawnMaybeSetAllHUD", Pos_CallGetPawnMaybeSetAllHUD + 14, [this](MulNX::Hook* hk, RegContext* ctx) {
32+
// if (!this->runFlag2.load())return MulNX::Hook::Then::Continue;
33+
// auto pOBing = this->CS2->client.TryGetObservingPawn();
34+
// auto pRet = (CS2::C_BaseEntity*)ctx->rax;
35+
// //auto name = pRet->GetName();
36+
// if (pOBing)ctx->rax = (uint64_t)pOBing;
37+
// return MulNX::Hook::Then::Continue;
38+
// }).value();
39+
// this->hkPos_CallGetPawnMaybeSetAllHUD.Attach();
40+
41+
// auto testpos = this->CS2->client.GetBaseAddress() + 0xBA3546;
42+
// static auto testhk = MulNX::Hook::Create((uint8_t*)testpos, [](MulNX::Hook*, RegContext* ctx) {
43+
// // r13 指向声音事件结构体,其第一个 QWORD 就是字符串指针
44+
// char* pStr = *(char**)(ctx->r13);
45+
// if (pStr) {
46+
// std::string teststr(pStr);
47+
// MessageBoxA(NULL, pStr, pStr, MB_OK);
48+
// if (teststr.find("Step") != std::string::npos) { // 注意大小写
49+
50+
// }
51+
// }
52+
// return MulNX::Hook::Then::Continue;
53+
// }, true).value();
54+
// testhk->Attach();
55+
3056
});
57+
this->runFlag2 = true;
58+
59+
3160

3261
this->SendUINode(this->GetName(), [this](MulNX::UINode* node) {return this->Menu(node);});
3362

source/MulNXExtensions/CS2/Feature/HUD/BombSpotController/BombSpotController.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class BombSpotController :public CSViewPlayerModuleBase {
55
std::unique_ptr<MulNX::Hook>hkPos_Spot_WriteBombState = nullptr;
6+
WrapHook hkPos_CallGetPawnMaybeSetAllHUD{};
67
void Menu(MulNX::UINode* node);
7-
public:
88
bool Init()override;
99
};

source/MulNXExtensions/CS2/Intro/Signatures.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ namespace MulNX {
3434
inline const static MulNX::Memory::Pattern PosCallCmpDrawFlashDownHUD("84 C0 74 4C 8B 85 B0 02 00 00 49 8D 8D 48 03 00 00");
3535
}
3636
namespace Spot {
37+
inline const static MulNX::Memory::Pattern Pos_CallGetPawnMaybeSetAllHUD("44 0F 29 9C 24 80 00 00 00 E8 ?? ?? ?? ?? 0F B6 BB 60 77 01 00 48 8B F0 41 BE 80 00 00 00");
38+
3739
inline const static MulNX::Memory::Pattern Pos_CmpToSetShow("38 5C 24 ?? 0F 84 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? F3 41 0F 10 8E ?? ?? ?? ?? F3 0F 10 41");// 从cvar定位
3840
inline const static MulNX::Memory::Pattern Pos_WriteMaybeEnumToChangeRadarPlayerDraw("48 8B 6C 24 ?? 41 39 9E ?? ?? ?? ?? 74 ?? 33 D2");// 交叉引用
3941
inline const static MulNX::Memory::Pattern Func_FinallyUpdatePlayerState("44 8B F2 41 81 E6 FF FF FF ?? 8B D8 41 33 DE");// 交叉引用
@@ -54,7 +56,7 @@ namespace MulNX {
5456
}
5557
namespace Sound {
5658
inline const static MulNX::Memory::Pattern EmitHurtFeedbackSound("48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 57 48 81 EC ?? ?? ?? ?? 49 8B E8");
57-
inline const static MulNX::Memory::Pattern Pos_CallGetPawnUpdateCirclePos("48 85 C0 0F 84 ?? ?? 00 00 48 89 6C 24 40 48 8D 54 24");
59+
inline const static MulNX::Memory::Pattern Pos_CallGetPawnUpdateCirclePos("48 85 C0 0F 84 ?? ?? 00 00 48 89 6C 24 ?? 48 8D 54 24 ?? 48 89 74 24 ?? 48 8B C8");
5860
inline const static MulNX::Memory::Pattern Pos_CallGetPawnMaybeLocalPawnsAsyncSoundEnque("48 3B C3 75 1A 0F 28 DE");
5961
inline const static MulNX::Memory::Pattern Pos_CallGetPawnMaybeOtherAsyncSoundEnque("48 3B C6 0F 85 ?? ?? ?? ?? 0F 28 DE");
6062
}

0 commit comments

Comments
 (0)