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:
parent
c0f50c53dc
commit
f5ce53efc0
|
|
@ -767,7 +767,12 @@ export function MapRenderer({
|
|||
lastFeedbackType: hotColdFeedbackType,
|
||||
getSearchMetrics,
|
||||
} = 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,
|
||||
isSpeaking,
|
||||
mapName: hotColdMapName,
|
||||
|
|
@ -2695,9 +2700,7 @@ export function MapRenderer({
|
|||
|
||||
// Auto-zoom based on regions at cursor position (same as map drag behavior)
|
||||
// Filter out found regions from zoom calculations
|
||||
const unfoundRegionObjects = detectedRegionObjects.filter(
|
||||
(r) => !regionsFound.includes(r.id)
|
||||
)
|
||||
const unfoundRegionObjects = detectedRegionObjects.filter((r) => !regionsFound.includes(r.id))
|
||||
|
||||
// Calculate optimal zoom for the new cursor position
|
||||
const zoomSearchResult = findOptimalZoom({
|
||||
|
|
|
|||
Loading…
Reference in New Issue