// DisableUnitMovement /* v1.0.0.1
// * Disables unit movement. They can still turn, but will stay in
// * place. It simulates an ensnare-like effect, except that it will
// * not ground units, it does not have buffs, does not interrupt
// * channeled casts and appears to have no downsides.
// * Full credits to WaterKnight for discovering this technique.
//--------------------------------------------------------------------
function DisableUnitMovement takes unit u returns nothing
call SetUnitPropWindow(u, 0)
endfunction
//--------------------------------------------------------------------
function EnableUnitMovement takes unit u returns nothing
call SetUnitPropWindow(u, GetUnitDefaultPropWindow(u) * bj_DEGTORAD)
endfunction