Вопрос Govnohook crash

Начинающий
Статус
Оффлайн
Регистрация
15 Мар 2020
Сообщения
28
Реакции[?]
1
Поинты[?]
0
Hello Does anyone know why Govnohook's IsDead check crashing.
Code is as follows.

Код:
bool C_BasePlayer :: IsDead ()
{
    if (this == nullptr || * (void **) this == nullptr)
        return true;

    return (m_lifeState ());
}
Even tried like this.
Код:
bool C_BasePlayer :: IsDead ()
{
    if (! this)
        return false;

    if (m_iTeamNum ()! = 2 && m_iTeamNum ()! = 3)
        return false;

    if (m_lifeState ()! = LIFE_DEAD)
        return false;

    return true;
}
Thanks In advance :)
 
Web developer / designer
Пользователь
Статус
Оффлайн
Регистрация
15 Ноя 2020
Сообщения
411
Реакции[?]
124
Поинты[?]
2K
Hello Does anyone know why Govnohook's IsDead check crashing.
Code is as follows.

Код:
bool C_BasePlayer :: IsDead ()
{
    if (this == nullptr || * (void **) this == nullptr)
        return true;

    return (m_lifeState ());
}
Even tried like this.
Код:
bool C_BasePlayer :: IsDead ()
{
    if (! this)
        return false;

    if (m_iTeamNum ()! = 2 && m_iTeamNum ()! = 3)
        return false;

    if (m_lifeState ()! = LIFE_DEAD)
        return false;

    return true;
}
Thanks In advance :)
can u give src?
 
Начинающий
Статус
Оффлайн
Регистрация
23 Окт 2020
Сообщения
33
Реакции[?]
20
Поинты[?]
0
Код:
class CGlowObjectManager
{
public:
    int RegisterGlowObject(C_BasePlayer* pEntity, const Vector& vGlowColor, float flGlowAlpha, bool bRenderWhenOccluded, bool bRenderWhenUnoccluded, int nSplitScreenSlot)
    {
        int nIndex;
        if (m_nFirstFreeSlot == END_OF_FREE_LIST) {
            nIndex = -1;
        }
        else {
            nIndex = m_nFirstFreeSlot;
            m_nFirstFreeSlot = m_GlowObjectDefinitions[nIndex].m_nNextFreeSlot;
        }

        m_GlowObjectDefinitions[nIndex].m_pEntity = pEntity;
        m_GlowObjectDefinitions[nIndex].m_vGlowColor = vGlowColor;
        m_GlowObjectDefinitions[nIndex].m_flAlpha = flGlowAlpha;
        m_GlowObjectDefinitions[nIndex].m_bRenderWhenOccluded = bRenderWhenOccluded;
        m_GlowObjectDefinitions[nIndex].m_bRenderWhenUnoccluded = bRenderWhenUnoccluded;
        m_GlowObjectDefinitions[nIndex].m_nSplitScreenSlot = nSplitScreenSlot;
        m_GlowObjectDefinitions[nIndex].m_nNextFreeSlot = ENTRY_IN_USE;

        return nIndex;
    }

    void UnregisterGlowObject(int nGlowObjectHandle)
    {
        m_GlowObjectDefinitions[nGlowObjectHandle].m_nNextFreeSlot = m_nFirstFreeSlot;
        m_GlowObjectDefinitions[nGlowObjectHandle].m_pEntity = NULL;
        m_nFirstFreeSlot = nGlowObjectHandle;
    }

    void SetEntity(int nGlowObjectHandle, C_BasePlayer* pEntity)
    {
        m_GlowObjectDefinitions[nGlowObjectHandle].m_pEntity = pEntity;
    }

    void SetColor(int nGlowObjectHandle, const Vector& vGlowColor)
    {
        m_GlowObjectDefinitions[nGlowObjectHandle].m_vGlowColor = vGlowColor;
    }

    void SetAlpha(int nGlowObjectHandle, float flAlpha)
    {
        m_GlowObjectDefinitions[nGlowObjectHandle].m_flAlpha = flAlpha;
    }

    void SetRenderFlags(int nGlowObjectHandle, bool bRenderWhenOccluded, bool bRenderWhenUnoccluded)
    {
        m_GlowObjectDefinitions[nGlowObjectHandle].m_bRenderWhenOccluded = bRenderWhenOccluded;
        m_GlowObjectDefinitions[nGlowObjectHandle].m_bRenderWhenUnoccluded = bRenderWhenUnoccluded;
    }

    GlowObjectDefinition_t* m_GlowObjectDefinitions; //0x0000

    int GetSize()
    {
        return *reinterpret_cast<int*>(uintptr_t(this) + 0xC);
    }

    int m_nFirstFreeSlot;                              //0x000C
};
 
Сверху Снизу