| Rev | Line | |
|---|
| [83] | 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using UnityEngine;
|
|---|
| 4 |
|
|---|
| [130] | 5 | namespace AllocsFixes
|
|---|
| [83] | 6 | {
|
|---|
| [130] | 7 | public class AllocsLogFunctions
|
|---|
| [83] | 8 | {
|
|---|
| [130] | 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);
|
|---|
| [103] | 15 |
|
|---|
| [130] | 16 | string ip = ci.networkPlayer.ipAddress;
|
|---|
| 17 | string name = string.Empty;
|
|---|
| [103] | 18 |
|
|---|
| [130] | 19 | if (ep != null)
|
|---|
| 20 | name = ep.EntityName;
|
|---|
| [103] | 21 |
|
|---|
| [130] | 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 | }
|
|---|
| [83] | 31 | }
|
|---|
| 32 | }
|
|---|
| 33 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.