Skip to content

Commit

Permalink
Update RPC and send player UUIDs and max slots in RPC requests
Browse files Browse the repository at this point in the history
  • Loading branch information
FluxCapacitor2 committed Dec 23, 2024
1 parent 4418457 commit 215f2d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/src/main/kotlin/com/bluedragonmc/server/Game.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ abstract class Game(val name: String, val mapName: String, val mode: String? = n
gameState = state.mapToRpcState()
openSlots = maxPlayers - players.size
joinable = state.canPlayersJoin
maxSlots = maxPlayers
}

internal val players: MutableList<Player> = CopyOnWriteArrayList()
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ okhttp = "4.10.0"
serialization = "1.5.0-RC"
tinylog = "2.6.2"
# Auto-generated GRPC/Protobuf messaging code
rpc = "fb16ef4cc5"
rpc = "e06867b34a"
# Agones SDK and its necessary runtime dependencies
agones-kt = "0.1.2"
grpc = "1.50.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class IncomingRPCHandlerImpl(serverPort: Int) : IncomingRPCHandler {
this.gameState = game.rpcGameState
this.instanceUuid = game.id
this.gameType = game.gameType
game.getPlayers().forEach { player ->
this.playerUuids.add(player.uuid.toString())
}
}
}
}
Expand Down

0 comments on commit 215f2d2

Please sign in to comment.