Refactor scripts: dedup remainder, remove dead code, perf hardening
Iteration 4 over Assets/Scripts (no component/file splits, no Unity assets touched): Dedup: - Route inline cursor-release, material guards, Ctrl-held and undo/redo input through existing InputUtil / SetMatFloat helpers - Add ungated InputUtil.KeyPressedThisFrame; GameplayKeyPressed builds on it - Unify FindDeep/FindDeepChild into GeometryUtil.FindDeep Dead code / stale docs: - Remove unused code-gen bake path (HsvColorPicker.Build, PaintHud factory) - Drop unreferenced symbols (SubPhaseChanged event, LocalPhaseDuration, IsLocalSceneMain, MouseSensitivity.Changed, IsPaused, InSession, NetworkControlled, PreviousPose, JointCount, voxel-count accessors) - Fix incorrect PlayerRole / PaintHud / Pick / PlayerPose docs Perf / robustness (behaviour-neutral): - ConcealmentMeter.Evaluate: reuse vertex/topology buffers, two-pointer crossing count - BuildMeshCaches: alloc-free vertex copy, cached topology/UVs - Guard all PlayerPaintSync LogSync sites behind logSync - Cache LocalViewerIsHunter / controller / CanShoot / TypingGuard lookups; dedup LocalIsHunter with MatchHud - Change-guard RefreshEmissionColor and HeroCutout.Disarm - Cache scene/countdown string comparisons per frame - Grow NonAlloc buffers and log-once on saturation Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
2243cc823e
commit
382bfb36df
32 files changed
+292
-348
No files matched your search
@@ -121,9 +121,6 @@ public class PlayerPoseController : MonoBehaviour
|
||||
/// <summary>Locomotion category resolved this frame (which clip the active pose is playing). The owner publishes it for network sync.</summary>
|
||||
public Locomotion CurrentLocomotion => _currentLocomotion;
|
||||
|
||||
/// <summary>True once this avatar is driven by replicated network state instead of local input/physics.</summary>
|
||||
public bool NetworkControlled => _networkControlled;
|
||||
|
||||
/// <summary>
|
||||
/// Switches this avatar to network-driven animation: local input, the sprint-reset, the per-pose
|
||||
/// collision capsule and camera framing are all skipped; pose index and locomotion are supplied by
|
||||
@@ -248,9 +245,6 @@ public class PlayerPoseController : MonoBehaviour
|
||||
/// <summary>Advances to the next pose, wrapping at the end of the list.</summary>
|
||||
public void NextPose() => SetPoseIndex(_currentIndex + 1);
|
||||
|
||||
/// <summary>Steps back to the previous pose, wrapping at the start of the list.</summary>
|
||||
public void PreviousPose() => SetPoseIndex(_currentIndex - 1);
|
||||
|
||||
/// <summary>Selects a pose by index, wrapping into range so cycling never goes out of bounds.</summary>
|
||||
public void SetPoseIndex(int index) => _currentIndex = WrapIndex(index);
|
||||
|
||||
|
||||
Reference in new issue
Block a user