The town should work now
This commit is contained in:
@@ -275,6 +275,10 @@ void StreamWorld::update_items()
|
||||
}
|
||||
}
|
||||
|
||||
void StreamWorld::run_command(const String &command, const Array &args)
|
||||
{
|
||||
}
|
||||
|
||||
void StreamWorld::_notification(int which)
|
||||
{
|
||||
switch (which) {
|
||||
@@ -285,10 +289,12 @@ void StreamWorld::_notification(int which)
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
if (initialized) {
|
||||
if (Engine::get_singleton()->is_editor_hint())
|
||||
current_scene = Object::cast_to<Node>(
|
||||
get_tree()->get_root());
|
||||
else
|
||||
current_scene = Object::cast_to<Node>(this);
|
||||
else {
|
||||
current_scene = get_tree()->get_current_scene();
|
||||
if (current_scene)
|
||||
current_scene = get_tree()->get_root();
|
||||
}
|
||||
ERR_FAIL_COND_MSG(!current_scene, "No current scene");
|
||||
RoadProcessing::road_setup(this);
|
||||
set_process(true);
|
||||
@@ -329,6 +335,8 @@ void StreamWorld::_bind_methods()
|
||||
&StreamWorld::terrain_dead);
|
||||
ClassDB::bind_method(D_METHOD("viewer_dead"),
|
||||
&StreamWorld::viewer_dead);
|
||||
ClassDB::bind_method(D_METHOD("run_command", "command", "args"),
|
||||
&StreamWorld::run_command);
|
||||
}
|
||||
|
||||
StreamWorld::StreamWorld()
|
||||
|
||||
@@ -57,6 +57,7 @@ private:
|
||||
void unload_building(int id);
|
||||
void request_item(int type, int item);
|
||||
void update_items();
|
||||
void run_command(const String &command, const Array &args);
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user