diff --git a/server/src/cmd.rs b/server/src/cmd.rs index ed2e834ee4..90796fce26 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -1325,14 +1325,13 @@ fn handle_build_area_add( ); return; } - let bb_id = ecs - .write_resource::() - .deref_mut() - .areas - .insert(Aabb { - min: Vec3::new(xlo.min(xhi), ylo.min(yhi), zlo.min(zhi)), - max: Vec3::new(xhi.max(xlo), yhi.max(ylo), zhi.max(zlo)), - }); + let bb_id = ecs.write_resource::().deref_mut().areas.insert( + Aabb { + min: Vec3::new(xlo, ylo, zlo), + max: Vec3::new(xhi, yhi, zhi), + } + .made_valid(), + ); ecs.write_resource::() .deref_mut() .area_names