l3mpire / lemverse

The first-ever coworking metaverse
https://app.lemverse.com
GNU Affero General Public License v3.0
148 stars 40 forks source link

Fix call not closing when passing to fast near user #207

Closed alimtunc closed 1 year ago

alimtunc commented 1 year ago

Actually, if you pass to fast near user, sometimes the connection can stay open. This is due to the way we check the distance between the users. We pass a user object between all function in the process and when finally we check if we have to keep the connection open, the user may have already moved but we have the default value when the process began.

The fix is really simple, just fetching the user current position when we need to check the distances between them.

Donorhan commented 1 year ago

This is a great fix, thank you so much!