fixed crash when starting animation in selfhost

This commit is contained in:
Yvonne Schmidt 2024-10-18 14:24:06 +02:00
parent 446cb43abb
commit 6c8da2f4a0

View File

@ -18,6 +18,7 @@ import pp.battleship.BattleshipConfig;
import pp.battleship.game.server.Player;
import pp.battleship.game.server.ServerGameLogic;
import pp.battleship.game.server.ServerSender;
import pp.battleship.message.client.AnimationFinishedMessage;
import pp.battleship.message.client.ClientMessage;
import pp.battleship.message.client.MapMessage;
import pp.battleship.message.client.ShootMessage;
@ -115,6 +116,7 @@ public class BattleshipSelfhostServer implements MessageListener<HostedConnectio
Serializer.registerClass(MapMessage.class);
Serializer.registerClass(ShootMessage.class);
Serializer.registerClass(EffectMessage.class);
Serializer.registerClass(AnimationFinishedMessage.class);
Serializer.registerClass(Battleship.class);
Serializer.registerClass(IntPoint.class);
Serializer.registerClass(Shot.class);
@ -123,6 +125,7 @@ public class BattleshipSelfhostServer implements MessageListener<HostedConnectio
private void registerListeners() {
myServer.addMessageListener(this, MapMessage.class);
myServer.addMessageListener(this, ShootMessage.class);
myServer.addMessageListener(this, AnimationFinishedMessage.class);
myServer.addConnectionListener(this);
}