提交修改
This commit is contained in:
@@ -178,14 +178,7 @@ public class Rope : MonoBehaviour
|
||||
private bool _isCulledByVisibility;
|
||||
private int _tIdleSubdiv = -1;
|
||||
private int _tMovingSubdiv = -1;
|
||||
|
||||
private FRod _rod;
|
||||
public void Init(FRod rod)
|
||||
{
|
||||
_rod = rod;
|
||||
if (Application.isPlaying)
|
||||
RefreshVisibilityState(true);
|
||||
}
|
||||
|
||||
|
||||
// Catmull t caches(只缓存 idle/moving 两档,减少每帧重复乘法)
|
||||
private struct TCaches
|
||||
@@ -250,15 +243,7 @@ public class Rope : MonoBehaviour
|
||||
_startTr = startAnchor ? startAnchor.transform : null;
|
||||
_endTr = endAnchor ? endAnchor.transform : null;
|
||||
}
|
||||
|
||||
private bool ShouldAlwaysSimulate()
|
||||
{
|
||||
if (!localOwnerAlwaysSimulate)
|
||||
return false;
|
||||
|
||||
var owner = _rod?.PlayerItem?.Owner;
|
||||
return owner == null || owner.IsSelf;
|
||||
}
|
||||
|
||||
|
||||
private Transform GetActiveCameraTransform()
|
||||
{
|
||||
@@ -312,7 +297,7 @@ public class Rope : MonoBehaviour
|
||||
|
||||
private void RefreshVisibilityState(bool force = false)
|
||||
{
|
||||
if (!cullRemoteRopeWhenInvisible || ShouldAlwaysSimulate())
|
||||
if (!cullRemoteRopeWhenInvisible)
|
||||
{
|
||||
_isCulledByVisibility = false;
|
||||
if (_lineRenderer)
|
||||
|
||||
Reference in New Issue
Block a user