Fix varregion scene capture and legacy rendering
Some checks failed
CI / rust-skia (Rust only) (push) Has been cancelled
CI / required (push) Has been cancelled

This commit is contained in:
2026-08-23 10:18:19 +02:00
parent 19ebee129b
commit d85f7d22f2
23 changed files with 1313 additions and 516 deletions

View File

@@ -1157,8 +1157,9 @@ impl BuildGrid for LibremetaverseBuildGrid {
return Err(BuildError::OutOfRegion);
}
let base = self.agent.sim_position();
let (region_size_x, region_size_y) = simulator.region_size();
let reported_bounds_contain_agent =
base.x <= simulator.size_x as f32 && base.y <= simulator.size_y as f32;
base.x <= region_size_x as f32 && base.y <= region_size_y as f32;
for offset in positions {
let point = libremetaverse_types::Vector3 {
x: base.x + offset[0] as f32 / 1000.0,
@@ -1168,7 +1169,7 @@ impl BuildGrid for LibremetaverseBuildGrid {
if point.x < 0.0
|| point.y < 0.0
|| (reported_bounds_contain_agent
&& (point.x > simulator.size_x as f32 || point.y > simulator.size_y as f32))
&& (point.x > region_size_x as f32 || point.y > region_size_y as f32))
{
return Err(BuildError::OutOfRegion);
}