freeslot("S_PLAY_COMPLETE_CATTY", "S_PLAY_COMPLETEEND_CATTY", "SPR2_VICT")

states[S_PLAY_COMPLETE_CATTY] = {
    sprite = SPR_PLAY,
    frame = SPR2_VICT|A|FF_ANIMATE,
    tics = 27,
    var1 = 5,
    var2 = 7,
    nextstate = S_PLAY_COMPLETEEND_CATTY
}

states[S_PLAY_COMPLETEEND_CATTY] = {
    sprite = SPR_PLAY,
    frame = SPR2_VICT,
    tics = -1,
    nextstate = S_PLAY_COMPLETEEND_CATTY
}

addHook("PlayerThink", function(player) -- Misc Player Stuff
    if player and player.mo and player.mo.valid and player.mo.skin == "catty"
    and not player.bot
        if ((player.exiting <= 3*TICRATE and player.exiting != 0) and player.mo.state != S_PLAY_COMPLETE_CATTY and player.mo.state != S_PLAY_COMPLETEEND_CATTY)
        and not (multiplayer)
            if P_IsObjectOnGround(player.mo)
                player.mo.state = S_PLAY_COMPLETE_CATTY -- Strike a Pose!
            end
        end
        
        if (player.mo.state == S_PLAY_COMPLETE_CATTY or player.mo.state == S_PLAY_COMPLETEEND_CATTY) and P_IsObjectOnGround(player.mo)
            player.mo.momx = 0
            player.mo.momy = 0
        end
    end
end)