Results 1 to 2 of 2

Thread: setAnim for clonePlayer()

  1. #1
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    245
    Thanks
    64
    Thanked 210 Times in 113 Posts

    setAnim for clonePlayer()

    BratokHR found an interesting way to change an animation of a player clone:

    PHP Code:
    clone_addModeloriginanglesindexModel )
    {
        
    level.g_cloneplayer endon"disconnect" );

        
    level.g_cloneplayer clone_setModelindexModel );
        clone = 
    level.g_cloneplayer cloneplayer(0);
        clone.
    origin origin;
        clone.
    angles angles;

        clone 
    clone_setAnim();

        return clone;
    }

    clone_setAnimindexAnim )
    {
        
    start_addr 140924032;

        if ( 
    getCvar("shortversion") == "1.2" )
            
    start_addr 141005696;
        else if ( 
    getCvar("shortversion") == "1.3" )
            
    start_addr 141648896;

        
    id self getEntityNumber();
        
    addr start_addr + (560 id) + 204// 0x08665480 + sizeof(gentity_t) * id + 0xCC(ent->s.legsAnim)
        
    memory_int_setaddrRandomIntRange(1300) ); // indexAnim 150

    It works, but i did not test this much. Maybe there is a better way to do that though.
    sudo apt-get rekt

  2. The Following 2 Users Say Thank You to voron00 For This Useful Post:

    BratokHR (19th November 2020),kung foo man (16th November 2020)

  3. #2
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    245
    Thanks
    64
    Thanked 210 Times in 113 Posts
    https://github.com/voron00/libcod/co...6986159d835c75

    Added this into libcod, just call setAnim on player corpse now.
    sudo apt-get rekt

  4. The Following 3 Users Say Thank You to voron00 For This Useful Post:

    BratokHR (20th November 2020),kung foo man (20th November 2020),vanfreddy (21st November 2020)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •