-
Автор темы
- #1
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
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
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");
}