Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002674Zandronum[All Projects] Bugpublic2016-03-17 17:292018-09-30 21:42
ReporterStrikerMan780 
Assigned ToDusk 
PrioritynormalSeveritymajorReproducibilityN/A
StatusclosedResolutionfixed 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version3.0-beta 
Target Version3.0Fixed in Version3.0 
Summary0002674: GetUserCVar doesn't work as it's supposed to, missing functionality.
DescriptionGetUserCVar should get the value of a User CVar, from the player specified. However, in Zandronum, it only gets the value of said CVar from the server.

I have a possible solution: Clients send the values of their User CVars on connect, and if those Cvars are changed, they are then updated on the server much in the same way as changing your name/color/autoaim or other user settings.
Attached Files? file icon debugtest.pk3 [^] (2,731 bytes) 2016-10-02 14:24

- Relationships
has duplicate 0002848closed GetUserCVar ignores "user" types of cvars 

-  Notes
User avatar (0014583)
StrikerMan780 (reporter)
2016-03-17 17:33

Hope my suggestion is a good one. This really needs to be fixed, retrieving user settings without this can be a NIGHTMARE, usually involving changing TIDs, storing said TID, and then puking scripts with the TID as an argument, setting the activator, and then performing the necessary actions. This is extremely inefficient, and isn't guaranteed to work in all situations... plus, depending on how it's applied, it can be a bandwidth eater.
User avatar (0014585)
Torr Samaho (administrator)
2016-03-20 12:28

I agree. The user cvars should be synced like the existing hard coded user settings.
User avatar (0015726)
Fused (reporter)
2016-10-02 10:13
edited on: 2016-10-02 10:41

Any progress on this? This is still broken in current builds and quite a big necessity in my case.

User avatar (0015727)
Torr Samaho (administrator)
2016-10-02 11:18

Can you post a minimal example wad that allows to test this?
User avatar (0015728)
Fused (reporter)
2016-10-02 13:49

Here you go:'http://allfearthesentinel.net/download?file=debugtest.pk3 [^]'
This is one of the functions I have that uses this feature. Offline it works fine, but online it doesnt work. Locally it doesn't either.
User avatar (0015729)
Torr Samaho (administrator)
2016-10-02 14:36

Thanks for the example! Can you tell me how to activate it, what is happening and what is supposed to happen? Just loading the wad doesn't seem to change anything and I'd prefer not to guess what's supposed to happen by dissecting source of the example.
User avatar (0015730)
Fused (reporter)
2016-10-02 15:03
edited on: 2016-10-02 15:08

You're welcome. I made sure I attached a menu to enable debug, otherwise just set cl_ZH_ShowDebug 1 and cl_ZH_MaxDebugSlots 14 or something to make it work.

Offline, when puking 1, there will be a list of debug messages appearing, with the amount of debug messages set with cl_ZH_MaxDebugSlots.

Online or in a local server, the debug wont show up at all. After debugging it shows it wont go past this part of the code:


if (!PlayerInGame(j) || !GetUserCVar(j, "cl_ZH_ShowDebug"))
            continue;


This is because GetUserCVar will not check the player, but most likely rather the server. This isn't intended behaviour, because GetCvar should only be doing this, so it will always be false as the server doesnt have this cvar stored.

User avatar (0015736)
fr-blood (reporter)
2016-10-02 20:04

I can confirm that the problem is still here.
I use that cvar "user bool afd_mapstart = TRUE;", to check if the player wants or not to have a map intro with some details and it still happens online even if it's turned off.

Here is the script:
Script 1 ENTER
{// Map Information
GiveInventory("SpecialMap",1);
if(GetUserCVar(PlayerNumber(),"afd_mapstart") == TRUE)
{
    SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
    FadeTo(0,0,0,1.0,1.0);
    SetFont("BIGFONT");
    Information("Thursday 14th October 2257","Nemezis, UAC Outpost Post B-411","Sergeant","Defend the post");
    Delay(35*8);
    FadeTo(255,255,255,0.0,2.0);
    SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}
delay(35*5);
MapName("\ciOutpost Under Attack","\cgBlood");
}
User avatar (0016600)
Dusk (developer)
2017-01-04 20:46

