aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Script.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Script.hpp')
-rw-r--r--src/crepe/api/Script.hpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/crepe/api/Script.hpp b/src/crepe/api/Script.hpp
index c4e07e8..a064a90 100644
--- a/src/crepe/api/Script.hpp
+++ b/src/crepe/api/Script.hpp
@@ -20,10 +20,9 @@ T & Script::get_component() const {
template <typename T>
std::vector<std::reference_wrapper<T>> Script::get_components() const {
- auto & parent = *this->parent_ref;
auto & mgr = *this->component_manager_ref;
- return mgr.get_components_by_id<T>(parent.game_object_id);
+ return mgr.get_components_by_id<T>(this->game_object_id);
}
} // namespace crepe