当前位置:网站首页>After Huawei online battle service players quickly match, different players receive different lists of players in the same room

After Huawei online battle service players quickly match, different players receive different lists of players in the same room

2022-06-23 04:23:00 Huawei Developer Forum

Problem description

Huawei online battle service provides players with fast matching , Different players receive different lists of players in the same room . For example 1V1 Game mode , Two players pass Client.matchPlayer After matching successfully , In callback room The player list in the instance is inconsistent , Received by the owner room In the example, there is only 1 Players , Not received by the homeowner room In the case of 2 Players .

Problem analysis

Communicate with Huawei technicians to analyze the reasons :

In the process of player matching , Once the match is successful , In the backstage, a certain player will create a room as the owner , Another player joins the room . When the owner creates a room, he has only one player , So back room The example is that it has its own . Another player got it room The example is two players .

Solution

Client.matchPlayer After callback , If new players join the room , All other players will receive Room.onJoin Callback , It is recommended to call the refresh room interface in this callback Room.update, To ensure that all players get the latest room information .

 

The address of Huawei's bill of lading :

https://developer.huawei.com/consumer/cn/support/feedback/#/add/89?level2=201650609502456486

原网站

版权声明
本文为[Huawei Developer Forum]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206230235130943.html