Fix scissoring for LocalPlayer != null.
This commit is contained in:
@@ -52,7 +52,8 @@ namespace OpenRA.Graphics
|
|||||||
{
|
{
|
||||||
var r = (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;
|
world.LocalPlayer.Shroud.Bounds.Value : world.Map.Bounds;
|
||||||
|
r.Intersect(world.Map.Bounds);
|
||||||
|
|
||||||
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);
|
||||||
var right = left + (int)(Game.CellSize * r.Width);
|
var right = left + (int)(Game.CellSize * r.Width);
|
||||||
|
|||||||
Reference in New Issue
Block a user