ubc-minetest-classroom / minetest_classroom

Repo for Mintest Classroom game
GNU General Public License v3.0
10 stars 6 forks source link

Compass HUD not displaying correctly in multiplayer mode #133

Closed pauldpickell closed 2 years ago

pauldpickell commented 2 years ago

Describe the bug Title.

To Reproduce Steps to reproduce the behavior:

  1. Start multiplayer server.
  2. Two players join the server.
  3. Left-click to activate first sequence in compass HUD and it displays quickly then disappears. Cannot proceed to "unfold" the compass.
  4. One player leaves the server and now the compass HUD element works again as expected.

Expected behavior Should be able to left-click to see the closed compass, left-click again to see the "unfolded" compass. Then right-click to access the compass settings.

Desktop (please complete the following information):

Lowie375 commented 2 years ago

The fix for this is to refactor the compass so that variables like open_HUD_showing, mag_declination, azimuth, curr_azimuth, etc. are all tables indexed by player name instead of single variables. This does mean that you'll have to initialize variables for each player once they open the compass and add checks to see if variables exist when you need them, but that shouldn't be too difficult.

jocelynbachmann commented 2 years ago

Should be fixed in #146