tpoechtrager / hopmod

Automatically exported from code.google.com/p/hopmod
1 stars 0 forks source link

hide_priv bug on v5 #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect on a freshly installed v5 server
2. Make yourself master or admin.
3. Privileges displaying on the scoreboard works (green/orange-colored name).
4. Relinquish master or admin.
5. Make yourself invisible-master or admin.
6. You can't see the privileges on the scoreboard (correct behavior).
7. Relinquish master or admin0
8. Try to make yourself master or admin a second time.

Now you can't see the privileges on the scoreboard, but you're actually 
master/admin.
After these steps, you should see your privileges on the scoreboard again.

This is fixed by the below patch (maybe a better solution can be found) :
Index: src/hopmod/extserver.cpp
===================================================================
--- src/hopmod/extserver.cpp    (révision 500)
+++ src/hopmod/extserver.cpp    (copie de travail)
@@ -658,8 +658,10 @@
     int old_priv = player->privilege;
     player->privilege = priv_code;

-    if(!public_priv)
+    if(public_priv)
     {
+        player->hide_privilege = false;
+    } else {
         player->hide_privilege = true;
     }

Original issue reported on code.google.com by piernov@gmail.com on 3 Dec 2012 at 12:57

GoogleCodeExporter commented 9 years ago

Original comment by graham.d...@gmail.com on 3 Dec 2012 at 10:35