Гайд How to make any map Snowy/Grassy

Новичок
Статус
Оффлайн
Регистрация
9 Окт 2021
Сообщения
24
Реакции[?]
40
Поинты[?]
3K
Hello Guys.

Today I want to share with you a cheat feature, which was in my imagination long time ago, and now it's just valid.

You could make any map's ground snowy/grassy. also you could replace glass textures with an HD glass texture. (Just Be Creative).

Grassy laser texture
1640674106312.png

C++:
class mtexinfo_t
{
    char pad[76];
public:
    IMaterial* material;
};

class worldbrushdata_t
{
    char pad[88];
public:
    int    numtexinfo;
    mtexinfo_t* texinfo;

    int            numtexdata;
    csurface_t* texdata;
};

void UpdateMapTextures()
{
    static auto NewMaterial = MatSystemOther->FindMaterial("ground\snow01", 0); // Already exists in CS:S.

    for (auto i = 0; i < host_state.worldbrush->numtexinfo; i++)
    {
        host_state->worldbrush->texinfo[i].material->Release();

        host_state->worldbrush->texinfo[i].material = NewMaterial;

        NewMaterial->AddRef();
    }

    Engine->ClientCmd_Unrestricted("mat_reloadallmaterials");
}
 
Undetected
Пользователь
Статус
Оффлайн
Регистрация
22 Июн 2019
Сообщения
178
Реакции[?]
63
Поинты[?]
8K
не понял немного, что это?
Насколько я понял, с помощью этого, можно заменить существующую текстуру на карте, на любую другую, которая есть в клиенте (например: обычную траву на снежную траву)
 
Олдфаг
Статус
Оффлайн
Регистрация
5 Июл 2017
Сообщения
2,108
Реакции[?]
1,189
Поинты[?]
0
It looks really interesting

Also the missing part:
Код:
class CCommonHostState
{
public:
    model_t*                worldmodel;  
    worldbrushdata_t*         worldbrush;
    float                   interval_per_tick;      
    int                     max_splitscreen_players;
    int                     max_splitscreen_players_clientdll;
};

CCommonHostState host_state
"engine.dll", "8B 1D ? ? ? ? 56 57 83 EC 0C 89 4D F8 8B 7B 04 8D 8D ? ? ? ? 8B F2 89 75 EC E8 ? ? ? ?"
 
Сверху Снизу