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