insert camera on rnr start
This commit is contained in:
parent
203dc236a9
commit
a0e7bb078a
|
|
@ -7,6 +7,7 @@ namespace RNR
|
||||||
{
|
{
|
||||||
m_cf_yaw = 0.f;
|
m_cf_yaw = 0.f;
|
||||||
m_cf_pitch = 0.f;
|
m_cf_pitch = 0.f;
|
||||||
|
setName("Camera");
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera::~Camera()
|
Camera::~Camera()
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,9 @@ namespace RNR
|
||||||
|
|
||||||
m_tmb = new TopMenuBar();
|
m_tmb = new TopMenuBar();
|
||||||
|
|
||||||
|
Camera* start_cam = new Camera();
|
||||||
|
start_cam->setParent(m_workspace);
|
||||||
|
m_workspace->setCurrentCamera(start_cam);
|
||||||
}
|
}
|
||||||
|
|
||||||
World::~World()
|
World::~World()
|
||||||
|
|
@ -77,6 +79,14 @@ namespace RNR
|
||||||
{
|
{
|
||||||
m_refs.clear();
|
m_refs.clear();
|
||||||
|
|
||||||
|
Camera* old_camera = m_workspace->getCurrentCamera();
|
||||||
|
if(old_camera)
|
||||||
|
{
|
||||||
|
m_workspace->setCurrentCamera(0);
|
||||||
|
old_camera->setParent(NULL);
|
||||||
|
delete old_camera;
|
||||||
|
}
|
||||||
|
|
||||||
pugi::xml_document rbxl_doc;
|
pugi::xml_document rbxl_doc;
|
||||||
pugi::xml_parse_result result = rbxl_doc.load_file(path);
|
pugi::xml_parse_result result = rbxl_doc.load_file(path);
|
||||||
if(result)
|
if(result)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue