mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-28 18:59:47 +01:00
fixed bug of chrashing servers when shell hits a target
This commit is contained in:
parent
0cdd345ab5
commit
1f5c8ba4a6
@ -23,7 +23,6 @@ import com.simsilica.lemur.style.BaseStyles;
|
|||||||
import pp.battleship.client.gui.BattleAppState;
|
import pp.battleship.client.gui.BattleAppState;
|
||||||
import pp.battleship.client.gui.EditorAppState;
|
import pp.battleship.client.gui.EditorAppState;
|
||||||
import pp.battleship.client.gui.SeaAppState;
|
import pp.battleship.client.gui.SeaAppState;
|
||||||
import pp.battleship.client.GameMusic;
|
|
||||||
import pp.battleship.game.client.BattleshipClient;
|
import pp.battleship.game.client.BattleshipClient;
|
||||||
import pp.battleship.game.client.ClientGameLogic;
|
import pp.battleship.game.client.ClientGameLogic;
|
||||||
import pp.battleship.game.client.ServerConnection;
|
import pp.battleship.game.client.ServerConnection;
|
||||||
|
@ -18,6 +18,7 @@ import pp.battleship.BattleshipConfig;
|
|||||||
import pp.battleship.game.server.Player;
|
import pp.battleship.game.server.Player;
|
||||||
import pp.battleship.game.server.ServerGameLogic;
|
import pp.battleship.game.server.ServerGameLogic;
|
||||||
import pp.battleship.game.server.ServerSender;
|
import pp.battleship.game.server.ServerSender;
|
||||||
|
import pp.battleship.message.client.AnimationFinishedMessage;
|
||||||
import pp.battleship.message.client.ClientMessage;
|
import pp.battleship.message.client.ClientMessage;
|
||||||
import pp.battleship.message.client.MapMessage;
|
import pp.battleship.message.client.MapMessage;
|
||||||
import pp.battleship.message.client.ShootMessage;
|
import pp.battleship.message.client.ShootMessage;
|
||||||
@ -115,6 +116,7 @@ public class BattleshipServer implements MessageListener<HostedConnection>, Conn
|
|||||||
Serializer.registerClass(MapMessage.class);
|
Serializer.registerClass(MapMessage.class);
|
||||||
Serializer.registerClass(ShootMessage.class);
|
Serializer.registerClass(ShootMessage.class);
|
||||||
Serializer.registerClass(EffectMessage.class);
|
Serializer.registerClass(EffectMessage.class);
|
||||||
|
Serializer.registerClass(AnimationFinishedMessage.class);
|
||||||
Serializer.registerClass(Battleship.class);
|
Serializer.registerClass(Battleship.class);
|
||||||
Serializer.registerClass(IntPoint.class);
|
Serializer.registerClass(IntPoint.class);
|
||||||
Serializer.registerClass(Shot.class);
|
Serializer.registerClass(Shot.class);
|
||||||
@ -123,6 +125,7 @@ public class BattleshipServer implements MessageListener<HostedConnection>, Conn
|
|||||||
private void registerListeners() {
|
private void registerListeners() {
|
||||||
myServer.addMessageListener(this, MapMessage.class);
|
myServer.addMessageListener(this, MapMessage.class);
|
||||||
myServer.addMessageListener(this, ShootMessage.class);
|
myServer.addMessageListener(this, ShootMessage.class);
|
||||||
|
myServer.addMessageListener(this, AnimationFinishedMessage.class);
|
||||||
myServer.addConnectionListener(this);
|
myServer.addConnectionListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user