This commit is contained in:
2025-01-13 13:23:52 +01:00
parent 91cdbab54a
commit d301d597e8
5 changed files with 203 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import (
"net"
"time"
"gitea.boner.be/bdnugget/goonscape/game"
"gitea.boner.be/bdnugget/goonscape/types"
pb "gitea.boner.be/bdnugget/goonserver/actions"
"google.golang.org/protobuf/proto"
@ -112,5 +113,9 @@ func HandleServerCommunication(conn net.Conn, playerID int32, player *types.Play
otherPlayers[state.PlayerId] = types.NewPlayer(state)
}
}
if g, ok := player.UserData.(*game.Game); ok && len(serverMessage.ChatMessages) > 0 {
g.Chat.HandleServerMessages(serverMessage.ChatMessages)
}
}
}