Progress network character controls
This commit is contained in:
1 parent
01f38a19a1
commit
0cb70d4042
51 files changed
+297
-2093
No files matched your search
@@ -11,6 +11,7 @@ namespace Client
|
||||
{
|
||||
private EntityQuery _pendingNetworkIdQuery;
|
||||
|
||||
[BurstCompile]
|
||||
public void OnCreate(ref SystemState state)
|
||||
{
|
||||
//Get all entities connected to the server (having networkID), but not in game yet (no NetworkStreamInGame)
|
||||
@@ -22,11 +23,16 @@ namespace Client
|
||||
state.RequireForUpdate<ClientTeamRequest>();
|
||||
}
|
||||
|
||||
|
||||
[BurstCompile]
|
||||
public void OnUpdate(ref SystemState state)
|
||||
{
|
||||
//Get Requested team and all network ids that want to join
|
||||
var teamrequest = SystemAPI.GetSingleton<ClientTeamRequest>();
|
||||
var ecb = new EntityCommandBuffer(Allocator.Temp);
|
||||
|
||||
var ecb = SystemAPI.GetSingletonRW<EndSimulationEntityCommandBufferSystem.Singleton>().ValueRW
|
||||
.CreateCommandBuffer(state.WorldUnmanaged);
|
||||
|
||||
var pendingNetworkIds = _pendingNetworkIdQuery.ToEntityArray(Allocator.Temp);
|
||||
|
||||
foreach (var pendingNetworkId in pendingNetworkIds)
|
||||
@@ -49,9 +55,6 @@ namespace Client
|
||||
TargetConnection = pendingNetworkId
|
||||
});
|
||||
}
|
||||
|
||||
//Broadcast Rpc - playback disposes of ecb
|
||||
ecb.Playback(state.EntityManager);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user