diff --git a/CAPI/python_exp/PyAPI/logic.py b/CAPI/python_exp/PyAPI/logic.py index dba37515..54b7625d 100644 --- a/CAPI/python_exp/PyAPI/logic.py +++ b/CAPI/python_exp/PyAPI/logic.py @@ -330,6 +330,8 @@ def __LoadBuffer(self, message: Message2Clients.MessageToClient) -> None: self.__bufferState.gameInfo = Proto2THUAI7.Protobuf2THUAI7GameInfo(message.all_message) self.__LoadBufferSelf(message) + if self.__playerType == THUAI7.Ship and isinstance(self.__bufferState.self, None): + return for item in message.obj_message: self.__LoadBufferCase(item) if Setting.Asynchronous(): @@ -347,7 +349,7 @@ def __LoadBuffer(self, message: Message2Clients.MessageToClient) -> None: self.__cvBuffer.notify() def __LoadBufferSelf(self, message: Message2Clients.MessageToClient) -> None: - if self.__playerID != 0: + if self.__playerType == THUAI7.PlayerType.Ship: for item in message.obj_message: if item.WhichOneof("message_of_obj") == "ship_message": if item.ship_message.player_id == self.__playerID: diff --git a/logic/Server/RpcServices.cs b/logic/Server/RpcServices.cs index 0b46c60c..d168bf86 100755 --- a/logic/Server/RpcServices.cs +++ b/logic/Server/RpcServices.cs @@ -186,34 +186,32 @@ public override async Task AddPlayer(PlayerMsg request, IServerStreamWriter