Added: Dedicated server support
Added: The ability to not render anything when using the client as a dedicated server Added: The basic server extension (NullServerExtension) Exposed: Made some fields public, so that the server extension can access it
This commit is contained in:
@@ -39,6 +39,10 @@ namespace OpenRA.Network
|
||||
case "Chat":
|
||||
{
|
||||
var client = orderManager.LobbyInfo.ClientWithIndex( clientId );
|
||||
|
||||
if (Game.IsHost && Game.Settings.Server.Extension != null && !Game.Settings.Server.Extension.OnIngameChat(client, order.TargetString, false))
|
||||
break;
|
||||
|
||||
if (client != null)
|
||||
{
|
||||
var player = world != null ? world.FindPlayerByClient(client) : null;
|
||||
@@ -52,6 +56,10 @@ namespace OpenRA.Network
|
||||
case "TeamChat":
|
||||
{
|
||||
var client = orderManager.LobbyInfo.ClientWithIndex(clientId);
|
||||
|
||||
if (Game.IsHost && Game.Settings.Server.Extension != null && !Game.Settings.Server.Extension.OnIngameChat(client, order.TargetString, true))
|
||||
break;
|
||||
|
||||
if (client != null)
|
||||
{
|
||||
if (world == null)
|
||||
@@ -98,9 +106,14 @@ namespace OpenRA.Network
|
||||
}
|
||||
case "SetStance":
|
||||
{
|
||||
|
||||
var targetPlayer = order.Player.World.players[order.TargetLocation.X];
|
||||
var newStance = (Stance)order.TargetLocation.Y;
|
||||
|
||||
if (Game.IsHost && Game.Settings.Server.Extension != null)
|
||||
Game.Settings.Server.Extension.OnIngameSetStance(order.Player, targetPlayer, newStance);
|
||||
|
||||
|
||||
SetPlayerStance(world, order.Player, targetPlayer, newStance);
|
||||
|
||||
// automatically declare war reciprocally
|
||||
|
||||
Reference in New Issue
Block a user