fix: inverted order of arguments when calling is_parent_class
parent
51c9090d10
commit
e6c3d0988d
|
@ -210,7 +210,7 @@ void GameRoot3D::set_first_boot_level(Ref<PackedScene> level) {
|
|||
return;
|
||||
}
|
||||
StringName const root_type = level->get_state()->get_node_type(0);
|
||||
if(!ClassDB::is_parent_class("Level3D", root_type)) {
|
||||
if(!ClassDB::is_parent_class(root_type, "Level3D")) {
|
||||
UtilityFunctions::push_error("First boot level cannot be of type '", root_type, "'. First boot level has to inherit from Level3D");
|
||||
this->first_boot_level.unref();
|
||||
return;
|
||||
|
@ -247,7 +247,7 @@ bool GameRoot3D::is_valid_level(Ref<PackedScene> &level) {
|
|||
return false;
|
||||
}
|
||||
StringName const root_type = level->get_state()->get_node_type(0);
|
||||
if(!ClassDB::is_parent_class("Level3D", root_type)) {
|
||||
if(!ClassDB::is_parent_class(root_type, "Level3D")) {
|
||||
UtilityFunctions::push_error("Can't load level with root type '", root_type, "'. Root node has to be of type Level3D");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue