sourcemod/gamedata/sdktools.games/game.tf.txt
Mikusch afc9310704
Add LookupEntityAttachment & GetEntityAttachment natives (#1653)
Using the virtual `CBaseAnimating::GetAttachment(int, matrix3x4_t &)` was a deliberate choice because virtual offsets are generally easier to maintain than signatures. The `matrix3x4_t` is converted to world position and world angles internally.
Some of the other overloads are also inlined on a few games, making this the best choice.

Since this call can only be used on classes inheriting `CBaseAnimating`, we check if the `DT_BaseAnimating` SendTable exists on the entity, throwing a native error if it doesn't.
This safeguard could be greatly improved with a call to `CBaseEntity::GetBaseAnimating`, but would require more gamedata (maybe something to consider for the future?)
2022-01-03 13:13:54 +00:00

160 lines
3.0 KiB
Plaintext

/**
* 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"
{
/* Team Fortress 2 */
"tf"
{
"Offsets"
{
"SetOwnerEntity"
{
"windows" "17"
"linux" "18"
"mac" "18"
}
"GiveNamedItem"
{
"windows" "408"
"linux" "409"
"mac" "409"
}
"RemovePlayerItem"
{
"windows" "277"
"linux" "278"
"mac" "278"
}
"Weapon_GetSlot"
{
"windows" "275"
"linux" "276"
"mac" "276"
}
"Ignite"
{
"windows" "216"
"linux" "217"
"mac" "217"
}
"Extinguish"
{
"windows" "220"
"linux" "221"
"mac" "221"
}
"Teleport"
{
"windows" "111"
"linux" "112"
"mac" "112"
}
"CommitSuicide"
{
"windows" "449"
"linux" "449"
"mac" "449"
}
"GetVelocity"
{
"windows" "143"
"linux" "144"
"mac" "144"
}
"EyeAngles"
{
"windows" "134"
"linux" "135"
"mac" "135"
}
"SetEntityModel"
{
"windows" "24"
"linux" "25"
"mac" "25"
}
"AcceptInput"
{
"windows" "36"
"linux" "37"
"mac" "37"
}
"WeaponEquip"
{
"windows" "268"
"linux" "269"
"mac" "269"
}
"Activate"
{
"windows" "33"
"linux" "34"
"mac" "34"
}
"PlayerRunCmd"
{
"windows" "426"
"linux" "427"
"mac" "427"
}
"GiveAmmo"
{
"windows" "259"
"linux" "260"
"mac" "260"
}
"GetAttachment"
{
"windows" "212"
"linux" "213"
"mac" "213"
}
}
"Keys"
{
"GameRulesProxy" "CTFGameRulesProxy"
"GameRulesDataTable" "tf_gamerules_data"
}
}
/* CBaseEntityOutput::FireOutput */
"#default"
{
"Signatures"
{
"FireOutput"
{
"library" "server"
"windows" "\x55\x8B\xEC\x81\xEC\x24\x01\x00\x00\x53\x8B\xC1"
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
"mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
}
}
}
/* CBaseAnimating::LookupAttachment */
"#default"
{
"Signatures"
{
"LookupAttachment"
{
"library" "server"
"windows" "\x55\x8B\xEC\x56\x8B\xF1\x80\xBE\x41\x03\x00\x00\x00\x75\x2A\x83\xBE\x6C\x04\x00\x00\x00\x75\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0\x74\x2A\x8B\xCE\xE8\x2A\x2A\x2A\x2A\x8B\x86\x6C\x04\x00\x00\x85\xC0\x74\x2A\x83\x38\x00\x74\x2A\xFF\x75\x08\x50\xE8\x2A\x2A\x2A\x2A\x83\xC4\x08\x40"
"linux" "@_ZN14CBaseAnimating16LookupAttachmentEPKc"
"mac" "@_ZN14CBaseAnimating16LookupAttachmentEPKc"
}
}
}
}