Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

material->create_material not present. #110

Open
Alluseri opened this issue Jul 19, 2021 · 1 comment
Open

material->create_material not present. #110

Alluseri opened this issue Jul 19, 2021 · 1 comment

Comments

@Alluseri
Copy link

I can't create materials using the material interface, and I consider doing that by creating them in the game folder unsafe. Is there a possibility to add this function?

@Milkmen
Copy link

Milkmen commented Jul 25, 2021

Hello Alluseri, you should be able to add create_material by just
adding the following code in your i_material_system class:

i_material* create_material(char const * material_name, c_key_values * key_values) {
	using fn = i_material * ( __thiscall * )( i_material_system *, char const *, c_key_values * );
	return ( *( fn ** ) this )[ 83 ]( this, material_name, key_values);
}

the rest should be pretty self-explanatory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants