mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 12:47:12 +01:00
Small fixes to the World override system. Still needs work though.
This commit is contained in:
parent
9bdb8b6bce
commit
b72cc00ee1
@ -223,7 +223,7 @@ void World::set_override_world(World *p_world) {
|
||||
|
||||
if (_override_world) {
|
||||
_override_world->_overriding_world = this;
|
||||
_add_override_cameras_into(_override_world);
|
||||
_add_override_cameras(_override_world);
|
||||
}
|
||||
|
||||
_on_after_world_override_changed();
|
||||
@ -380,7 +380,7 @@ void World::_world_3d_remove_camera_no_override(Camera *p_camera) {
|
||||
}
|
||||
|
||||
void World::_world_3d_register_camera_as_override(Camera *p_camera) {
|
||||
find_world_3d_no_override()->_register_camera(p_camera);
|
||||
//find_world_3d_no_override()->_register_camera(p_camera);
|
||||
|
||||
_override_cameras.push_back(p_camera);
|
||||
|
||||
@ -388,7 +388,7 @@ void World::_world_3d_register_camera_as_override(Camera *p_camera) {
|
||||
}
|
||||
|
||||
void World::_world_3d_remove_camera_as_override(Camera *p_camera) {
|
||||
find_world_3d_no_override()->_remove_camera(p_camera);
|
||||
//find_world_3d_no_override()->_remove_camera(p_camera);
|
||||
|
||||
_override_cameras.erase(p_camera);
|
||||
|
||||
@ -404,10 +404,10 @@ void World::_clear_override_cameras() {
|
||||
_own_active_camera = NULL;
|
||||
}
|
||||
|
||||
void World::_add_override_cameras_into(World *p_from) {
|
||||
void World::_add_override_cameras(World *p_from) {
|
||||
_own_active_camera = camera;
|
||||
|
||||
Ref<World3D> w3d = find_world_3d_no_override();
|
||||
Ref<World3D> w3d = p_from->find_world_3d_no_override();
|
||||
|
||||
ERR_FAIL_COND(!w3d.is_valid());
|
||||
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
void _world_3d_register_camera_as_override(Camera *p_camera);
|
||||
void _world_3d_remove_camera_as_override(Camera *p_camera);
|
||||
void _clear_override_cameras();
|
||||
void _add_override_cameras_into(World *p_from);
|
||||
void _add_override_cameras(World *p_from);
|
||||
|
||||
World();
|
||||
~World();
|
||||
@ -126,11 +126,12 @@ protected:
|
||||
World *_override_world;
|
||||
World *_overriding_world;
|
||||
|
||||
Vector<Camera *> _override_cameras;
|
||||
|
||||
Camera *camera;
|
||||
Set<Camera *> cameras;
|
||||
Camera *_own_active_camera;
|
||||
Vector<Camera *> _override_cameras;
|
||||
|
||||
//override canvas layers vec remove /add on override set, and unset
|
||||
|
||||
Size2 size;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user