Added broken interpolation

This commit is contained in:
Thomas
2020-09-11 15:41:49 +02:00
parent 6ecbbdff42
commit 5fcc664f8f
7 changed files with 56 additions and 26 deletions

View File

@@ -138,7 +138,7 @@ public class GameManager implements IGameManager {
// Broadcast une fois sur deux
if (game.isUpdateNeeded()) {
GameUpdate update = new GameUpdate();
update.setTime(game.getLastUpdate());
update.setTime(game.getLastUpdate().toEpochMilli());
update.setPlayers(game.getPlayers().values());
SocketUtils.broadcast(game, "gameUpdate", new ObjectMapper().writeValueAsString(update));
game.setUpdateNeeded(false);

View File

@@ -1,6 +1,5 @@
package gltronic.tronio.model;
import java.time.Instant;
import java.util.Collection;
import org.springframework.stereotype.Component;
@@ -13,5 +12,5 @@ import lombok.Setter;
@Component
public class GameUpdate {
private Collection<Player> players;
private Instant time;
private Long time;
}