Changeset 156
- Timestamp:
- Sep 3, 2014, 12:04:42 PM (10 years ago)
- Location:
- binary-improvements
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
r146 r156 38 38 public static void PlayerDisconnected (GameManager manager, int _clientId) { 39 39 try { 40 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId); 41 string steamId = CommonMappingFunctions.GetSteamID (ci); 42 Players players = PersistentContainer.Instance.Players; 43 if (players.SteamIDs.Contains(steamId)) 44 players[steamId].SetOffline(); 40 Player p = PersistentContainer.Instance.Players.GetPlayerByClientId(_clientId); 41 if (p != null) { 42 p.SetOffline(); 43 } 45 44 PersistentData.PersistentContainer.Instance.Save (); 46 45 } catch (Exception e) { -
binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs
r151 r156 59 59 } 60 60 Instance.dirtyChunks [cPos2] = realColors; 61 Log.Out ("Add Dirty: " + cPos2);61 //Log.Out ("Add Dirty: " + cPos2); 62 62 Instance.chunkSaveTimer.Stop (); 63 63 Instance.chunkSaveTimer.Start (); -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Web/ApiHandler.cs
r154 r156 26 26 resp.StatusCode = (int)HttpStatusCode.Forbidden; 27 27 } else { 28 foreach (KeyValuePair<string, WebAPI> kvp in apis) { 29 if (apiName.StartsWith (kvp.Key)) { 30 kvp.Value.HandleRequest (req, resp, user); 31 return; 28 try { 29 foreach (KeyValuePair<string, WebAPI> kvp in apis) { 30 if (apiName.StartsWith (kvp.Key)) { 31 kvp.Value.HandleRequest (req, resp, user); 32 return; 33 } 32 34 } 35 } catch (Exception e) { 36 resp.StatusCode = (int)HttpStatusCode.InternalServerError; 33 37 } 34 38 } -
binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs
r146 r156 35 35 } 36 36 37 public Player GetPlayerByClientId (int _clientid) 38 { 39 foreach (Player p in players.Values) { 40 if (p.ClientInfo.clientId == _clientid) { 41 return p; 42 } 43 } 44 return null; 45 } 46 37 47 public string GetSteamID (string _nameOrId, bool _ignoreColorCodes) 38 48 { -
binary-improvements/bin/Release/7dtd-server-fixes_version.txt
r154 r156 1 Version: 0.91.535 8.384351 Version: 0.91.5359.21630
Note:
See TracChangeset
for help on using the changeset viewer.