From e6c3d0988db43d98d70d90e48aa36f27c0edef3a Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 20 Mar 2024 09:44:14 +0100 Subject: [PATCH] fix: inverted order of arguments when calling is_parent_class --- game_root.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game_root.cpp b/game_root.cpp index 3d87f07..210bd2d 100644 --- a/game_root.cpp +++ b/game_root.cpp @@ -210,7 +210,7 @@ void GameRoot3D::set_first_boot_level(Ref 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 &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; }