Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement