fix(know-your-world): enable hot/cold only for current player in turn mode
In turn-based multiplayer, hot/cold feedback should only be active for the player whose turn it is. Previously, all players with fine pointers would get hot/cold feedback regardless of turn, which could be confusing. Added turn check: (gameMode !== 'turn-based' || currentPlayer === localPlayerId) This matches the pattern used elsewhere in the component for cursor broadcasting and other turn-based restrictions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -767,7 +767,12 @@ export function MapRenderer({
|
|||||||
lastFeedbackType: hotColdFeedbackType,
|
lastFeedbackType: hotColdFeedbackType,
|
||||||
getSearchMetrics,
|
getSearchMetrics,
|
||||||
} = useHotColdFeedback({
|
} = useHotColdFeedback({
|
||||||
enabled: assistanceAllowsHotCold && hotColdEnabled && hasAnyFinePointer,
|
// In turn-based mode, only enable hot/cold for the player whose turn it is
|
||||||
|
enabled:
|
||||||
|
assistanceAllowsHotCold &&
|
||||||
|
hotColdEnabled &&
|
||||||
|
hasAnyFinePointer &&
|
||||||
|
(gameMode !== 'turn-based' || currentPlayer === localPlayerId),
|
||||||
targetRegionId: currentPrompt,
|
targetRegionId: currentPrompt,
|
||||||
isSpeaking,
|
isSpeaking,
|
||||||
mapName: hotColdMapName,
|
mapName: hotColdMapName,
|
||||||
@@ -2695,9 +2700,7 @@ export function MapRenderer({
|
|||||||
|
|
||||||
// Auto-zoom based on regions at cursor position (same as map drag behavior)
|
// Auto-zoom based on regions at cursor position (same as map drag behavior)
|
||||||
// Filter out found regions from zoom calculations
|
// Filter out found regions from zoom calculations
|
||||||
const unfoundRegionObjects = detectedRegionObjects.filter(
|
const unfoundRegionObjects = detectedRegionObjects.filter((r) => !regionsFound.includes(r.id))
|
||||||
(r) => !regionsFound.includes(r.id)
|
|
||||||
)
|
|
||||||
|
|
||||||
// Calculate optimal zoom for the new cursor position
|
// Calculate optimal zoom for the new cursor position
|
||||||
const zoomSearchResult = findOptimalZoom({
|
const zoomSearchResult = findOptimalZoom({
|
||||||
|
|||||||
Reference in New Issue
Block a user