File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -843,6 +843,28 @@ void StartFrame(void)
843
843
g_ulFrameCount++;
844
844
}
845
845
846
+ #ifdef PLATFORM_WINDOWS
847
+
848
+ // Signature for g_pGameRules in AMXX
849
+ // Exported so the function is not removed by the linker
850
+ DLL_EXPORT __declspec (naked) void BHL_Signature_g_pGameRules()
851
+ {
852
+ // AMXX signature
853
+ // "windows" "\x8B\x2A\x2A\x2A\x2A\x2A\x85\x2A\x74\x2A\x8B\x2A\xFF\x2A\x2A\xA1" // StartFrame()
854
+ __asm
855
+ {
856
+ mov ecx, g_pGameRules // 8B xx xx xx xx xx
857
+ test ecx,ecx // 85 xx
858
+ jz short jump_label // 74 xx
859
+ mov eax, [ecx] // 8B xx
860
+ call dword ptr [eax+4 ] // FF xx xx
861
+ jump_label:
862
+ _emit 0xA1 // A1
863
+ }
864
+ }
865
+
866
+ #endif
867
+
846
868
void ClientPrecache (void )
847
869
{
848
870
// setup precaches always needed
You can’t perform that action at this time.
0 commit comments