mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Renamed m_VisUpdateTime lastUpdateTime (#711)
This commit is contained in:
parent
a5ead70961
commit
77e5de7352
@ -31,7 +31,7 @@ public enum CheckMethod
|
|||||||
[Tooltip("Select only the Player's layer to avoid unnecessary SphereCasts against the Terrain, etc.")]
|
[Tooltip("Select only the Player's layer to avoid unnecessary SphereCasts against the Terrain, etc.")]
|
||||||
public LayerMask castLayers = ~0;
|
public LayerMask castLayers = ~0;
|
||||||
|
|
||||||
float m_VisUpdateTime;
|
float lastUpdateTime;
|
||||||
|
|
||||||
// OverlapSphereNonAlloc array to avoid allocations.
|
// OverlapSphereNonAlloc array to avoid allocations.
|
||||||
// -> static so we don't create one per component
|
// -> static so we don't create one per component
|
||||||
@ -46,10 +46,10 @@ void Update()
|
|||||||
if (!NetworkServer.active)
|
if (!NetworkServer.active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Time.time - m_VisUpdateTime > visUpdateInterval)
|
if (Time.time - lastUpdateTime > visUpdateInterval)
|
||||||
{
|
{
|
||||||
netIdentity.RebuildObservers(false);
|
netIdentity.RebuildObservers(false);
|
||||||
m_VisUpdateTime = Time.time;
|
lastUpdateTime = Time.time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user