mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
spawn bots at same position
This commit is contained in:
parent
3510361d08
commit
3cd0c847a1
@ -178,15 +178,15 @@ public override void OnServerAddPlayer(NetworkConnectionToClient conn)
|
||||
{
|
||||
TestNTNetworkAuthenticator.AuthRequestMessage authData = (TestNTNetworkAuthenticator.AuthRequestMessage)conn.authenticationData;
|
||||
|
||||
Vector3 spawnPos = new Vector3(Random.Range(-20, 20), 5, Random.Range(-20, 20));
|
||||
//Vector3 spawnPos = new Vector3(Random.Range(-20, 20), 5, Random.Range(-20, 20));
|
||||
GameObject player;
|
||||
|
||||
if (authData.isBot)
|
||||
player = Instantiate(spawnPrefabs[1], spawnPos, Quaternion.identity);
|
||||
player = Instantiate(spawnPrefabs[1]);
|
||||
else
|
||||
player = Instantiate(playerPrefab, spawnPos, Quaternion.identity);
|
||||
player = Instantiate(playerPrefab);
|
||||
|
||||
player.transform.LookAt(new Vector3(0f, 5f, 0f));
|
||||
player.transform.LookAt(new Vector3(0f, 2f, 0f));
|
||||
|
||||
PlayerName playerName = player.GetComponent<PlayerName>();
|
||||
if (authData.isBot)
|
||||
|
Loading…
Reference in New Issue
Block a user