Scissor to map edge.
This commit is contained in:
@@ -50,9 +50,8 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
Rectangle GetBoundsRect()
|
Rectangle GetBoundsRect()
|
||||||
{
|
{
|
||||||
if (world.LocalPlayer != null && !world.LocalPlayer.Shroud.Disabled && world.LocalPlayer.Shroud.Bounds.HasValue)
|
var r = (world.LocalPlayer != null && !world.LocalPlayer.Shroud.Disabled && world.LocalPlayer.Shroud.Bounds.HasValue)?
|
||||||
{
|
world.LocalPlayer.Shroud.Bounds.Value : world.Map.Bounds;
|
||||||
var r = world.LocalPlayer.Shroud.Bounds.Value;
|
|
||||||
|
|
||||||
var left = (int)(Game.CellSize * r.Left - Game.viewport.Location.X);
|
var left = (int)(Game.CellSize * r.Left - Game.viewport.Location.X);
|
||||||
var top = (int)(Game.CellSize * r.Top - Game.viewport.Location.Y);
|
var top = (int)(Game.CellSize * r.Top - Game.viewport.Location.Y);
|
||||||
@@ -66,9 +65,6 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
return new Rectangle(left, top, right - left, bottom - top);
|
return new Rectangle(left, top, right - left, bottom - top);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return new Rectangle(0, 0, Game.viewport.Width, Game.viewport.Height);
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerable<Renderable> SpritesToRender()
|
IEnumerable<Renderable> SpritesToRender()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user