Add A2S_Rules fix for CS:GO to CStrike extension. (#614)

* Add A2S_Rules fix for CS:GO to CStrike extension.

* Dont force set the cvar. Add checks before patching.

* Remove incorrect and useless check.

* Remove checking value as it is in the signature.

* Update build script changes to AMBuild 2.1 API to fix build.

* Fix bad check and ConVarRef being resolved too early.

* Whoops. This line is kinda important. Got nuked when refactoring.

* Remove unused variable.

* Updatet gamedata.

* Switch to "Addresses" gamedata lookup

* Add linux64 gamedata

* Fix mac build

Co-authored-by: Ruben Gonzalez <[email protected]>
Co-authored-by: Peace-Maker <[email protected]>
This commit is contained in:
Nicholas Hastings
2021-03-08 22:42:32 +00:00
committed by GitHub
co-authored by Ruben Gonzalez Peace-Maker
parent 6c2be9bdcc
commit ae485c3115
6 changed files with 377 additions and 3 deletions
+39
View File
@@ -264,4 +264,43 @@
}
}
}
"#default"
{
"Addresses"
{
// Offset from NET_SendPacket sig to MTU
"MaxMTU"
{
"windows"
{
"signature" "NET_SendPacket"
"offset" "6"
}
"linux"
{
"signature" "NET_SendPacket"
"offset" "5"
}
"linux64"
{
"signature" "NET_SendPacket"
"offset" "4"
}
}
}
"Signatures"
{
// This isn't the start of the function, but closer to where we want to patch, including the exact bytes we will replace
"NET_SendPacket"
{
"library" "engine"
// "[NET] Cannot send %d-byte packet to %s. MTU is %u. %02x %02x %02x %02x %02x\n"
"windows" "\x89\x4C\x24\x14\x81\xFF\xB0\x04\x00\x00\x7E"
// _Z14NET_SendPacketP11INetChanneliRK10ns_addressPKhiP8bf_writebj
"linux" "\x8B\x7D\x10\x81\xFE\xB0\x04\x00\x00\x0F"
"linux64" "\x31\xC0\x81\xF9\xB0\x04\x00\x00\x0F"
}
}
}
}