Added broken interpolation
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user