Stan Apr 17 2022, 1:06 PM
- Differential Revision
- D4599: Allow setting the passability class dynamically.
- rP26800: Adds a fallback texture to skies to avoid a crash if a sky texture was invalid.
- Build Status
Buildable 20134 Build 48361: Trigger Windows Autobuild Build 48360: Post-Commit Build Jenkins Build 48359: Post-Commit Build (macOS) Jenkins
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.
Bad news: this is still broken, because m_Clearance does need to be updated.
Worse news: this can easily break the game, because if the Passability class becomes larger, the unit may suddenly end up in an 'impassable' region, and then can walk all over that impassable region. So depending how it's used, it can make units go into mountains, buildings, etc.
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.