Closed wrefgtzweve closed 3 months ago
I added HolyLib:OnModelPrecache(string model, number idx)
and HolyLib:OnGenericPrecache(string file, number idx)
Also, as a note, you could also use INetworkStringTable:DeleteAllStrings
to nuke the modelprecache
stringtable, and then you should only need to reconnect all clients to clear the CClientState::model_precache table clientside
(or else weird shit happens, because the client will probably use the wrong model for an index)
Rubat could maybe add a function to nuke the modelprecache
table and to clear the CClientState::model_precache
clientside which would solve the issue of it getting full and needing a mapchange to clear it(or having to reconnect all clients)
NOTE: I didn't test it in an hl2 build so it's just an Idea that could work or it could break something.
Can probably be added somewhere around here, would allow for map change when X count of models has been hit. https://github.com/RaphaelIT7/gmod-holylib/blob/8a9c8cd340dee28671b349409ac9cc45a95dac75/source/modules/precachefix.cpp#L57-L62