Changeset 203 for binary-improvements/7dtd-server-fixes/src
- Timestamp:
- Nov 22, 2014, 10:54:05 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
r198 r203 8 8 public class AllocsLogFunctions 9 9 { 10 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)10 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile) 11 11 { 12 12 try { -
binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs
r182 r203 18 18 // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 19 20 [assembly: AssemblyVersion("0. 093.*")]20 [assembly: AssemblyVersion("0.100.*")] 21 21 22 22 // The following attributes are used to specify the signing key for the assembly, -
binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs
r144 r203 2 2 using System.Collections.Generic; 3 3 using System.Text.RegularExpressions; 4 using ManagedSteam.SteamTypes;4 using Steamworks; 5 5 6 6 namespace AllocsFixes … … 42 42 public static string GetSteamID (ClientInfo _ci) 43 43 { 44 return S ingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (GetPlayerName (_ci));44 return Steam.Authentication.Server.GetPlayerId (GetPlayerName (_ci)); 45 45 } 46 46 47 47 public static string GetSteamID (string _playerName) 48 48 { 49 return S ingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (_playerName);49 return Steam.Authentication.Server.GetPlayerId (_playerName); 50 50 } 51 51 … … 158 158 { 159 159 try { 160 Dictionary<string, object> uToID = Authenticator.Instance.usersToIDs;161 foreach (KeyValuePair<string, object> kvp in uToID) {162 string curId = string.Empty + ((SteamID)kvp.Value).AsUInt64;160 Dictionary<string, CSteamID> uToID = Steam.Authentication.Server.usersToIDs; 161 foreach (KeyValuePair<string, CSteamID> kvp in uToID) { 162 string curId = string.Empty + kvp.Value.m_SteamID; 163 163 if (curId.Equals (_steamId)) { 164 164 return GetClientInfoFromPlayerName (kvp.Key, false); -
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.