n9tro
n9tro
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
the issue was a multithreading issue, the package im using setup multithreading and i had no clue haha, i setup mutexes
9 replies
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
Some further notes, modifying the room variable directly in Handle propagates the changes, implying that the issue is in the RemovePlayer function, following the stack ind debug shows that its the same one, but for some reason the changes made by RemovePlayer dont propagate
9 replies
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
i beleive the issue is coming from RemovePlayer, changing the room internally seems to not propagate... but if i change it from inside Handle it works
9 replies
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
No description
9 replies
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
I just tried passing in the index of the team instead of a copy and still doesnt work, issue is somewhere else
9 replies
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
My suspicion is that GetPlayerTeam inside RemovePlayer is returning a copy, instead it should return a reference
9 replies
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
we have GameManager.Instance.Rooms which is a List<GameRoom>. in the case that im testing, room.PlayerCount is 2, when RemovePlayer gets called room.PlayerCount is 1. but when the function HandleRoomUpdate gets the room, PlayerCount is 2. the change from RemovePlayer is not propagating
9 replies
CC#
Created by n9tro on 5/27/2024 in #help
List changed by first function gets reset by second function
The first function, Handle, is calling the second function RemovePlayer, after that Handle calls HandleRoomUpdate
9 replies