alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
975 stars 422 forks source link

Reloading extensions wipes CVars #1574

Closed Adrianilloo closed 2 years ago

Adrianilloo commented 3 years ago

When executing sm exts reload <ext id> the given extension seems to reload successfully, except its custom ConVars (created by it) remain unregistered (since unloading), causing the usual "Unknown command <CVar>" errors in console. Manually executing sm exts unload <ext id> followed sm exts load <ext name> doesn't cause this issue, and CVars get correctly re-registered.

I thought my custom extension wasn't properly coded, until I decided to check with another sample extension and the same issue happened on it (matching sample CVar: mp_noblock).

If you need more details, let me know.

Thank you.

psychonic commented 2 years ago

This is due to that SDK_OnAllLoaded function not getting called on a reload. https://github.com/alliedmodders/sourcemod/pull/1606 should fix it.

Adrianilloo commented 2 years ago

Thanks a lot