Jump to content
  • Treść wyszukiwania
    Search In
    • More options...
    Find results that contain...
    Find results in...
  • Sign Up
Password for all archives on our forum: 123

source updateclientsideanimation_detour crash lw

Source code

Recommended Posts

the crash happens here

 

_declspec(noinline)void hooks::updateclientsideanimation_detour(player_t* player)
{
    if (g_ctx.globals.updating_animation && m_clientstate()->iDeltaTick != -1)
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);

    if (player == g_ctx.local())
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);
    
    if (player == g_ctx.local())
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);

    if (!player->valid(false, false))
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);
}
 

mainly these two lines

    if (g_ctx.globals.updating_animation && m_clientstate()->iDeltaTick != -1)
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);

it happens when replay happens in casuals and sometimes in other places where g_ctx.globals.updating_animation is set to true

Link to post
Share on other sites

5 hours ago, xzasdSADDSADA said:

the crash happens here

 

_declspec(noinline)void hooks::updateclientsideanimation_detour(player_t* player)
{
    if (g_ctx.globals.updating_animation && m_clientstate()->iDeltaTick != -1)
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);

    if (player == g_ctx.local())
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);
    
    if (player == g_ctx.local())
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);

    if (!player->valid(false, false))
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);
}
 

mainly these two lines

    if (g_ctx.globals.updating_animation && m_clientstate()->iDeltaTick != -1)
        return ((UpdateClientSideAnimationFn)original_updateclientsideanimation)(player);

it happens when replay happens in casuals and sometimes in other places where g_ctx.globals.updating_animation is set to true

check ur sigs, some of them is probably outdated, if that does not work try setting g_ctx.globals.updating_animation to false

Link to post
Share on other sites
8 hours ago, btc said:

check ur sigs, some of them is probably outdated, if that does not work try setting g_ctx.globals.updating_animation to false

can you send me updated sigs, and are there any other ones besides 55 8B EC 51 56 8B F1 80 BE ? ? ? ? ? 74 36 to 55 8B EC 51 56 8B F1 80 BE ? ? ? ? ? 74 

also is glow not working for you too?

Link to post
Share on other sites
45 minutes ago, xzasdSADDSADA said:

can you send me updated sigs, and are there any other ones besides 55 8B EC 51 56 8B F1 80 BE ? ? ? ? ? 74 36 to 55 8B EC 51 56 8B F1 80 BE ? ? ? ? ? 74 

Well those sigs looks just fine, have you tried turning g_ctx.globals.updating_animation to off?

48 minutes ago, xzasdSADDSADA said:

also is glow not working for you too?

well glowobject struct got updated

class CGlowObjectManager {
public:

    int RegisterGlowObject(entity_t *pEntity, const Vector &vGlowColor, float flGlowAlpha, bool bRenderWhenOccluded, bool bRenderWhenUnoccluded, int nSplitScreenSlot) {
        int nIndex;
        if (m_nFirstFreeSlot == GlowObjectDefinition_t::END_OF_FREE_LIST) {
            nIndex = m_GlowObjectDefinitions.AddToTail();
        }
        else {
            nIndex = m_nFirstFreeSlot;
            m_nFirstFreeSlot = m_GlowObjectDefinitions[nIndex].m_nNextFreeSlot;
        }

        m_GlowObjectDefinitions[nIndex].m_hEntity = pEntity;
        m_GlowObjectDefinitions[nIndex].m_vGlowColor = vGlowColor;
        m_GlowObjectDefinitions[nIndex].m_flGlowAlpha = flGlowAlpha;
        m_GlowObjectDefinitions[nIndex].m_flBloomAmount = 1.0f;
        m_GlowObjectDefinitions[nIndex].m_bRenderWhenOccluded = bRenderWhenOccluded;
        m_GlowObjectDefinitions[nIndex].m_bRenderWhenUnoccluded = bRenderWhenUnoccluded;
        m_GlowObjectDefinitions[nIndex].m_bFullBloomRender = false;
        m_GlowObjectDefinitions[nIndex].m_nSplitScreenSlot = nSplitScreenSlot;
        m_GlowObjectDefinitions[nIndex].m_nNextFreeSlot = GlowObjectDefinition_t::ENTRY_IN_USE;

        return nIndex;
    }

    void UnregisterGlowObject(int nGlowObjectHandle) {
        Assert(!m_GlowObjectDefinitions[nGlowObjectHandle].IsUnused());

        m_GlowObjectDefinitions[nGlowObjectHandle].m_nNextFreeSlot = m_nFirstFreeSlot;
        m_GlowObjectDefinitions[nGlowObjectHandle].m_hEntity = NULL;
        m_nFirstFreeSlot = nGlowObjectHandle;
    }

    int HasGlowEffect(entity_t *pEntity) const { 
        for (int i = 0; i < m_GlowObjectDefinitions.Count(); ++i) {
            if (!m_GlowObjectDefinitions[i].IsUnused() && m_GlowObjectDefinitions[i].m_hEntity == pEntity) {
                return i;
            }
        }

        return NULL;
    }

    class GlowObjectDefinition_t{
    public:
        void Set(float r, float g, float b, float a, float bloom, int style) {
            m_vGlowColor = Vector(r, g, b);
            m_flGlowAlpha = a;
            m_bRenderWhenOccluded = true;
            m_bRenderWhenUnoccluded = false;
            m_flBloomAmount = bloom;
            m_nGlowStyle = style;
        }

        entity_t * GetEnt() {
            return m_hEntity;
        }

        bool IsUnused() const { return m_nNextFreeSlot != GlowObjectDefinition_t::ENTRY_IN_USE; }

    public:
        int m_nNextFreeSlot;
        entity_t* m_hEntity;

        Vector m_vGlowColor;
        float m_flGlowAlpha;

        bool m_bGlowAlphaCappedByRenderAlpha;
        float m_flGlowAlphaFunctionOfMaxVelocity;

        float m_flGlowAlphaMax;
        float m_flGlowPulseOverdrive;

        bool m_bRenderWhenOccluded;
        bool m_bRenderWhenUnoccluded;
        bool m_bFullBloomRender;
        int m_flBloomAmount; 

        int m_nGlowStyle;
        int m_nSplitScreenSlot;

        static const int END_OF_FREE_LIST = -1;
        static const int ENTRY_IN_USE = -2;
    };

    CUtlVector< GlowObjectDefinition_t > m_GlowObjectDefinitions;
    int m_nFirstFreeSlot;

};

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...