Don't add same renderer objects on frameskip, fix room light collection

This commit is contained in:
Lwmte 2022-07-24 16:28:52 +03:00
parent 13dbbe2dc9
commit ea69f610fa
11 changed files with 161 additions and 104 deletions

View file

@ -373,8 +373,16 @@ namespace TEN::Renderer
Vector3 centre = (boxMin + boxMax) / 2.0f;
Vector3 extens = boxMax - centre;
BoundingBox box = BoundingBox(centre, extens);
BoundingSphere sphere = BoundingSphere(sphereCentre, sphereRadius);
return box.Intersects(sphere);
if (sphereRadius == 0.0f)
{
return box.Contains(sphereCentre);
}
else
{
BoundingSphere sphere = BoundingSphere(sphereCentre, sphereRadius);
return box.Intersects(sphere);
}
}
void Renderer11::GetLaraBonePosition(Vector3 *pos, int bone) {}