Fixed bug

This commit is contained in:
2026-02-01 15:42:33 +01:00
parent d03d06b5a7
commit a8b395b1d3
4 changed files with 973 additions and 966 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -171,7 +171,7 @@ namespace Marro.PacManUdon
SetDirection(direction * -1); SetDirection(direction * -1);
Debug.Log($"{gameObject} turned around to direction {GetDirection()}"); Debug.Log($"{gameObject} turned around to direction {GetDirection()}");
turnAroundSoon = false; turnAroundSoon = false;
return GridMoverTools.PositionToGrid(nextPosition); return nextPosition;
} }
if (kinematic) if (kinematic)

View File

@@ -194,6 +194,7 @@ namespace Marro.PacManUdon
// Debug.Log($"{gameObject} GhostCaughtQueue with ghost {ghost}"); // Debug.Log($"{gameObject} GhostCaughtQueue with ghost {ghost}");
//networkManager.SendEventSoon(NetworkEventType.GhostUpdate); //networkManager.SendEventSoon(NetworkEventType.GhostUpdate);
ghostScaredQueue.Add(ghost); ghostScaredQueue.Add(ghost);
GhostCaughtExecute(ghost); GhostCaughtExecute(ghost);
} }

View File

@@ -256,6 +256,11 @@ namespace Marro.PacManUdon
SyncedDeltaTime = Time.fixedDeltaTime; SyncedDeltaTime = Time.fixedDeltaTime;
nextUpdateTime = SyncedTime; nextUpdateTime = SyncedTime;
if (!Synced)
{
RequestEvent(NetworkEventType.FullSync); // See if we can sync up
}
Ready = true; Ready = true;
Debug.Log($"({nameof(PacManUdon)} {nameof(NetworkManager)}) Initialized, time offset: {offsetTime}"); Debug.Log($"({nameof(PacManUdon)} {nameof(NetworkManager)}) Initialized, time offset: {offsetTime}");