diff --git a/src/components/ui/GameUI.tsx b/src/components/ui/GameUI.tsx
index c7a1b49..158a9dc 100644
--- a/src/components/ui/GameUI.tsx
+++ b/src/components/ui/GameUI.tsx
@@ -4,7 +4,6 @@ import { GameSettingsMenu } from "@/components/ui/GameSettingsMenu";
import { HandTrackingFallback } from "@/components/ui/HandTrackingFallback";
import { HandTrackingVisualizer } from "@/components/ui/HandTrackingVisualizer";
import { InteractPrompt } from "@/components/ui/InteractPrompt";
-import { RepairMovementLockIndicator } from "@/components/ui/RepairMovementLockIndicator";
import { Subtitles } from "@/components/ui/Subtitles";
import { TalkieDialogueOverlay } from "@/components/ui/TalkieDialogueOverlay";
@@ -13,7 +12,6 @@ export function GameUI(): React.JSX.Element {
<>
-
diff --git a/src/components/ui/RepairMovementLockIndicator.tsx b/src/components/ui/RepairMovementLockIndicator.tsx
deleted file mode 100644
index 4f8d825..0000000
--- a/src/components/ui/RepairMovementLockIndicator.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import { useCameraMode } from "@/hooks/debug/useCameraMode";
-import { useRepairMovementLocked } from "@/hooks/gameplay/useRepairMovementLocked";
-
-export function RepairMovementLockIndicator(): React.JSX.Element | null {
- const cameraMode = useCameraMode();
- const movementLocked = useRepairMovementLocked();
-
- if (cameraMode !== "player") return null;
- if (!movementLocked) return null;
-
- return (
-
-
- Déplacement verrouillé pendant la réparation
-
- );
-}
diff --git a/src/hooks/gameplay/useRepairMovementLocked.ts b/src/hooks/gameplay/useRepairMovementLocked.ts
deleted file mode 100644
index 36b951a..0000000
--- a/src/hooks/gameplay/useRepairMovementLocked.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { useGameStore } from "@/managers/stores/useGameStore";
-import type { MissionStep } from "@/types/gameplay/repairMission";
-
-export function useRepairMovementLocked(): boolean {
- return useGameStore((state) => {
- switch (state.mainState) {
- case "ebike":
- return isRepairMovementLocked(state.ebike.currentStep);
- case "pylon":
- return isRepairMovementLocked(state.pylon.currentStep);
- case "farm":
- return isRepairMovementLocked(state.farm.currentStep);
- case "intro":
- case "outro":
- return false;
- }
- });
-}
-
-function isRepairMovementLocked(step: MissionStep): boolean {
- return (
- step === "inspected" ||
- step === "fragmented" ||
- step === "scanning" ||
- step === "repairing" ||
- step === "reassembling" ||
- step === "done"
- );
-}
diff --git a/src/world/player/PlayerController.tsx b/src/world/player/PlayerController.tsx
index cfe3dd9..72cd0f2 100644
--- a/src/world/player/PlayerController.tsx
+++ b/src/world/player/PlayerController.tsx
@@ -23,7 +23,6 @@ import {
PLAYER_MAX_DELTA,
PLAYER_XZ_DAMPING_FACTOR,
} from "@/data/player/playerConfig";
-import { useRepairMovementLocked } from "@/hooks/gameplay/useRepairMovementLocked";
import { useTerrainHeightSampler } from "@/hooks/three/useTerrainHeight";
import { InteractionManager } from "@/managers/InteractionManager";
import { useGameStore } from "@/managers/stores/useGameStore";
@@ -154,9 +153,7 @@ export function PlayerController({
}: PlayerControllerProps): null {
const camera = useThree((state) => state.camera);
const sceneMode = useSceneMode();
- const movementLocked = useRepairMovementLocked();
const terrainHeight = useTerrainHeightSampler();
- const movementLockedRef = useRef(movementLocked);
const keys = useRef({ ...DEFAULT_KEYS });
const velocity = useRef(new THREE.Vector3());
const fallDuration = useRef(0);
@@ -249,17 +246,6 @@ export function PlayerController({
initializedRef.current = true;
}, [camera, initialLookAt, spawnPosition]);
- useEffect(() => {
- movementLockedRef.current = movementLocked;
-
- if (!movementLocked) return;
-
- keys.current = { ...DEFAULT_KEYS };
- wantsJump.current = false;
- velocity.current.setX(0);
- velocity.current.setZ(0);
- }, [movementLocked]);
-
useEffect(() => {
const interaction = InteractionManager.getInstance();
@@ -267,20 +253,11 @@ export function PlayerController({
if (isPlayerInputLocked()) return;
if (setMovementKey(keys.current, event.key, true)) {
- if (movementLockedRef.current) {
- keys.current = { ...DEFAULT_KEYS };
- }
event.preventDefault();
return;
}
if (event.key === JUMP_KEY) {
- if (movementLockedRef.current) {
- wantsJump.current = false;
- event.preventDefault();
- return;
- }
-
wantsJump.current = true;
event.preventDefault();
return;
@@ -386,7 +363,7 @@ export function PlayerController({
}
_wishDir.set(0, 0, 0);
- if (!movementLocked && !isEbikeBreakdown) {
+ if (!isEbikeBreakdown) {
if (keys.current.forward) _wishDir.add(_forward);
if (keys.current.backward) _wishDir.sub(_forward);
if (!isEbikeMounted) {