Added networking for dynamic objects

Added networking for dynamic objects
Fixed disconnecting players not being removed from player ids table
NetworkSynchronizer conditionally processes based on if any players are connected
Disabled AIStepper when game is connected to a socket
This commit is contained in:
Collin Smith
2019-12-22 17:38:16 -08:00
parent 5d51a1c160
commit ea040c318e
4 changed files with 11 additions and 4 deletions

View File

@ -113,6 +113,7 @@ public class ServerEntityFactory extends EntityFactory {
int id = createMonster(map, zone, monstats, x, y);
mDS1ObjectWrapper.create(id).set(preset.getDS1(), object);
if (object.path != null) mPathWrapper.create(id).path = object.path;
mNetworked.create(id);
return id;
}

View File

@ -531,8 +531,10 @@ public class GameScreen extends ScreenAdapter implements GameLoadingScreen.Loada
if (!DEBUG_TOUCHPAD && Gdx.app.getType() == Application.ApplicationType.Desktop) {
builder.with(new CursorMovementSystem());
}
if (socket == null) {
builder.with(new AIStepper());
}
builder
.with(new AIStepper())
.with(new Pathfinder())
.with(new SoundEmitterHandler())