admin and Claude Opus 4.8
382bfb36df
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 >
2026-07-02 13:33:18 +02:00
admin and Claude Fable 5
2243cc823e
Refactor: extract shared helpers across scripts, trim remaining doc redundancy
...
Deduplication pass (44 extractions):
- New SmoothedLook: shared smoothed yaw/pitch look tick + view seeding
(FirstPersonController, FreeCamController)
- New CharacterTeleport: disable-CC-around-teleport idiom (rescue,
owner position apply, free-cam sync)
- New GeometryUtil: RescaleToUnitScale + TransformBounds (concealment
meter/volume, skinned collider baker)
- Paint family: canonical map read/write shared between Net and
Persistence, snapshot decode, backend stroke dispatch, RebuildBackend,
ResolveSeed, chunked RPC send/gate/copy, CamoKnobs/HeightKnobs
aggregates, SanitizeFileKey, NewMaskTexture, AdoptAlbedo, FindSlider
- Player/modes: GameMode SetPlayerControl/SetPainting/SetOrbitInputEnabled,
InputUtil.GameplayKeyPressed, NearestClimbHit, ComputeXRay delegates to
ComputeResolutionFreeze, FingerIK TryInPlaneAngle
- Match/misc: UnhookSessionCallbacks, SendEmptyNamedMessage, SwapScenes,
RunSessionOpAsync, CovarianceEigen, CollectClusterPoints, MatchHud
GUIStyle cache, HsvColorPicker rehook, VoxelCenter
Documentation pass: remove 6 triplicated doc blocks and 2 restating
inline comments left after the previous reduction.
Behavior-neutral; hot-path rasterizer loops intentionally untouched.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-02 12:33:48 +02:00
admin and Claude Opus 4.8
882d30797e
Refactor: dedupe input reads, material-property guards, button hooks
...
Extract byte-identical duplicated code into shared helpers (behaviour-neutral):
- New InputUtil.cs: single source for mouse-delta/scroll/cursor-lock, modifier
and mouse-button reads, previously copied verbatim across camera controllers,
MeshPainter, FirstPersonMode and PlayerCharacterController.
- GetMatFloat/SetMatFloat replace the 12x material-instance + HasProperty guard
pattern for the camo/height float properties.
- Route two inline button hooks through the existing Hook() helper.
Bespoke variants deliberately kept local (FreeCam SprintHeld = LeftShift only,
MeshPainter.TryGetMouse with out-params).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-07-02 09:20:40 +02:00