Changeset 224 for binary-improvements/7dtd-server-fixes/src/NetConnections/ConsoleOutputSeparator.cs
- Timestamp:
- Apr 2, 2015, 9:16:34 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/NetConnections/ConsoleOutputSeparator.cs
r213 r224 22 22 private static List<NetCommand> netCommandQueue = new List<NetCommand> (); 23 23 private static bool isCurrentCommandFromClient = false; 24 private static int issuerOfCurrentClientCommand = -1; 24 25 private static IConnection issuerOfCurrentCommand; 25 26 26 public static void C_ExecuteCmdFromClient (ConsoleSdtd console, NetworkPlayer _networkPlayer, string _playerName, string _playerID, string _command)27 public static void C_ExecuteCmdFromClient (ConsoleSdtd console, int _entityId, string _playerName, string _playerID, string _command) 27 28 { 28 29 Log.Out ("Executed command \"" + _command + "\" from player \"" + _playerName + "\""); … … 30 31 lock (netCommandQueue) { 31 32 isCurrentCommandFromClient = true; 32 console.issuerOfCurrentClientCommand = _networkPlayer; 33 console.ExecuteClientCmdInternal (_playerName, _playerID, _command); 33 issuerOfCurrentClientCommand = _entityId; 34 35 string[] array = _command.Split (' '); 36 if (array.Length == 0) { 37 C_SendResult (console, "*** ERROR: empty command '" + _command + "'"); 38 } else { 39 ConsoleCommand cmd = console.getCommand (_command); 40 if (cmd != null) { 41 string[] array2 = new string[array.Length - 1]; 42 for (int i = 1; i < array.Length; i++) { 43 array2 [i - 1] = array [i]; 44 } 45 cmd.ExecuteRemote (_playerID, array2); 46 } else { 47 C_SendResult (console, "*** ERROR: unknown command '" + array [0] + "'"); 48 } 49 } 50 34 51 isCurrentCommandFromClient = false; 35 52 } … … 40 57 { 41 58 if (isCurrentCommandFromClient) { 42 console.gameManager.GetRPCNetworkView ().RPC ("RPC_Console", console.issuerOfCurrentClientCommand, new object[] 43 { 44 _line, 45 false 46 } 47 ); 59 CommonMappingFunctions.GetConnectionManager ().SendPackage (new NetPackage_ConsoleCmdClient (_line, false), new PackageDestinationSingleEntityID (issuerOfCurrentClientCommand)); 48 60 } else { 49 61 if (console.telnetServer != null && issuerOfCurrentCommand != null)
Note:
See TracChangeset
for help on using the changeset viewer.