Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved 'InitGraph' under the 'ForceClientDllUpdate' to make bxt_show_nodes draw a right nodes in CSCZDS #411

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions BunnymodXT/modules/ServerDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,33 +805,6 @@ void ServerDLL::FindStuff()
auto fCBasePlayer__Jump = FindAsync(ORIG_CBasePlayer__Jump, patterns::server::CBasePlayer__Jump);
auto fCBaseDoor__DoorActivate = FindAsync(ORIG_CBaseDoor__DoorActivate, patterns::server::CBaseDoor__DoorActivate);

auto fCGraph__InitGraph = FindAsync(
ORIG_CGraph__InitGraph,
patterns::server::CGraph__InitGraph,
[&](auto pattern) {
switch (pattern - patterns::server::CGraph__InitGraph.cbegin()) {
case 0: // HL-SteamPipe
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
offm_pNodes = 0x0C;
offm_vecOrigin = 0x00;
offm_cNodes = 0x18;
if (is_czeror)
size_CNode = 0x60;
else
size_CNode = 0x58;
break;
default:
assert(false);
}
});

uintptr_t pDispatchRestore;
auto fDispatchRestore = FindAsync(
pDispatchRestore,
Expand Down Expand Up @@ -1053,6 +1026,33 @@ void ServerDLL::FindStuff()
}
}

auto fCGraph__InitGraph = FindAsync(
ORIG_CGraph__InitGraph,
patterns::server::CGraph__InitGraph,
[&](auto pattern) {
switch (pattern - patterns::server::CGraph__InitGraph.cbegin()) {
case 0: // HL-SteamPipe
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
offm_pNodes = 0x0C;
offm_vecOrigin = 0x00;
offm_cNodes = 0x18;
if (is_czeror)
size_CNode = 0x60;
else
size_CNode = 0x58;
break;
default:
assert(false);
}
});

{
auto pattern = fCBasePlayer__GiveNamedItem.get();
if (ORIG_CBasePlayer__GiveNamedItem) {
Expand Down