MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0002674 | Zandronum | [All Projects] Bug | public | 2016-03-17 17:29 | 2018-09-30 21:42 |
|
Reporter | StrikerMan780 | |
Assigned To | Dusk | |
Priority | normal | Severity | major | Reproducibility | N/A |
Status | closed | Resolution | fixed | |
Platform | Microsoft | OS | Windows | OS Version | XP/Vista/7 |
Product Version | 3.0-beta | |
Target Version | 3.0 | Fixed in Version | 3.0 | |
|
Summary | 0002674: GetUserCVar doesn't work as it's supposed to, missing functionality. |
Description | GetUserCVar 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. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | has duplicate | 0002848 | closed | | GetUserCVar ignores "user" types of cvars |
|
Attached Files | debugtest.pk3 (2,731) 2016-10-02 14:24 https://zandronum.com/tracker/file_download.php?file_id=1894&type=bug |
|
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 | bug_revision_view_page.php?bugnote_id=15726#r9566 |
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 | bug_revision_view_page.php?bugnote_id=15730#r9568 |
2016-10-02 15:08 | Fused | Note Edited: 0015730 | bug_revision_view_page.php?bugnote_id=15730#r9569 |
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 | bug_revision_view_page.php?bugnote_id=16602#r10019 |
2017-01-05 14:49 | Dusk | Note Edited: 0016602 | bug_revision_view_page.php?bugnote_id=16602#r10020 |
2017-01-05 14:49 | Dusk | Note Edited: 0016602 | bug_revision_view_page.php?bugnote_id=16602#r10021 |
2017-01-05 14:49 | Dusk | Note Edited: 0016602 | bug_revision_view_page.php?bugnote_id=16602#r10022 |
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 | bug_revision_view_page.php?bugnote_id=16686#r10077 |
2017-02-17 01:27 | StrikerMan780 | Note Edited: 0016686 | bug_revision_view_page.php?bugnote_id=16686#r10195 |
2017-02-19 20:35 | Torr Samaho | Note Added: 0016882 | |
2017-02-19 20:35 | Torr Samaho | Note Edited: 0016882 | bug_revision_view_page.php?bugnote_id=16882#r10205 |
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 | bug_revision_view_page.php?bugnote_id=16884#r10209 |
2017-02-19 20:48 | StrikerMan780 | Note Edited: 0016884 | bug_revision_view_page.php?bugnote_id=16884#r10210 |
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 | bug_revision_view_page.php?bugnote_id=16886#r10212 |
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 |
Notes |
|
|
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. |
|
|
|
I agree. The user cvars should be synced like the existing hard coded user settings. |
|
|
(0015726)
|
Fused
|
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.
|
|
|
|
Can you post a minimal example wad that allows to test this? |
|
|
(0015728)
|
Fused
|
2016-10-02 13:49
|
|
|
|
|
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. |
|
|
(0015730)
|
Fused
|
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.
|
|
|
|
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");
} |
|
|
(0016600)
|
Dusk
|
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. |
|
|
(0016602)
|
Dusk
|
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
|
|
|
|
|
|
|
|
|
(0016686)
|
StrikerMan780
|
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.)
|
|
|
|
IIRC user and server cvars are always synced. cvars that are neither 'server' nor 'user' are not synced.
|
|
|
(0016884)
|
StrikerMan780
|
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.
|
|
|
|
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? |
|
|
(0016886)
|
StrikerMan780
|
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.
|
|
|
|
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) |
|
|
|
I think the last part of the ticket involves the nosync keyword. So there may be still a bit to do with this issue. |
|
|
|
|
|
|
|
|
|
Ok, I added Dusk's patch. |
|
|
|
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. |
|