vehicle.current_order does not load correctly
Posted: 30 Apr 2018 08:34
Did anyone else notice that the current_order in a vehicle struct is not saved/loaded correctly? The next-pointer in thr order is NULL upon load.
The orders in the order list are all linked as they should (with only the last order pointing to NULL). But that is because they are all in the order pool.
I've traced some desync errors to this with my custom code, but since current_order has 100+ usages and GetNext() 100+ as well, I can imagine this causing trouble in other parts of the code also.
Does anyone know why the vehicle stores the order in full, instead of a pointer or index of the actual order in the order list?
The orders in the order list are all linked as they should (with only the last order pointing to NULL). But that is because they are all in the order pool.
I've traced some desync errors to this with my custom code, but since current_order has 100+ usages and GetNext() 100+ as well, I can imagine this causing trouble in other parts of the code also.
Does anyone know why the vehicle stores the order in full, instead of a pointer or index of the actual order in the order list?