Update copyright header. Normalize line endings to LF.

This commit is contained in:
Paul Chote
2011-02-13 10:38:57 +13:00
parent ea5e2c0588
commit 094907c1a9
489 changed files with 43614 additions and 43613 deletions

View File

@@ -1,18 +1,18 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Network;
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Network;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
@@ -32,21 +32,21 @@ namespace OpenRA.Mods.RA
.Select(c => world.Map.SpawnPoints.ElementAt(c.SpawnPoint - 1)).ToList();
var available = world.Map.SpawnPoints.Except(taken).ToList();
// Set spawn
foreach (var slot in world.LobbyInfo.Slots)
{
if (slot.Spectator)
continue; // Skip spectator slots
var client = world.LobbyInfo.Clients.FirstOrDefault(c => c.Slot == slot.Index);
var player = FindPlayerInSlot(world, slot);
if (player == null) continue;
var spid = (client == null || client.SpawnPoint == 0)
? ChooseSpawnPoint(world, available, taken)
: world.Map.SpawnPoints.ElementAt(client.SpawnPoint - 1);
Start.Add(player, spid);
// Set spawn
foreach (var slot in world.LobbyInfo.Slots)
{
if (slot.Spectator)
continue; // Skip spectator slots
var client = world.LobbyInfo.Clients.FirstOrDefault(c => c.Slot == slot.Index);
var player = FindPlayerInSlot(world, slot);
if (player == null) continue;
var spid = (client == null || client.SpawnPoint == 0)
? ChooseSpawnPoint(world, available, taken)
: world.Map.SpawnPoints.ElementAt(client.SpawnPoint - 1);
Start.Add(player, spid);
}
// Explore allied shroud
@@ -58,11 +58,11 @@ namespace OpenRA.Mods.RA
// Set viewport
if (world.LocalPlayer != null && Start.ContainsKey(world.LocalPlayer))
Game.viewport.Center(Start[world.LocalPlayer]);
}
static Player FindPlayerInSlot(World world, Session.Slot slot)
{
return world.players.Values.FirstOrDefault(p => p.PlayerRef.Name == slot.MapPlayer);
}
static Player FindPlayerInSlot(World world, Session.Slot slot)
{
return world.players.Values.FirstOrDefault(p => p.PlayerRef.Name == slot.MapPlayer);
}
static int2 ChooseSpawnPoint(World world, List<int2> available, List<int2> taken)