Гайд Dlight for legendware

Начинающий
Статус
Оффлайн
Регистрация
9 Авг 2021
Сообщения
75
Реакции[?]
14
Поинты[?]
7K
Dlights for legendware 3.

Firt u need put the under misc.cpp/logs.h

Код:
static CEffects* pEffects = (CEffects*)(CreateInterfaceFn(GetProcAddress(GetModuleHandleA("engine.dll"), "CreateInterface")) ("VEngineEffects001", nullptr));
Second, put the world_esp.h
Код:
enum
{
    DLIGHT_NO_WORLD_ILLUMINATION = 0x1,
    DLIGHT_NO_MODEL_ILLUMINATION = 0x2,

NOTE: These two features are used to dynamically tweak the alpha on displacements
which is a special effect for selecting which texture to use. If
we ever change how alpha is stored for displacements, we'll have to kill this feature
    DLIGHT_ADD_DISPLACEMENT_ALPHA = 0x4,
    DLIGHT_SUBTRACT_DISPLACEMENT_ALPHA = 0x8,
    DLIGHT_DISPLACEMENT_MASK = (DLIGHT_ADD_DISPLACEMENT_ALPHA | DLIGHT_SUBTRACT_DISPLACEMENT_ALPHA),
};
struct dlight_t {
    int flags;
    Vector origin;
    float radius;
ColorRGBExp32 color; Light color with exponent
float die; stop lighting after this time
float decay; drop this each second
float minlight; don't add when contributing less
    int key;
int style; lightstyle

For spotlights. Use m_OuterAngle == 0 for point lights
Vector m_Direction; center of the light cone
    float m_InnerAngle;
    float m_OuterAngle;

see comments above about HL2_BROKEN_MIN_LIGHTING_VALUE and MIN_LIGHTING_VALUE
THIS SHOULD ONLY GET CALLED FROM THE ENGINE
    float GetRadius() const {
return FastSqrt( radius * radius * ( HL2_BROKEN_MIN_LIGHTING_VALUE / MIN_LIGHTING_VALUE ) );
        return radius;
    }

see comments above about HL2_BROKEN_MIN_LIGHTING_VALUE and MIN_LIGHTING_VALUE
THIS SHOULD ONLY GET CALLED FROM THE ENGINE
    float GetRadiusSquared() const
    {
return radius * radius * ( HL2_BROKEN_MIN_LIGHTING_VALUE / MIN_LIGHTING_VALUE );
        return radius * radius;
    }

THIS SHOULD ONLY GET CALLED FROM THE ENGINE
    float IsRadiusGreaterThanZero() const
    {
don't bother calculating the new radius if you just want to know if it is greater than zero.
        return radius > 0.0f;
    }
};

struct model_t;
struct color32;
class IMaterial;

class CEffects
{
public:
Retrieve decal texture index from decal by name
    virtual int Draw_DecalIndexFromName(char* name) = 0;

Apply decal
    virtual void DecalShoot(int textureIndex, int entity, const model_t* model, const Vector& model_origin, const QAngle& model_angles, const Vector& position, const Vector* saxis, int flags) = 0;

Apply colored decal
    virtual void DecalColorShoot(int textureIndex, int entity, const model_t* model, const Vector& model_origin, const QAngle& model_angles, const Vector& position, const Vector* saxis, int flags, const color32& rgbaColor) = 0;

    virtual void PlayerDecalShoot(IMaterial* material, void* userdata, int entity, const model_t* model, const Vector& model_origin, const QAngle& model_angles, const Vector& position, const Vector* saxis, int flags, const color32& rgbaColor) = 0;

Allocate a dynamic world light ( key is the entity to whom it is associated )
    virtual dlight_t* CL_AllocDlight(int key) = 0;

Allocate a dynamic entity light ( key is the entity to whom it is associated )
    virtual dlight_t* CL_AllocElight(int key) = 0;

Get a list of the currently-active dynamic lights.
    virtual int CL_GetActiveDLights(dlight_t* pList[MAX_DLIGHTS]) = 0;

Retrieve decal texture name from decal by index
    virtual const char* Draw_DecalNameFromIndex(int nIndex) = 0;

Given an elight key, find it. Does not search ordinary dlights. May return NULL.
    virtual dlight_t* GetElightByKey(int key) = 0;
};

