Allow setting the passability class dynamically. This is needed to improve formation behavior for the release.
Accepted by: @Freagarach
Refs: Phab:D4563, Phab:D4605
Differential Revision: https://code.wildfiregames.com/Dr4599
Diffusion 0 A.D. Public Repository rP26801
I'm somewhat certain that this leads to OOS on rejoin.
UnitMotion.h caches the unit Clearance on Init(), and changing the passability class may change that. Should be an easy fix.
Assuming above OOS fixed, the unit will just run its path until it gets obstructed and recompute for now. We may or may not want to trigger a new path search right away.
Good news: this doesn't OOS because we serialise clearance.
I think the only sane fix at the moment is to only allow this for formation controllers, and even then it's dodgy AF.
Should I revert this then ? Or make a patch to fix the clearance which UnitMotionFlying doesn't seem to have ?
Can't we send a message when the passability changes to force a path recompute.
It's not about the path, it's because the unit clips the passability boundaries. We could try to recover from that, but it's non-trivial to write.