Reloading a Map
Reloading a Map
How do you load in another Map? Does anybody have any example code on how to do this? Thanks
Games are fun to play but great to create.
The same way as you loaded the first map.
Make sure you do a
before loading the second, that's all.
________
DC MEDICAL MARIJUANA DISPENSARY
Make sure you do a
Code: Select all
smgr->clear();
before loading the second, that's all.
________
DC MEDICAL MARIJUANA DISPENSARY
Last edited by area51 on Tue Feb 22, 2011 1:06 pm, edited 1 time in total.
I tried it but got a compile error:area51 wrote:The same way as you loaded the first map.
Make sure you do aCode: Select all
smgr->clear();
before loading the second, that's all.
Compiling...
CDemo.cpp
C:\irrct\examples\Techdemo\CDemo.cpp(398) : error C2039: 'clear' : is not a member of 'ISceneManager'
C:\IRRCT\INCLUDE\ISceneManager.h(87) : see declaration of 'ISceneManager'
Error executing cl.exe.
Here's the code I used, thanks.
Code: Select all
void CDemo::loadSceneData()
{
// load quake level
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* sm = device->getSceneManager();
++Level_count;
if (Level_count == 1) {
quakeLevelMesh = sm->getMesh("complex.bsp");
} else {
sm->clear();
quakeLevelMesh = sm->getMesh("20kdm2.bsp");
}
Games are fun to play but great to create.
Thanks puh, yes, the code compiles without error.
It makes it's first appearance in 0.9.0 (To my surprise, thought its been in for a lot longer than that)
Try upgrading to 0.10.0
________
CAODAISM DICUSSION
It makes it's first appearance in 0.9.0 (To my surprise, thought its been in for a lot longer than that)
Try upgrading to 0.10.0
________
CAODAISM DICUSSION