world_esp.h

Код:
struct ColorRGBExp32
{
    unsigned char r, g, b;
    signed char exponent;
};
again world esp

Код:
#define MAX_DLIGHTS 32
and now u need the put misc.cpp

Код:
void dlights() {


    if (!m_engine()->IsInGame())
        return;

    auto localplayer = g_ctx.local();
    if (!localplayer)
        return;

    for (int i = 0; i <= m_engine()->GetMaxClients(); ++i)
    {
        player_t* player = static_cast<player_t>(m_entitylist()->GetClientEntity(i));
        if (!player)
            continue;
            Color color(255 / 255.f, 255 / 255.f, 255 / 255.f);

            dlight_t* dLight = pEffects->CL_AllocDlight(i);
            dLight->key = i;
            dLight->color.r = (unsigned char)color.r();
            dLight->color.g = (unsigned char)color.g();
            dLight->color.b = (unsigned char)color.b();
            dLight->color.exponent = true;
            dLight->flags = DLIGHT_NO_MODEL_ILLUMINATION;
            dLight->m_Direction = player->m_vecOrigin();
            dLight->origin = player->m_vecOrigin();
            dLight->radius = 200;
            dLight->die = m_globals()->m_curtime + 0.1f;
            dLight->decay = 20.0f;
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
30 Янв 2021
Сообщения
159
Реакции[?]
15
Поинты[?]
7K
Dlights for legendware 3.

Firt u need put the under misc.cpp/logs.h

Код:
static CEffects* pEffects = (CEffects*)(CreateInterfaceFn(GetProcAddress(GetModuleHandleA("engine.dll"), "CreateInterface")) ("VEngineEffects001", nullptr));
Second, put the world_esp.h
Код:
enum
{
    DLIGHT_NO_WORLD_ILLUMINATION = 0x1,
    DLIGHT_NO_MODEL_ILLUMINATION = 0x2,

NOTE: These two features are used to dynamically tweak the alpha on displacements
which is a special effect for selecting which texture to use. If
we ever change how alpha is stored for displacements, we'll have to kill this feature
    DLIGHT_ADD_DISPLACEMENT_ALPHA = 0x4,
    DLIGHT_SUBTRACT_DISPLACEMENT_ALPHA = 0x8,
    DLIGHT_DISPLACEMENT_MASK = (DLIGHT_ADD_DISPLACEMENT_ALPHA | DLIGHT_SUBTRACT_DISPLACEMENT_ALPHA),
};
struct dlight_t {
    int flags;
    Vector origin;
    float radius;
ColorRGBExp32 color; Light color with exponent
float die; stop lighting after this time
float decay; drop this each second
float minlight; don't add when contributing less
    int key;
int style; lightstyle

For spotlights. Use m_OuterAngle == 0 for point lights
Vector m_Direction; center of the light cone
    float m_InnerAngle;
    float m_OuterAngle;

see comments above about HL2_BROKEN_MIN_LIGHTING_VALUE and MIN_LIGHTING_VALUE
THIS SHOULD ONLY GET CALLED FROM THE ENGINE
    float GetRadius() const {
return FastSqrt( radius * radius * ( HL2_BROKEN_MIN_LIGHTING_VALUE / MIN_LIGHTING_VALUE ) );
        return radius;
    }

see comments above about HL2_BROKEN_MIN_LIGHTING_VALUE and MIN_LIGHTING_VALUE
THIS SHOULD ONLY GET CALLED FROM THE ENGINE
    float GetRadiusSquared() const
    {
return radius * radius * ( HL2_BROKEN_MIN_LIGHTING_VALUE / MIN_LIGHTING_VALUE );
        return radius * radius;
    }

THIS SHOULD ONLY GET CALLED FROM THE ENGINE
    float IsRadiusGreaterThanZero() const
    {
don't bother calculating the new radius if you just want to know if it is greater than zero.
        return radius > 0.0f;
    }
};

struct model_t;
struct color32;
class IMaterial;

class CEffects
{
public:
Retrieve decal texture index from decal by name
    virtual int Draw_DecalIndexFromName(char* name) = 0;

Apply decal
    virtual void DecalShoot(int textureIndex, int entity, const model_t* model, const Vector& model_origin, const QAngle& model_angles, const Vector& position, const Vector* saxis, int flags) = 0;

Apply colored decal
    virtual void DecalColorShoot(int textureIndex, int entity, const model_t* model, const Vector& model_origin, const QAngle& model_angles, const Vector& position, const Vector* saxis, int flags, const color32& rgbaColor) = 0;

    virtual void PlayerDecalShoot(IMaterial* material, void* userdata, int entity, const model_t* model, const Vector& model_origin, const QAngle& model_angles, const Vector& position, const Vector* saxis, int flags, const color32& rgbaColor) = 0;

Allocate a dynamic world light ( key is the entity to whom it is associated )
    virtual dlight_t* CL_AllocDlight(int key) = 0;

Allocate a dynamic entity light ( key is the entity to whom it is associated )
    virtual dlight_t* CL_AllocElight(int key) = 0;

Get a list of the currently-active dynamic lights.
    virtual int CL_GetActiveDLights(dlight_t* pList[MAX_DLIGHTS]) = 0;

Retrieve decal texture name from decal by index
    virtual const char* Draw_DecalNameFromIndex(int nIndex) = 0;

Given an elight key, find it. Does not search ordinary dlights. May return NULL.
    virtual dlight_t* GetElightByKey(int key) = 0;
};

world_esp.h

Код:
struct ColorRGBExp32
{
    unsigned char r, g, b;
    signed char exponent;
};
again world esp

Код:
#define MAX_DLIGHTS 32
and now u need the put misc.cpp

Код:
void dlights() {


    if (!m_engine()->IsInGame())
        return;

    auto localplayer = g_ctx.local();
    if (!localplayer)
        return;

    for (int i = 0; i <= m_engine()->GetMaxClients(); ++i)
    {
        player_t* player = static_cast<player_t>(m_entitylist()->GetClientEntity(i));
        if (!player)
            continue;
            Color color(255 / 255.f, 255 / 255.f, 255 / 255.f);

            dlight_t* dLight = pEffects->CL_AllocDlight(i);
            dLight->key = i;
            dLight->color.r = (unsigned char)color.r();
            dLight->color.g = (unsigned char)color.g();
            dLight->color.b = (unsigned char)color.b();
            dLight->color.exponent = true;
            dLight->flags = DLIGHT_NO_MODEL_ILLUMINATION;
            dLight->m_Direction = player->m_vecOrigin();
            dLight->origin = player->m_vecOrigin();
            dLight->radius = 200;
            dLight->die = m_globals()->m_curtime + 0.1f;
            dLight->decay = 20.0f;
    }
}
Такой прелестный вопросик... А на хуя ты добавил подписи? Добавь весь код или закомменти всё
 
🍫
Участник
Статус
Оффлайн
Регистрация
13 Ноя 2020
Сообщения
1,230
Реакции[?]
181
Поинты[?]
71K
🍫
Участник
Статус
Оффлайн
Регистрация
13 Ноя 2020
Сообщения
1,230
Реакции[?]
181
Поинты[?]
71K
Ну тебе пишет что попробуй заменить на инт(предполагается int)
А вообще попробуй в релизе закомпилить
Попробуй перепастить по новой
Дальше попробуй заменить под сдк твоей пасты(Визуалка вроде придирается к заглавным буквам)
 
Сверху Снизу