remove useless var in LobbyLogic

This commit is contained in:
Chris Forbes
2011-10-18 20:38:06 +13:00
parent 59fdceb4fd
commit 7ef93f2cf5

View File

@@ -65,13 +65,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
mapPreview.Map = () => Map; mapPreview.Map = () => Map;
mapPreview.OnMouseDown = mi => mapPreview.OnMouseDown = mi =>
{ {
var map = mapPreview.Map(); if (Map == null || mi.Button != MouseButton.Left
if (map == null || mi.Button != MouseButton.Left
|| orderManager.LocalClient.State == Session.ClientState.Ready) || orderManager.LocalClient.State == Session.ClientState.Ready)
return; return;
var p = map.GetSpawnPoints() var p = Map.GetSpawnPoints()
.Select((sp, i) => Pair.New(mapPreview.ConvertToPreview(map, sp), i)) .Select((sp, i) => Pair.New(mapPreview.ConvertToPreview(Map, sp), i))
.Where(a => (a.First - mi.Location).LengthSquared < 64) .Where(a => (a.First - mi.Location).LengthSquared < 64)
.Select(a => a.Second + 1) .Select(a => a.Second + 1)
.FirstOrDefault(); .FirstOrDefault();