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>
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
/// <summary>
|
|
/// Free-fly camera mode. The player is frozen in place, painting is off, and a dedicated
|
|
/// freecam (<see cref="FreeCamController"/> + its own CinemachineCamera) takes over: fly the
|
|
/// camera through the map with WASD/Q/E and the mouse, colliding with world geometry like the
|
|
/// player. The orbit camera input is disabled while here so it doesn't fight for the cursor.
|
|
/// </summary>
|
|
public class FreeCamMode : GameMode
|
|
{
|
|
public override string DisplayName => "Free Cam";
|
|
|
|
public override void Enter()
|
|
{
|
|
// Keep the player component alive (gravity/grounding) but reject input, like Paint mode.
|
|
SetPlayerControl(false);
|
|
SetPainting(false);
|
|
SetOrbitInputEnabled(false);
|
|
|
|
if (Manager.FreeCam)
|
|
Manager.FreeCam.SetActive(true);
|
|
}
|
|
|
|
public override void Exit()
|
|
{
|
|
// Modes are Enter-only, so freecam must undo its own camera takeover here; the next mode's
|
|
// Enter restores the player/painter/look-mode state.
|
|
if (Manager.FreeCam)
|
|
Manager.FreeCam.SetActive(false);
|
|
|
|
SetOrbitInputEnabled(true);
|
|
}
|
|
}
|