Raised This Month: $ Target: $400
 0% 

[TF2] Play unused Shortstop shove anim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-29-2017 , 14:04   Re: [TF2] Play unused Shortstop shove anim
Reply With Quote #1

So combined with that stuff from Stop That Tank we have some neat stuff to play with

PHP Code:
/*
    Animation Sequences
    Thanks to Stop That Tank!
*/

static Handle:g_hSDKSendWeaponAnim;
static 
Handle:g_hSDKPlaySpecificSequence;

stock OnPluginStart_RegisterAnimData()
{
    new 
Handle:hGameData LoadGameConfigFile("anim.data");
    if (
hGameData == INVALID_HANDLE)
    {
        
SetFailState("Unable to load required gamedata (anim.data.txt)");
    }

    
// This call is used to play the knife blocked animation.
    
StartPrepSDKCall(SDKCall_Entity);
    
PrepSDKCall_SetFromConf(hGameDataSDKConf_Signature"CTFWeaponBase::SendWeaponAnim");
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
    
g_hSDKSendWeaponAnim EndPrepSDKCall();

    if (
g_hSDKSendWeaponAnim == INVALID_HANDLE)
    {
        
StartPrepSDKCall(SDKCall_Entity);
        
PrepSDKCall_SetFromConf(hGameDataSDKConf_Virtual"CTFWeaponBase::SendWeaponAnim");
        
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
        
g_hSDKSendWeaponAnim EndPrepSDKCall();
        if (
g_hSDKSendWeaponAnim == INVALID_HANDLE)
        {
            
LogMessage("Failed to create call: CTFWeaponBase::SendWeaponAnim!");
        }
    }

    
// This call is used to set the deploy animation on the robots with the bomb
    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetFromConf(hGameDataSDKConf_Signature"CTFPlayer::PlaySpecificSequence");
    
PrepSDKCall_AddParameter(SDKType_StringSDKPass_Pointer);
    
g_hSDKPlaySpecificSequence EndPrepSDKCall();
    if (
g_hSDKPlaySpecificSequence == INVALID_HANDLE)
    {
        
LogMessage("Failed to create call: CTFPlayer::PlaySpecificSequence!");
    }
}

stock SDK_SendWeaponAnim(weaponanim)
{
    if (
g_hSDKSendWeaponAnim != INVALID_HANDLE)
    {
        
SDKCall(g_hSDKSendWeaponAnimweaponanim);
    }
}

stock SDK_PlaySpecificSequence(clientString:strSequence[])
{
    if (
g_hSDKPlaySpecificSequence != INVALID_HANDLE)
    {
        
SDKCall(g_hSDKPlaySpecificSequenceclientstrSequence);
    }

anim.data.txt
Code:
"Games"
{
    "tf"
    {
        "Signatures"
        {
            "CTFPlayer::PlaySpecificSequence"
            {
                "library"   "server"
                "linux"     "@_ZN9CTFPlayer20PlaySpecificSequenceEPKc"
                "windows"   "\x55\x8B\xEC\x83\xEC\x30\x53\x56\x8B\x75\x08\x57\x56\x8B\xF9\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x83\xFB\xFF\x74\x2A\x8B\x35\x2A\x2A\x2A\x2A\x8B\xCE\x8B\x16\xFF\x52\x2A\x8B\x8F\x2A\x2A\x2A\x2A\x53\x6A\x13\x8B\x01\xFF\x50"
            }
            "CTFWeaponBase::SendWeaponAnim"
            {
                "library"   "server"
                "linux"     "@_ZN13CTFWeaponBase14SendWeaponAnimEi"
            }
        }
        "Offsets"
        {
            "CTFWeaponBase::SendWeaponAnim"
            {
                "library"   "server"
                "linux"     "247"
                "windows"   "241"
            }
        }
    }
}
Stun animation on knives when backstabbing Razorback.
PHP Code:
SDK_SendWeaponAnim(iWeapon0x61B); 
They also have one for CTFPlayer::Taunt or w/e, dunno if it's any much different from things like what tauntem does though.
__________________

Last edited by Chdata; 01-29-2017 at 14:05.
Chdata is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode