Skip to content

Commit dda76b1

Browse files
committed
bot_add忽略nav
1 parent 6c69310 commit dda76b1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

game/csgo/addons/cs2surf/gamedata/cs2surf-core.games.jsonc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,12 @@
336336
"library": "server",
337337
"windows": "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 83 EC ? 48 8B EA 4C 8B F1",
338338
"linux": "55 48 89 E5 41 56 49 89 D6 41 55 41 89 F5 41 54 48 8D 35"
339+
},
340+
// "Error - cannot add bots after game is over."
341+
"BotNavIgnore": {
342+
"library": "server",
343+
"windows": "80 B8 ? ? ? ? ? 0F 84 ? ? ? ? 80 3D ? ? ? ? ? 74",
344+
"linux": "48 8D 05 ? ? ? ? 48 8B 00 48 85 C0 74 2E 80 B8 ? ? ? ? 00 74 25 48 8D 05 ? ? ? ? 80 38 00 75 31 44 8B 85 ? ? ? ? 31 F6 BF 03"
339345
}
340346
}
341347
}

src/surf/replay/nonav.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class CNoNavPlugin : CCoreForward {
99
CNoNavPlugin g_NoNav;
1010

1111
void CNoNavPlugin::OnPluginStart() {
12-
static auto fn = libmem::SignScan("80 B8 ? ? ? ? ? 0F 84 ? ? ? ? 80 3D ? ? ? ? ? 74", LIB::server);
12+
static auto fn = GAMEDATA::GetMemSig("BotNavIgnore");
1313
SDK_ASSERT(fn);
1414

15-
MEM::PatchNOP(fn, 13);
15+
MEM::PatchNOP(fn, WIN_LINUX(13, 36));
1616
}

0 commit comments

Comments
 (0)