RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Making possible to QueueDeleteEntity on EndCollideEvent

Open YuriyKiss opened this issue 2 years ago • 4 comments

Required by https://github.com/space-wizards/space-station-14/pull/22962

If contact that raises EndCollideEvent causes its own entity to be queued for deletion, it cannot be properly processed by OnContactEntityQueueDel because the contact already has the flag "Deleting", which causes assertion error.

YuriyKiss avatar Feb 01 '24 15:02 YuriyKiss

Just use QueueDelete?

moonheart08 avatar Feb 02 '24 11:02 moonheart08

Would be better to be an assert because you shouldn't ever be deleting entities during eventbus callbacks.

metalgearsloth avatar Feb 03 '24 02:02 metalgearsloth

Just use QueueDelete?

You're right, it should've been using it and already did. As I figured out now, assert error was caused by EntityManager.EntityQueueDeleted action. Updated PR comment to properly explain it

YuriyKiss avatar Feb 13 '24 10:02 YuriyKiss

Just use QueueDelete?

Morgot — 02/01/2024 3:54 AM hmm, valid point gravy — 02/01/2024 3:54 AM honestly submitting an engine PR? best way to get one of the engine people to answer your question

graevy avatar Feb 29 '24 00:02 graevy