So I made my first small custom callout and everything is working fine. It's a pursuit with a vehicle. However one thing that bothers me is, that after the arrest of the driver, the arresting officer is not able to escort the person to his car. It looks like the ped starts walking, the cop looses grip, regraps the ped and repeat. After a few tries the ped manages to free himself, gets into his vehicle and drives of as if nothing had happened.
I already tried clearing the peds tasks on callout end but still same behaviour.
End() looks like this
public override void End()
{
foreach (Ped criminal in criminals.Where(criminal => criminal.Exists()))
{
criminal.Tasks.Clear();
criminal.Dismiss();
Log($"Dismissed criminal {criminal.GetHashCode()}");
}
Log($"Callout {GetType().Name} ended");
base.End();
}
So nothing super special that could interfere. What am I missing?