boorik / smartfox-haxe-client

haxe openfl client for smartfoxserver
MIT License
18 stars 14 forks source link

fixed: user ref count never increased #18

Closed rewb0rn closed 6 years ago

rewb0rn commented 6 years ago

Same thing like the previous pull request, only this time when adding a user: The library was using _roomRefCount.set(user,n++) which first sets the value and then increments it. In practice that means the user count is always 1 and never increased and therefore the users are currently removed too early. This problem was not visible before because previously, users were never removed at all. With my last pull request however, they were now removed too early. This commit fixes the problem.