From 5c971fd51b6a91e29e67af5d0a8b55f3d6f6709d Mon Sep 17 00:00:00 2001 From: sappho Date: Mon, 4 Dec 2023 19:50:08 -0500 Subject: [PATCH] add gamedata for tf2classic (#2088) * add gamedata skeleton for tf2classic * Update game.tf2classic.txt * Update game.tf2classic.txt --------- Co-authored-by: azzy <67557558+azzyr@users.noreply.github.com> --- gamedata/core.games/common.games.txt | 3 + gamedata/sdkhooks.games/game.tf2classic.txt | 184 ++++++++++++++++++++ gamedata/sdkhooks.games/master.games.txt | 4 + gamedata/sdktools.games/game.tf2classic.txt | 153 ++++++++++++++++ gamedata/sdktools.games/master.games.txt | 4 + 5 files changed, 348 insertions(+) create mode 100644 gamedata/sdkhooks.games/game.tf2classic.txt create mode 100644 gamedata/sdktools.games/game.tf2classic.txt diff --git a/gamedata/core.games/common.games.txt b/gamedata/core.games/common.games.txt index cb21db3b56..688161ccd1 100644 --- a/gamedata/core.games/common.games.txt +++ b/gamedata/core.games/common.games.txt @@ -193,6 +193,7 @@ "game" "iosoccer" "game" "vietnam" "game" "open_fortress" + "game" "tf2classic" } "Keys" @@ -246,6 +247,7 @@ "game" "vietnam" "game" "reactivedrop" "game" "open_fortress" + "game" "tf2classic" } "Keys" @@ -308,6 +310,7 @@ "game" "FortressForever" "game" "vietnam" "game" "open_fortress" + "game" "tf2classic" } "Keys" diff --git a/gamedata/sdkhooks.games/game.tf2classic.txt b/gamedata/sdkhooks.games/game.tf2classic.txt new file mode 100644 index 0000000000..d860e354be --- /dev/null +++ b/gamedata/sdkhooks.games/game.tf2classic.txt @@ -0,0 +1,184 @@ +"Games" +{ + "#default" + { + "Offsets" + { + /* CBaseMultiplayerPlayer::CanBeAutobalanced()*/ + "CanBeAutobalanced" + { + "linux" "462" + "windows" "461" + } + + /* CBaseEntity::EndTouch(CBaseEntity*) */ + "EndTouch" + { + "linux" "102" + "windows" "101" + } + + /* CBaseEntity::FireBullets(FireBulletsInfo_t const&) */ + "FireBullets" + { + "linux" "114" + "windows" "113" + } + + /* CBaseEntity::GetMaxHealth() const */ + "GetMaxHealth" + { + "linux" "119" + "windows" "118" + } + + // NOTE: https://asherkin.github.io/vtable/ provides the correct windows offset, GDC does not appear to. + /* CBaseEntity::NetworkStateChanged_m_hGroundEntity(void*) */ + "GroundEntChanged" + { + "linux" "181" + "windows" "179" + } + + /* CBaseEntity::OnTakeDamage(CTakeDamageInfo const&) */ + "OnTakeDamage" + { + "linux" "64" + "windows" "63" + } + + /* CBasePlayer::OnTakeDamage_Alive(CTakeDamageInfo const&) */ + "OnTakeDamage_Alive" + { + "linux" "276" + "windows" "275" + } + + /* CBasePlayer::PreThink() */ + "PreThink" + { + "linux" "336" + "windows" "335" + } + + /* CBasePlayer::PostThink() */ + "PostThink" + { + "linux" "337" + "windows" "336" + } + + /* CBaseCombatWeapon::Reload() */ + "Reload" + { + "linux" "285" + "windows" "280" + } + + /* CBaseEntity::SetTransmit(CCheckTransmitInfo*, bool) */ + "SetTransmit" + { + "linux" "22" + "windows" "21" + } + + /* CBaseEntity::ShouldCollide(int, int) const */ + "ShouldCollide" + { + "linux" "18" + "windows" "16" + } + + /* CBaseEntity::Spawn() */ + "Spawn" + { + "linux" "24" + "windows" "23" + } + + /* CBaseEntity::StartTouch(CBaseEntity*) */ + "StartTouch" + { + "linux" "100" + "windows" "99" + } + + /* CBaseEntity::Think() */ + "Think" + { + "linux" "49" + "windows" "48" + } + + /* CBaseEntity::Touch(CBaseEntity*) */ + "Touch" + { + "linux" "101" + "windows" "100" + } + + /* CBaseEntity::TraceAttack(CTakeDamageInfo const&, Vector const&, CGameTrace*, CDmgAccumulator*) */ + "TraceAttack" + { + "linux" "62" + "windows" "61" + } + + /* CBaseEntity::Use(CBaseEntity*, CBaseEntity*, USE_TYPE, float) */ + "Use" + { + "linux" "99" + "windows" "98" + } + + /* CBaseEntity::VPhysicsUpdate(IPhysicsObject*) */ + "VPhysicsUpdate" + { + "linux" "160" + "windows" "159" + } + + /* CBaseEntity::Blocked(CBaseEntity*) */ + "Blocked" + { + "linux" "104" + "windows" "103" + } + + /* CBaseCombatCharacter::Weapon_CanSwitchTo(CBaseCombatWeapon*) */ + "Weapon_CanSwitchTo" + { + "linux" "270" + "windows" "269" + } + + /* CBaseCombatCharacter::Weapon_CanUse(CBaseCombatWeapon*) */ + "Weapon_CanUse" + { + "linux" "264" + "windows" "263" + } + + /* CBaseCombatCharacter::Weapon_Drop(CBaseCombatWeapon*, Vector const*, Vector const*) */ + "Weapon_Drop" + { + "linux" "267" + "windows" "266" + } + + /* CBaseCombatCharacter::Weapon_Equip(CBaseCombatWeapon*) */ + "Weapon_Equip" + { + "linux" "265" + "windows" "264" + } + + /* CBaseCombatCharacter::Weapon_Switch(CBaseCombatWeapon*, int) */ + "Weapon_Switch" + { + "linux" "268" + "windows" "267" + } + } + } +} diff --git a/gamedata/sdkhooks.games/master.games.txt b/gamedata/sdkhooks.games/master.games.txt index 28cdc5be58..cf0f0479f9 100644 --- a/gamedata/sdkhooks.games/master.games.txt +++ b/gamedata/sdkhooks.games/master.games.txt @@ -212,4 +212,8 @@ { "game" "!Dystopia" } + "game.tf2classic.txt" + { + "game" "tf2classic" + } } diff --git a/gamedata/sdktools.games/game.tf2classic.txt b/gamedata/sdktools.games/game.tf2classic.txt new file mode 100644 index 0000000000..2610c38b99 --- /dev/null +++ b/gamedata/sdktools.games/game.tf2classic.txt @@ -0,0 +1,153 @@ +"Games" +{ + "#default" + { + "Offsets" + { + /* CBaseTempEntity::GetName() */ + "GetTEName" + { + "windows" "4" + "linux" "4" + "mac" "4" + } + + /* CBaseTempEntity::GetNext() */ + "GetTENext" + { + "windows" "8" + "linux" "8" + "mac" "8" + } + + /* CBaseTempEntity::GetServerClass() */ + "TE_GetServerClass" + { + "windows" "0" + "linux" "0" + "mac" "0" + } + + /* CBasePlayer::GiveNamedItem(char const*, int) */ + "GiveNamedItem" + { + "linux" "404" + "windows" "403" + } + + /* CBaseCombatCharacter::RemovePlayerItem(CBaseCombatWeapon*) */ + "RemovePlayerItem" + { + "linux" "274" + "windows" "273" + } + + /* CBaseCombatCharacter::Weapon_GetSlot(int) const */ + "Weapon_GetSlot" + { + "linux" "272" + "windows" "271" + } + + /* CBaseAnimating::Ignite(float, bool, float, bool) */ + "Ignite" + { + "linux" "213" + "windows" "212" + } + + /* CBaseAnimating::Extinguish() */ + "Extinguish" + { + "linux" "217" + "windows" "216" + } + + /* CBaseEntity::Teleport(Vector const*, QAngle const*, Vector const*) */ + "Teleport" + { + "linux" "111" + "windows" "109" + } + + /* CBasePlayer::CommitSuicide(bool, bool) */ + "CommitSuicide" + { + "linux" "444" + "windows" "444" + } + + /* CBaseEntity::GetVelocity(Vector*, Vector*) */ + "GetVelocity" + { + "linux" "142" + "windows" "141" + } + + /* CBaseEntity::EyeAngles() */ + "EyeAngles" + { + "linux" "133" + "windows" "132" + } + + /* CBaseEntity::SetModel(char const*) */ + "SetEntityModel" + { + "linux" "26" + "windows" "25" + } + + /* CBaseEntity::AcceptInput(char const*, CBaseEntity*, CBaseEntity*, variant_t, int) */ + "AcceptInput" + { + "linux" "38" + "windows" "37" + } + + /* CBaseCombatCharacter::Weapon_Equip(CBaseCombatWeapon*) */ + "WeaponEquip" + { + "linux" "265" + "windows" "264" + } + + /* CBaseEntity::Activate() */ + "Activate" + { + "linux" "35" + "windows" "34" + } + + /* CBasePlayer::PlayerRunCommand(CUserCmd*, IMoveHelper*) */ + "PlayerRunCmd" + { + "linux" "422" + "windows" "421" + } + + /* CBaseCombatCharacter::GiveAmmo(int, int, bool) */ + "GiveAmmo" + { + "linux" "256" + "windows" "255" + } + } + + "Keys" + { + "GameRulesProxy" "CTFGameRulesProxy" + "GameRulesDataTable" "tf_gamerules_data" + } + + "Signatures" + { + "FireOutput" + { + "library" "server" + "windows" "@?FireOutput@COutputEvent@@QAEXPAVCBaseEntity@@0M@Z" + "linux" "@_ZN12COutputEvent10FireOutputEP11CBaseEntityS1_f" + } + } + } +} diff --git a/gamedata/sdktools.games/master.games.txt b/gamedata/sdktools.games/master.games.txt index 4b46458024..630e0c9ad0 100644 --- a/gamedata/sdktools.games/master.games.txt +++ b/gamedata/sdktools.games/master.games.txt @@ -273,4 +273,8 @@ { "game" "open_fortress" } + "game.tf2classic.txt" + { + "game" "tf2classic" + } }