Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using UnityEngine;
|
---|
4 |
|
---|
5 | namespace AllocsFixes
|
---|
6 | {
|
---|
7 | public class AllocsLogFunctions
|
---|
8 | {
|
---|
9 | public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
|
---|
10 | {
|
---|
11 | try {
|
---|
12 | ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId);
|
---|
13 | int entityId = CommonMappingFunctions.GetEntityID (ci);
|
---|
14 | EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci);
|
---|
15 |
|
---|
16 | string ip = ci.networkPlayer.ipAddress;
|
---|
17 | string name = string.Empty;
|
---|
18 |
|
---|
19 | if (ep != null)
|
---|
20 | name = ep.EntityName;
|
---|
21 |
|
---|
22 | Log.Out ("Player connected, clientid=" + _clientId +
|
---|
23 | ", entityid=" + entityId +
|
---|
24 | ", name=" + name +
|
---|
25 | ", steamid=" + CommonMappingFunctions.GetSteamID (ci) +
|
---|
26 | ", ip=" + ip
|
---|
27 | );
|
---|
28 | } catch (Exception e) {
|
---|
29 | Log.Out ("Error in RequestToSpawnPlayer: " + e);
|
---|
30 | }
|
---|
31 | }
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.