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

switching mod needs restart #586

Open
illwieckz opened this issue Jan 23, 2018 · 3 comments
Open

switching mod needs restart #586

illwieckz opened this issue Jan 23, 2018 · 3 comments

Comments

@illwieckz
Copy link
Contributor

When I select a mod in File > Project settings, I have to close and restart GtkRadiant to get the change applied.

It's easy to reproduce, even if you click Textures > Flush & Reload Shaders the shaders from the mod are not displayed in texture browser until GtkRadiant is restarted, and there is nothing related to the mod in the console until GtkRadiant is restarted.

@Pan7
Copy link
Collaborator

Pan7 commented Jan 27, 2018

Something like calling QE_Init() https://github.com/TTimo/GtkRadiant/blob/master/radiant/qe3.cpp#L892 in DoProjectSettings() https://github.com/TTimo/GtkRadiant/blob/master/radiant/gtkdlgs.cpp#L913 should do it, but it is not safe to call QE_Init, is it?

@illwieckz
Copy link
Contributor Author

I've tested and yes it's not safe: for example imagine your base game is named base and the mod is named mod (very original isn't it? 😁 ) while you start gtkradiant it loads shaders from base then while you set the mod to mod and call QE_Init() then Flush & Reload shaders you see the shaders from mod added to the texture list, then you unset the mod and Flush & Reload shaders and the shaders from mod are still there. So it looks like we need a kind of QE_DeInit() first.

@illwieckz
Copy link
Contributor Author

A very ugly but very safe way would be to get radiant quitting and reloading itself entirely. But for that we need to add command line parameters to open map and select game. Note that this dirty trick would also allow us to do some convenient stuff like swaping the game.

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