Compare commits
No commits in common. "4e231f5be38f2fd1266d038ce5ce5bf0ede12577" and "c42cab169e9d08c867a8972cd058a4bfe16eca41" have entirely different histories.
4e231f5be3
...
c42cab169e
|
@ -119,7 +119,7 @@ Level3D *GameRoot3D::load_level_at(gd::Ref<gd::PackedScene> level, gd::Transform
|
||||||
// store and add to tree at desired transform
|
// store and add to tree at desired transform
|
||||||
// if this is the first level containing a game mode currently active use it's gamemode as a prototype
|
// if this is the first level containing a game mode currently active use it's gamemode as a prototype
|
||||||
gd::Ref<gd::PackedScene> game_mode_prototype{instance->get_game_mode_prototype()};
|
gd::Ref<gd::PackedScene> game_mode_prototype{instance->get_game_mode_prototype()};
|
||||||
bool const switch_game_mode{!this->game_mode || this->game_mode->get_scene_file_path() != game_mode_prototype->get_path()};
|
bool const switch_game_mode{this->game_mode->get_scene_file_path() != game_mode_prototype->get_path()};
|
||||||
if(switch_game_mode) {
|
if(switch_game_mode) {
|
||||||
this->set_game_mode(instance->get_game_mode_prototype());
|
this->set_game_mode(instance->get_game_mode_prototype());
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include <godot_cpp/variant/dictionary.hpp>
|
#include <godot_cpp/variant/dictionary.hpp>
|
||||||
#include <godot_cpp/templates/hash_map.hpp>
|
#include <godot_cpp/templates/hash_map.hpp>
|
||||||
|
|
||||||
namespace utils {
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
godot::Dictionary hashmap_to_dictionary(godot::HashMap<T, U> const &map) {
|
godot::Dictionary hashmap_to_dictionary(godot::HashMap<T, U> const &map) {
|
||||||
godot::Dictionary dict{};
|
godot::Dictionary dict{};
|
||||||
|
@ -21,6 +20,5 @@ godot::HashMap<T, U> dictionary_to_hashmap(godot::Dictionary const &dict) {
|
||||||
map.insert(keys[i], dict[keys[i]]);
|
map.insert(keys[i], dict[keys[i]]);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !UTILS_FUNCTIONS_HPP
|
#endif // !UTILS_FUNCTIONS_HPP
|
||||||
|
|
Loading…
Reference in New Issue