Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.41k forks source link

Update hub-channel.js #6369

Closed Fi1osof closed 10 months ago

Fi1osof commented 1 year ago

Fix canEnterRoom method. Should be <= instead <, cause roomEntrySlotCount includes current user. Last user can not enter.

keianhzo commented 11 months ago

I think is working correctly for what I can see. roomEntrySlotCount is the number of currently in-room clients and it has to be smaller than the room max clients number in hub.room_size otherwise we would allow hub.room_size + 1 clients connected. Let me know if I missed anything.

Fi1osof commented 10 months ago

@keianhzo let hub.room_size = 3 currently roomEntrySlotCount = 2 and < hub.room_size (3). OK. But in this case in room will be never 3 users (cause candidate can not enter room). So room_size === 2?