This is turning out very annoying to fix because I have to overhaul userinfo handling. Be prepared for a large diff.
User avatar (0016602)
Dusk (developer)
2017-01-05 14:45
edited on: 2017-01-05 14:49

Fixed.

God this one was annoying but at least it should behave properly now.

This will require through testing of:
* all userinfo entries (name, gender, color, …)
* user CVars and their behavior in serverside as well as clientside dealing with own and others' user cvars
* account name in playerinfo, including cl_hideaccount, because that previously was tied to userinfo syncing

User avatar (0016609)
WaTaKiD (updater)
2017-01-06 06:43

this 3.0 build contains the above fix: 'https://www.dropbox.com/s/4g2n99qzlpg0994/zandronum-3.0-r170106-0628-d29d636-windows.zip?dl=0 [^]'
User avatar (0016676)
Torr Samaho (administrator)
2017-01-24 06:59

Patch added.
User avatar (0016686)
StrikerMan780 (reporter)
2017-01-25 20:22
edited on: 2017-02-17 01:27

Seems to work exceptionally well, no issues so far. Though, how does one define an unsynched cvar in CVARINFO? (For certain things that don't need, or shouldn't be synchronized.)

User avatar (0016882)
Torr Samaho (administrator)
2017-02-19 20:35
edited on: 2017-02-19 20:35

IIRC user and server cvars are always synced. cvars that are neither 'server' nor 'user' are not synced.

User avatar (0016884)
StrikerMan780 (reporter)
2017-02-19 20:46
edited on: 2017-02-19 20:48

Server and User are the only CVar types available in cvarinfo...

"The CVAR_UNSYNCED_USERINFO flag means that even if the cvar is userinfo, it won't be synced to the server. Otherwise all userinfo is synced. This flag cannot imply CVAR_USERINFO because that would conflict with the copies created into userinfo_t."

I'd like to be able to harness this.

User avatar (0016885)
Torr Samaho (administrator)
2017-02-19 20:48

Oh, I thought that there are "untyped" custom cvars, but I didn't check this. Then, there is no way to create an unsynced cvar. What do you need this for?
User avatar (0016886)
StrikerMan780 (reporter)
2017-02-19 20:49
edited on: 2017-02-19 20:51

Clientside settings that don't need to be synchronized with other players, to save bandwidth and prevent user info change floods.

A nosync keyword like noarchive would be nice.

User avatar (0017230)
Combinebobnt (reporter)
2017-04-19 22:58

