This repository was archived by the owner on Oct 20, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
workers/unity/Assets/Fps/Scripts Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1- develop 63dd63098498785f9c565b0b3bddbc07abd4a1d0
1+ develop 9ea8fd462272a55c407bbfd23d0e94f0a8d95d9c
Original file line number Diff line number Diff line change @@ -83,11 +83,12 @@ private void ProcessDamageEvents()
8383 return ;
8484 }
8585
86+ var healthAuthority = GetComponentDataFromEntity < HealthComponent . HasAuthority > ( ) ;
8687 for ( var i = 0 ; i < healthModifiedEvents . Count ; ++ i )
8788 {
8889 ref readonly var healthEvent = ref healthModifiedEvents [ i ] ;
89- if ( componentUpdateSystem . GetAuthority ( healthEvent . EntityId , HealthComponent . ComponentId ) ==
90- Authority . NotAuthoritative )
90+ var entity = workerSystem . GetEntity ( healthEvent . EntityId ) ;
91+ if ( ! healthAuthority . Exists ( entity ) )
9192 {
9293 continue ;
9394 }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ private void OnClientUpdate(RotationUpdate rotation)
5353
5454 private void OnServerUpdate ( ServerResponse movement )
5555 {
56- if ( server . Authority != Authority . NotAuthoritative )
56+ if ( server . HasAuthority )
5757 {
5858 return ;
5959 }
You can’t perform that action at this time.
0 commit comments