Fixed Position Looping and double spawn
This commit is contained in:
@@ -87,9 +87,9 @@ public class Chunk
|
||||
y + Data.faceChecks[f].y,
|
||||
z + Data.faceChecks[f].z + chunkPosition.z * Data.chunkWidth))))
|
||||
{
|
||||
if(!world.IsBlockTransparent(world.GetBlockID(new Vector3(x + chunkPosition.x * Data.chunkWidth,
|
||||
if(world.GetBlockID(new Vector3(x + chunkPosition.x * Data.chunkWidth,
|
||||
y,
|
||||
z + chunkPosition.z * Data.chunkWidth))))
|
||||
z + chunkPosition.z * Data.chunkWidth)) != 9)
|
||||
{
|
||||
for (int v = 0; v < 6; v++)
|
||||
{
|
||||
|
||||
@@ -110,19 +110,28 @@ public class World : MonoBehaviour
|
||||
//enqueue player position update to list
|
||||
public void UpdatePlayerPosition(Vector3 position, byte id)
|
||||
{
|
||||
playersPositionsToUpdate.Enqueue(new Player.PlayerPositionUpdateData(id, position, false));
|
||||
if(playersPositionsToUpdate.Count < 50)
|
||||
{
|
||||
playersPositionsToUpdate.Enqueue(new Player.PlayerPositionUpdateData(id, position, false));
|
||||
}
|
||||
}
|
||||
|
||||
//enqueue player rotation update to list
|
||||
public void UpdatePlayerRotation(Quaternion rotation, byte id)
|
||||
{
|
||||
playersRotationsToUpdate.Enqueue(new Player.PlayerRotationsUpdateData(id, rotation));
|
||||
if(playersRotationsToUpdate.Count < 50)
|
||||
{
|
||||
playersRotationsToUpdate.Enqueue(new Player.PlayerRotationsUpdateData(id, rotation));
|
||||
}
|
||||
}
|
||||
|
||||
//enqueue player create data to list
|
||||
public void AddPlayer(byte id)
|
||||
{
|
||||
playersToCreate.Enqueue(id);
|
||||
if(!otherPlayers.ContainsKey(id))
|
||||
{
|
||||
playersToCreate.Enqueue(id);
|
||||
}
|
||||
}
|
||||
|
||||
//creates the array for chunk objects
|
||||
|
||||
@@ -605,7 +605,7 @@ PlayerSettings:
|
||||
additionalCompilerArguments: {}
|
||||
platformArchitecture: {}
|
||||
scriptingBackend:
|
||||
Standalone: 0
|
||||
Standalone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
incrementalIl2cppBuild: {}
|
||||
|
||||
Reference in New Issue
Block a user