tested debugtest.pk3 in r170416-0710 and it the debug menu popped up correctly online. Based on what strikerman said, this should be good (although I hope he ran thru the full deal in dusk's note)
User avatar (0017236)
Ru5tK1ng (updater)
2017-04-20 00:55

I think the last part of the ticket involves the nosync keyword. So there may be still a bit to do with this issue.
User avatar (0017832)
Torr Samaho (administrator)
2017-06-18 10:17

Did anybody have a chance to test whether'https://bitbucket.org/Torr_Samaho/zandronum/pull-requests/207/added-the-ability-to-make-local-cvars-in/diff [^]' works as intended to supply a "nosync" solution?
User avatar (0017833)
StrikerMan780 (reporter)
2017-06-18 10:31

Seems to be alright.
User avatar (0017835)
Torr Samaho (administrator)
2017-06-18 15:28

Ok, I added Dusk's patch.
User avatar (0018156)
Ru5tK1ng (updater)
2017-08-10 17:35

Since this has been in 3.0 for a while now and the usual complainers haven't brought up anything, I'll be marking this as resolved.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: TerminusEst13 Untitled StrikerMan780 fr-blood MazterQyoun-ae Korshun
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2016-03-17 17:29 StrikerMan780 New Issue
2016-03-17 17:33 StrikerMan780 Note Added: 0014583
2016-03-20 12:28 Torr Samaho Note Added: 0014585
2016-10-02 10:13 Fused Note Added: 0015726
2016-10-02 10:41 Fused Note Edited: 0015726 View Revisions
2016-10-02 11:18 Torr Samaho Note Added: 0015727
2016-10-02 13:49 Fused Note Added: 0015728
2016-10-02 14:24 Torr Samaho File Added: debugtest.pk3
2016-10-02 14:36 Torr Samaho Note Added: 0015729
2016-10-02 15:03 Fused Note Added: 0015730
2016-10-02 15:04 Fused Note Edited: 0015730 View Revisions
2016-10-02 15:08 Fused Note Edited: 0015730 View Revisions
2016-10-02 20:04 fr-blood Note Added: 0015736
2016-10-02 21:05 Edward-san Relationship added has duplicate 0002848
2016-10-28 17:38 Dusk Assigned To => Dusk
2016-10-28 17:38 Dusk Status new => assigned
2016-12-24 22:42 Dusk Target Version => 3.0
2017-01-04 20:46 Dusk Note Added: 0016600
2017-01-05 14:45 Dusk Note Added: 0016602
2017-01-05 14:45 Dusk Status assigned => needs review
2017-01-05 14:45 Dusk Note Edited: 0016602 View Revisions
2017-01-05 14:49 Dusk Note Edited: 0016602 View Revisions
2017-01-05 14:49 Dusk Note Edited: 0016602 View Revisions
2017-01-05 14:49 Dusk Note Edited: 0016602 View Revisions
2017-01-06 06:43 WaTaKiD Note Added: 0016609
2017-01-24 06:59 Torr Samaho Note Added: 0016676
2017-01-24 07:00 Torr Samaho Status needs review => needs testing
2017-01-25 20:22 StrikerMan780 Note Added: 0016686
2017-01-25 20:22 StrikerMan780 Note Edited: 0016686 View Revisions
2017-02-17 01:27 StrikerMan780 Note Edited: 0016686 View Revisions
2017-02-19 20:35 Torr Samaho Note Added: 0016882
2017-02-19 20:35 Torr Samaho Note Edited: 0016882 View Revisions
2017-02-19 20:35 Torr Samaho Note Revision Dropped: 16882: 0010204
2017-02-19 20:46 StrikerMan780 Note Added: 0016884
2017-02-19 20:47 StrikerMan780 Note Edited: 0016884 View Revisions
2017-02-19 20:48 StrikerMan780 Note Edited: 0016884 View Revisions
2017-02-19 20:48 Torr Samaho Note Added: 0016885
2017-02-19 20:49 StrikerMan780 Note Added: 0016886
2017-02-19 20:51 StrikerMan780 Note Edited: 0016886 View Revisions
2017-04-19 22:58 Combinebobnt Note Added: 0017230
2017-04-20 00:55 Ru5tK1ng Note Added: 0017236
2017-04-20 00:55 Ru5tK1ng Status needs testing => feedback
2017-06-18 10:17 Torr Samaho Note Added: 0017832
2017-06-18 10:31 StrikerMan780 Note Added: 0017833
2017-06-18 10:31 StrikerMan780 Status feedback => assigned
2017-06-18 15:28 Torr Samaho Note Added: 0017835
2017-06-18 15:29 Torr Samaho Status assigned => needs testing
2017-08-10 17:35 Ru5tK1ng Note Added: 0018156
2017-08-10 17:35 Ru5tK1ng Status needs testing => resolved
2017-08-10 17:35 Ru5tK1ng Resolution open => fixed
2017-08-10 17:35 Ru5tK1ng Fixed in Version => 3.0
2018-09-30 21:42 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker