diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 16:34:05 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 22:35:39 +0200 |
| commit | 6abcd7d52cda334c58ec999d212491fc24f13c9d (patch) | |
| tree | 86998508afe8eb7447ad70a2d5beebdbc9995a8f /editor/vobj-editor.cpp | |
| parent | 03b67a512ec9ef1cf5c337aa5c47a5a76d4a8a61 (diff) | |
script lifecycle mostly implemented
Diffstat (limited to 'editor/vobj-editor.cpp')
| -rw-r--r-- | editor/vobj-editor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/vobj-editor.cpp b/editor/vobj-editor.cpp index 52365fd5..916f303b 100644 --- a/editor/vobj-editor.cpp +++ b/editor/vobj-editor.cpp @@ -53,9 +53,11 @@ start: while (auto id = a.get_object_colliding_with_cursor()) { for (auto i = (int)(es.size()-1); i >= 0; i--) { - if (const auto eʹ = es[i]; eʹ->id == id) + const auto eʹ = es[i]; + if (eʹ->id == id && eʹ->is_virtual()) { - //eʹ->on_destroy(eʹ); + eʹ->destroy_script_pre(eʹ, script_destroy_reason::kill); + eʹ->destroy_script_post(); c.remove_object((unsigned)i); goto start; } |
