]> git.tdb.fi Git - libs/game.git/commitdiff
Add missing event observation to PhysicsSystem
authorMikko Rasa <tdb@tdb.fi>
Tue, 22 Apr 2025 21:34:55 +0000 (00:34 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 22 Apr 2025 21:40:03 +0000 (00:40 +0300)
source/game/physicssystem.cpp

index eacc13236e9debf73c61d30ffc78381636a28c12..07aca88c0ba62c4ce3b2694ec33708711b115e07 100644 (file)
@@ -39,6 +39,7 @@ PhysicsSystem::PhysicsSystem(Stage &s):
 
        monitor.set_changed_callback([this](auto &b){ simulated_rigid_body_changed(b); });
        event_observer.observe<Events::ComponentCreated>([this](auto &e){ component_created(e); });
+       event_observer.observe<Events::ComponentDestroyed>([this](auto &e){ component_destroyed(e); });
 
        world.set_contact_callback([this](const auto &... a){ on_collision(a...); });
 }