Changeset 203 for binary-improvements/7dtd-server-fixes/src/CustomCommands
- Timestamp:
- Nov 22, 2014, 10:54:05 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/CustomCommands
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/CustomCommands/Kill.cs
r130 r203 36 36 37 37 EntityPlayer p = CommonMappingFunctions.GetEntityPlayer (ci); 38 p.DamageEntity (new DamageSource (EnumDamageSourceType.Bullet), 9999 );38 p.DamageEntity (new DamageSource (EnumDamageSourceType.Bullet), 9999, false); 39 39 m_Console.SendResult ("Killed player " + _params [0]); 40 40 } catch (Exception e) { -
binary-improvements/7dtd-server-fixes/src/CustomCommands/ListPlayersExtended.cs
r164 r203 36 36 ++num, 37 37 ". id=", 38 current.Value.fd008e,38 // current.Value.4E2AA, 39 39 ", ", 40 40 current.Value.EntityName, … … 44 44 current.Value.rotation, 45 45 ", remote=", 46 current.Value.fd00b1,46 // current.Value.fd00b1, 47 47 ", health=", 48 48 current.Value.Health, -
binary-improvements/7dtd-server-fixes/src/CustomCommands/TeleportPlayer.cs
r189 r203 2 2 using System; 3 3 using System.Collections.Generic; 4 using System.Reflection; 4 5 using UnityEngine; 5 6 … … 8 9 public class TeleportPlayer : ConsoleCommand 9 10 { 11 private MethodInfo NetConnection_SendPackage = null; 12 10 13 public TeleportPlayer (ConsoleSdtd cons) : base(cons) 11 14 { 15 Type typeClientInfo = Assembly.GetAssembly (typeof(ClientInfo)).GetType ("ClientInfo"); 16 Type typeNetConnection = typeClientInfo.GetField ("netConnection").FieldType.GetElementType (); 17 MethodInfo[] mis = typeNetConnection.GetMethods (); 18 foreach (MethodInfo mi in mis) { 19 ParameterInfo[] pis = mi.GetParameters (); 20 if (pis.Length == 1) { 21 if (typeof (Package).Equals (pis[0].ParameterType)) { 22 NetConnection_SendPackage = mi; 23 } 24 } 25 } 12 26 } 13 27 … … 72 86 NetPackage_EntityPosAndRot pkg = new NetPackage_EntityPosAndRot (p1.Entity); 73 87 74 p1.ClientInfo.netConnection [0].Send (pkg); 88 if (NetConnection_SendPackage != null) { 89 NetConnection_SendPackage.Invoke (p1.ClientInfo.netConnection [0], new object[] {pkg}); 90 } 75 91 } 76 92 } catch (Exception e) {
Note:
See TracChangeset
for help on using the changeset viewer.