gamecreator Posted January 26, 2018 Share Posted January 26, 2018 Say I have models preloaded like so: preload[0]->Model::Load("player1.mdl"); preload[1]->Model::Load("player2.mdl"); preload[2]->Model::Load("enemy1.mdl"); etc. This would let me use the same models across multiple maps by keeping them in memory. I then load a map and play the game. Everything is fine. However, when I want to change the map, I need to call world->Clear() but unfortunately that will also wipe the preloads. How do I prevent this? Do I call GCSuspend then Clear then reload all the preloads (which, in theory, should be fast since they're already in memory)? Is there a better way to do this? Quote Link to comment Share on other sites More sharing options...
gamecreator Posted January 27, 2018 Author Share Posted January 27, 2018 Seems like this may be the solution: https://www.leadwerks.com/community/topic/17054-change-map-replace-old-map-with-new-map/?do=findComment&comment=111215 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.