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>
30 lines
897 B
C#
30 lines
897 B
C#
/// <summary>
|
|
/// Player stands still, the mesh is painted with the left mouse button. The
|
|
/// camera orbits only while the right mouse button is held, and the middle
|
|
/// mouse button pans the framing (a temporary offset to line up the model).
|
|
/// </summary>
|
|
public class PaintMode : GameMode
|
|
{
|
|
public override string DisplayName => "Paint";
|
|
|
|
public override void Enter()
|
|
{
|
|
SetPlayerControl(false);
|
|
|
|
if (Manager.CameraInput)
|
|
{
|
|
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.HoldRightMouseButton;
|
|
Manager.CameraInput.PanEnabled = true;
|
|
}
|
|
|
|
SetPainting(true);
|
|
}
|
|
|
|
public override void Exit()
|
|
{
|
|
// Leaving paint mode releases the middle-mouse pan; the orbit input then eases the framing home.
|
|
if (Manager.CameraInput)
|
|
Manager.CameraInput.PanEnabled = false;
|
|
}
|
|
}
|