Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
659464d3b4 | ||
|
|
06cd94b24c |
@@ -1,3 +1,10 @@
|
||||
## [4.65.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.65.0...v4.65.1) (2025-10-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **complement-race:** use sendMove with correct parameters for position updates ([06cd94b](https://github.com/antialias/soroban-abacus-flashcards/commit/06cd94b24cdd9dbd36fb5800c9ba7be194f7eed0))
|
||||
|
||||
## [4.65.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.64.2...v4.65.0) (2025-10-22)
|
||||
|
||||
|
||||
|
||||
@@ -566,20 +566,29 @@ export function ComplementRaceProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
// Broadcast position to server for multiplayer ghost trains
|
||||
useEffect(() => {
|
||||
if (!compatibleState.isGameActive || compatibleState.style !== 'sprint') {
|
||||
if (!compatibleState.isGameActive || compatibleState.style !== 'sprint' || !localPlayerId) {
|
||||
return
|
||||
}
|
||||
|
||||
// Send position update every 200ms
|
||||
const interval = setInterval(() => {
|
||||
makeMove({
|
||||
sendMove({
|
||||
type: 'UPDATE_POSITION',
|
||||
playerId: localPlayerId,
|
||||
userId: viewerId || '',
|
||||
data: { position: clientPosition },
|
||||
})
|
||||
} as ComplementRaceMove)
|
||||
}, 200)
|
||||
|
||||
return () => clearInterval(interval)
|
||||
}, [compatibleState.isGameActive, compatibleState.style, clientPosition, makeMove])
|
||||
}, [
|
||||
compatibleState.isGameActive,
|
||||
compatibleState.style,
|
||||
clientPosition,
|
||||
localPlayerId,
|
||||
viewerId,
|
||||
sendMove,
|
||||
])
|
||||
|
||||
// Keep lastLogRef for future debugging needs
|
||||
// (removed debug logging)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "soroban-monorepo",
|
||||
"version": "4.65.0",
|
||||
"version": "4.65.1",
|
||||
"private": true,
|
||||
"description": "Beautiful Soroban Flashcard Generator - Monorepo",
|
||||
"workspaces": [
|
||||
|
||||
Reference in New Issue
Block a user