Page 1 of 1
Updating unit quadfield position?
Posted: 04 Jan 2008, 12:00
by KDR_11k
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?
Posted: 04 Jan 2008, 12:36
by Tobi
AFAICS LUA calls to change a unit's position call CUnit::ForcedMove, which calls CQuadField::UnitMoved already.
Re: Updating unit quadfield position?
Posted: 04 Jan 2008, 19:34
by KDR_11k
Ah, okay. Then I don't have an explanation why teleported buildings can't be hit.
Re: Updating unit quadfield position?
Posted: 04 Jan 2008, 19:34
by Kloot
They probably don't re-register themselves on the blocking map.
Re: Updating unit quadfield position?
Posted: 04 Jan 2008, 20:46
by KDR_11k
I force them to with SetUnitBlocking.