提交修改

This commit is contained in:
Bob.Song
2026-04-15 20:23:23 +08:00
parent d945638997
commit a0fa4e6e9c
24 changed files with 2321 additions and 3918 deletions

View File

@@ -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)