Closed iwishiknewcoding closed 2 years ago
No worries, this was bound to happen, this is pretty difficult to test myself because I don't have a room running where I can test stuff. Will look into this quickly
let me know if I can help somehow
How did you test this? FYI, if you open a room on your browser and open consecutively 6-7 different tabs for each player, it will not work. Since the PlayerComposition object (bad name, want to change it one day) works with the auth property, it will mess up the computation of the GK ticks. If you clear your localStorage before opening a new tab, you'll get a new auth for each player and avoid such problem. I've followed the procedure I just described and played 2v2, didn't have any problem with GK ticks.
I've tested this in a live room with different people, I am aware of the PlayerComposition working with the auth. Initially, the GKTicks was fine and it was showing the correct GKs, but after a bit, it started to show wrong players 🙁 and the GKTicks stopped incrementing in some cases (actually, all the cases when I was monitoring it). Not very helpful, I know. I will try to collect some more information.
Turns out it was a false alarm, sorry. I'm running two different rooms with your codes customised in two different ways. When I was adding the CS logic based on your commit, I did it correctly in one of the rooms, but missed to call handleGK()
in getGameStats()
which is fired on GameTick. 🙁 Hence the GKTicks not incrementing.
Anyways, closing this issue now. Thanks
the majority of the time, the
getGK()
function returns the wrong player in 3v3 matches (didn't check in 2v2). The reason I think is because for some cases theGKTicks
is not incrementing. Though I was not able to find the pattern.