JeViCo Posted May 14, 2020 Share Posted May 14, 2020 Is there any way to recreate event that would trigger when the model replacement was finished successfull? My score is to create a small delay between each model replacement. Models consume different amount of time so i can't rely on timers. If i loop through a hundred of models in a row i'll 100% get "not enough memory" error. Link to comment
Moderators IIYAMA Posted May 14, 2020 Moderators Share Posted May 14, 2020 24 minutes ago, JeViCo said: Is there any way to recreate event that would trigger when the model replacement was finished successfull? Align the loading process with your FPS. Every time you load a mod, the next frame will have to wait until the mod has been loaded. So technically onClientRender is telling you when a new mod can be loaded, but not when the mod has been loaded, except when the loading process takes longer than your next frame is ready to be drawn. See this topic for my recommendations: + The draw-distance resource you have liked, is making use of a similar mechanism which you could also play around with. It doesn't use onClientRender, but instead it uses getTickCount to process tasks within a given time. https://gitlab.com/IIYAMA12/draw-distance/-/blob/master/scripts/main_c.Lua @JeViCo 1 Link to comment
JeViCo Posted May 14, 2020 Author Share Posted May 14, 2020 I wouldn't have thought of it myself. As you would expect from a professional. Your help is invaluable, thank you so much 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now