Updating unit quadfield position?
Moderator: Moderators
Updating unit quadfield position?
When I teleport buildings around shots go through them, I believe that's caused by their quadfield position not being updated. Is there an official way to update that already or do I need to patch the engine?
Re: Updating unit quadfield position?
AFAICS LUA calls to change a unit's position call CUnit::ForcedMove, which calls CQuadField::UnitMoved already.
Re: Updating unit quadfield position?
Ah, okay. Then I don't have an explanation why teleported buildings can't be hit.
Re: Updating unit quadfield position?
They probably don't re-register themselves on the blocking map.
Re: Updating unit quadfield position?
I force them to with SetUnitBlocking.