Open elainedo opened 4 years ago
This is primarily because the UnitState controls the anchor point, not the single points. The anchor point usually arrives at the destination and switch to STANDING before the singles arrive.
I think this issue is only problematic up to the wrong stamina recovery, but it is probably fine to leave it for the time being while we come up with a solution. One way is when the unit is in STANDING, we scale the stamina lost & recovery according to the number of STANDING singles.
One note is that when the unit is in standing, we should not do stamina lost even if only a 1 single is still MOVING. That is because there are situations in which we cannot make all singles going into STANDING state (when the unit formation is overlapping with trees for example).
After a unit has moved (UnitState set to Standing), each single belonging to the unit starts to move to a predefined position that eventually forms the unit. It looks like the Unit is moving but the state is Standing - could be confusing...