Weird behaviour of AI packages if package target has non-unique ID
Just attack a telvanni guard and resist arrest.
The guard will summon some creatures, but usually they do not attack you.
Our current implementation of AiFollow and AiEscort stores only ID of leader, not pointer, so these creatures can get an another guard as leader.
Is it safe to store a pointer instead of ID?
#1 Updated by Andrei Kortunov 4 months ago
- Subject changed from Weird behaviour of followers if leader has non-unique ID to Weird behaviour of AI packages if package target has non-unique ID
This problem might be wider: looks like for all AI packages we store only target ID, and search for target pointer via searchPtr() or searchPtrViaActorId().
If target has a non-unique ID, a current implementation can cause unintended behaviour.