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

mcv update gamedata #2066

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
82 changes: 49 additions & 33 deletions gamedata/core.games/engine.mcv.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,61 @@
/**
* Do not edit this file. Any changes will be overwritten by the gamedata
* updater or by upgrading your SourceMod install.
*
* To override data in this file, create a subdirectory named "custom" and
* place your own gamedata file(s) inside of it. Such files will be parsed
* after SM's own.
*
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
*/

"Games"
{
/* CGlobalEntityList */
"#default"
{
"#supported"
{
"engine" "mcv"
}

"Offsets"
{
/* Offset into LevelShutdown */
"gEntList"
{
"windows" "33"
}
/* CGlobalEntityList */
/* Windows - get gEntList from offset into CServerGameDLL::LevelShutdown and then get EntInfo offset from gamedata */
/* Linux - get gEntList directly from exported symbol and then get the EntInfo offset from gamedata */

"EntInfo"
"#default"
{
"Addresses"
{
"EntInfosPtr"
{
"windows" "4"
"windows64"
{
"signature" "EntInfosFinder"
"read" "19"
}
}
}

"Signatures"
{
"LevelShutdown"
{
/* gEntList symbol */
"gEntList"
{
"library" "server"
"linux64" "@gEntList"
}

"LevelShutdown"
{
"library" "server"
"windows64" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x48\x8D\x0D\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
}

// Found from FindEntityByClassname.
"EntInfosFinder"
{
"library" "server"
"windows" "\x56\x8B\x35\x2A\x2A\x2A\x2A\x8B\xCE\x8B\x06\xFF\x90\x84\x00\x00\x00\xE8\x2A\x2A\x2A\x2A\xE8"
// EB 18 0F B7 C1 48 8D 1C 40 48 03 DB 48 8B 5C DF 20 EB 07 48 8B
"windows64" "\xEB\x18\x0F\xB7\xC1\x48\x8D\x1C\x40\x48\x03\xDB\x2A\x2A\x2A\x2A\x2A\xEB\x07\x48\x8B"
}
}
}
}

"Offsets"
{
/* Offset into LevelShutdown of gEntList */
"gEntList"
{
"windows64" "13"
}

/* gEntList->m_EntPtrArray[] offset */
"EntInfo"
{
"linux64" "8"
"windows64" "8"
}
}
}
}
277 changes: 176 additions & 101 deletions gamedata/sdkhooks.games/engine.mcv.txt
Original file line number Diff line number Diff line change
@@ -1,112 +1,187 @@
"Games"
{
"#default"
{
"Offsets"
"#default"
{
"Offsets"
{
// "[L0/W0] L107 W108 CBaseEntity::Blocked(CBaseEntity*)",
"Blocked"
{
"linux64" "107"
"windows64" "108"
}
// "[L0/W0] L105 W106 CBaseEntity::EndTouch(CBaseEntity*)",
"EndTouch"
{
"linux64" "105"
"windows64" "106"
}
// "[L0/W0] L119 W120 CBaseEntity::FireBullets(FireBulletsInfo_t const&)",
"FireBullets"
{
"linux64" "119"
"windows64" "120"
}
// "[L0/W0] L123 W124 CBaseEntity::GetMaxHealth(void)",
"GetMaxHealth"
{
"linux64" "123"
"windows64" "124"
}
// "[L0/W0] L69 W70 CBaseEntity::OnTakeDamage(CTakeDamageInfo const&)",
"OnTakeDamage"
{
"linux64" "69"
"windows64" "70"
}
"[L0/W0] L307 W306 CBasePlayer::OnTakeDamage_Alive(CTakeDamageInfo const&)",
"OnTakeDamage_Alive"
{
"linux64" "307"
"windows64" "306"
}
// "[L0/W0] L376 W375 CBasePlayer::PreThink(void)",
"PreThink"
{
"linux64" "376"
"windows64" "375"
}
// "[L0/W0] L377 W376 CBasePlayer::PostThink(void)",
"PostThink"
{
"linux64" "377"
"windows64" "376"
}
// CBaseCombatWeapon::FinishReload ?????
// "[L0/W0] L294 W296 CBaseCombatWeapon::FinishReload(void)",
"Reload"
{
"linux64" "294"
"windows64" "296"
}
// "[L0/W0] L24 W24 CBaseEntity::SetTransmit(CCheckTransmitInfo *,bool)",
"SetTransmit"
{
"linux64" "24"
"windows64" "24"
}
// "[L0/W0] L19 W19 CBaseEntity::ShouldCollide(int,int)",
"ShouldCollide"
{
"linux64" "19"
"windows64" "19"
}
// "[L0/W0] L32 W27 CBaseEntity::Spawn(void)",
// "[L0/W0] L26 W26 CBaseCombatCharacter::Spawn(void)",
"Spawn"
{
"linux64" "26"
"windows64" "26"
}
// "[L0/W0] L103 W104 CBaseEntity::StartTouch(CBaseEntity*)",
"StartTouch"
{
"linux64" "103"
"windows64" "104"
}
// "[L0/W0] L53 W55 CBaseEntity::Think(void)",
"Think"
{
"linux64" "53"
"windows64" "55"
}
// "[L0/W0] L104 W105 CBaseEntity::Touch(CBaseEntity*)",
"Touch"
{
"linux64" "104"
"windows64" "105"
}
// "[L0/W0] L67 W68 CBaseEntity::TraceAttack(CTakeDamageInfo const&,Vector const&,CGameTrace *)",
"TraceAttack"
{
"linux64" "67"
"windows64" "68"
}
// "[L0/W0] L102 W103 CBaseEntity::Use(CBaseEntity*,CBaseEntity*,USE_TYPE,float)",
"Use"
{
"linux64" "102"
"windows64" "103"
}
// "[L0/W0] L158 W157 CBaseEntity::VPhysicsUpdate(IPhysicsObject *)",
"VPhysicsUpdate"
{
"linux64" "158"
"windows64" "157"
}
// "[L0/W0] L299 W298 CBaseCombatCharacter::Weapon_CanSwitchTo(CBaseCombatWeapon *)",
"Weapon_CanSwitchTo"
{
"linux64" "299"
"windows64" "298"
}
// "[L0/W0] L292 W291 CBaseCombatCharacter::Weapon_CanUse(CBaseCombatWeapon *)",
"Weapon_CanUse"
{
"linux64" "292"
"windows64" "291"
}
// "[L0/W0] L296 W295 CBaseCombatCharacter::Weapon_Drop(CBaseCombatWeapon *,Vector const*,Vector const*)",
"Weapon_Drop"
{
"linux64" "296"
"windows64" "295"
}
// "[L0/W0] L293 W292 CBaseCombatCharacter::Weapon_Equip(CBaseCombatWeapon *)",
"Weapon_Equip"
{
"linux64" "293"
"windows64" "292"
}
// "[L0/W0] L297 W296 CBaseCombatCharacter::Weapon_Switch(CBaseCombatWeapon *,int)",
"Weapon_Switch"
{
"linux64" "297"
"windows64" "296"
}
}
}

"#default"
{
"Offsets"
{
"EntityListeners"
{
// 49159
// 98322
//"windows" "196644"
"windows64" "393272" // wild guess based on Ins2 Win offsets.
//"windows64" "98318"
"linux64" "49159"
}
}

"Addresses"
{
"Blocked"
"EntityListenersPtr"
{
"windows" "106"
}
"EndTouch"
{
"windows" "104"
}
"FireBullets"
{
"windows" "118"
}
"GetMaxHealth"
{
"windows" "122"
}
"OnTakeDamage"
{
"windows" "68"
}
"OnTakeDamage_Alive"
{
"windows" "306"
}
"PreThink"
{
"windows" "376"
}
"PostThink"
{
"windows" "377"
}
"Reload"
{
"windows" "295"
}
"SetTransmit"
{
"windows" "23"
}
"ShouldCollide"
{
"windows" "18"
}
"Spawn"
{
"windows" "25"
}
"StartTouch"
{
"windows" "102"
}
"Think"
{
"windows" "52"
}
"Touch"
{
"windows" "103"
}
"TraceAttack"
{
"windows" "66"
}
"Use"
{
"windows" "101"
}
"VPhysicsUpdate"
{
"windows" "157"
}
"Weapon_CanSwitchTo"
{
"windows" "297"
}
"Weapon_CanUse"
{
"windows" "291"
}
"Weapon_Drop"
{
"windows" "294"
}
"Weapon_Equip"
{
"windows" "292"
}
"Weapon_Switch"
{
"windows" "296"
"windows64"
{
"signature" "EntityListenersFinder"
"read" "18"
}
}
}
}

"#default"
{
"Offsets"

"Signatures"
{
"EntityListeners"
// CGlobalEntityList::AddListenerEntity has symbols in windows64 binaries
"EntityListenersFinder"
{
"windows" "196644"
"library" "server"
"windows64" "\x48\x89\x54\x24\x10\x48\x83\xEC\x28\x4C\x8D\x91\x38\x00\x06\x00"
}
}
}
}
}