Skip to main content

reshape

Function reshape 

Source
pub fn reshape(
    cells: &Cells,
    floors: &Floors,
    heights: &mut [i16],
    width: usize,
    vertices: &[[f32; 3]],
    mask: u32,
    yaw: f32,
    position: [f32; 3],
    ceiling: bool,
    raised: &mut Vec<[f32; 3]>,
) -> bool
Expand description

Move the ground to a mesh: each vertex goes through the model’s transform (yaw, position) and a quarter cell further. Where the cells at it, one to the west, one to the south-west and (again) one to the west are all of the mask’s types, and the vertex is above (ceiling) or below (floor) the ground, the height sample under it takes the vertex’s height. A ceiling keeps the ground it raised.

Original: FUN_1400574b0(ceiling).