ULX

Author Topic: SuperPowers - Set run speed and jump power of players. Update! (v1.1, SVN only)  (Read 24699 times)

0 Members and 1 Guest are viewing this topic.

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 77
  • Karma: 17
This is really strange.. Apparently there's some kind of conflict with Player:GetNetworkedString("UserGroup") and the ULX/ULib release versions.
I've tried this with ULX/ULib release versions in singleplayer and listen server, still returns a blank string. Can someone try this please?
I tried it with no ULX/ULib in singleplayer, and it worked beautifully. I also tried it with ULX/ULib SVN versions on a dedicated server, also worked.


YouTube music player by RynO-SauruS

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
You're right. I didn't try a ded, but ULib 2.3 seems to break the variable.
I tested using a single player game and a listen server.
Previously tried ded and single player using SVN and it worked fine.
Odd.
I've searched, can't find any mention of network var "UserGroup" in ULib 2.3
There's a meta override in ucl_sh.lua... it's potentially an issue
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Hmm, I can't test this on my server due to a complicated setup... but there really shouldn't be anything in ULib 2.3 that's capable of doing that.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Seems to be true Megiddo. I removed ULib/ULX release and it returned the proper usergroup I'd set in /settings/users.txt
With release version installed, it didn't.

According to Entity.SetNetworkedString , "Running a networked function will cause it to synchronize the networked data with the clients. "

Many of Garry's player group update code/checks (IsAdmin, IsSuperadmin, IsUserGroup, SetUsergroup ) uses network functions (Set and Get).
ULIb's 2.3 doesn't... we overwrote many of them.
ULib SVN, we use Get/Set several times due to the rewrite.

My theory : ULib release never syncronizes the variables. When they sync, it's due to another mod calling Get/SetNetworkedVar
I'm curious if this somehow adds onto the 'long random time menu/commands break' we occasionally see... lack of sync.

(Sorry Ryno, we've kind of hijacked your release thread... let me know if you want the 'why doesn't this code work' part, including your question, split to Developers corner.
« Last Edit: February 24, 2010, 07:55:03 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Seems to be true Megiddo. I removed ULib/ULX release and it returned the proper usergroup I'd set in /settings/users.txt
With release version installed, it didn't.

According to Entity.SetNetworkedString , "Running a networked function will cause it to synchronize the networked data with the clients. "

Many of Garry's player group update code/checks (IsAdmin, IsSuperadmin, IsUserGroup, SetUsergroup ) uses network functions (Set and Get).
ULIb's 2.3 doesn't... we overwrote many of them.
ULib SVN, we use Get/Set several times due to the rewrite.

My theory : ULib release never syncronizes the variables. When they sync, it's due to another mod calling Get/SetNetworkedVar
I'm curious if this somehow adds onto the 'long random time menu/commands break' we occasionally see... lack of sync.

(Sorry Ryno, we've kind of hijacked your release thread... let me know if you want the 'why doesn't this code work' part, including your question, split to Developers corner.

Ah, yes, I believe you're right. It does hijack the original method that would set that. It didn't really matter since client still registered superadmin and admin's correctly (with the appropriate functions). Good to know we got this fixed for the future though. :)
Experiencing God's grace one day at a time.

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 77
  • Karma: 17
So, can anyone think of any way I could make this work? I thought of possibly re-overriding SetUserGroup() to make it call SetNetworkedString(<group>) also.
Would this be messing with things too much for this small addon maybe?  :-\
« Last Edit: February 24, 2010, 11:29:24 PM by RynO-SauruS »


YouTube music player by RynO-SauruS