Fix varregion scene capture and legacy rendering
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user