MantisBT - Zandronum
View Issue Details
0001351Zandronum[All Projects] Suggestionpublic2013-05-27 19:232018-09-30 21:49
Ijon Tichy 
Torr Samaho 
urgentfeatureN/A
closedfixed 
1.0 
3.03.0 
0001351: Backport ZDoom revisions r4280, r4283, r4292 (Official CVar and User CVar support in ACS)
'http://zdoom.org/Changelog/4280/files [^]'
'http://zdoom.org/Changelog/4283/files [^]'
'http://zdoom.org/Changelog/4292/files [^]'

Basically, this adds official CVar support to ACS, removing one of the reasons for ConsoleCommand to exist. I'm normally not the sort of person to ask for a backport, but this feature is of such critical importance to Zandronum mods, which tend to define CVars of their own for server customization, and its addition would make ConsoleCommand almost completely useless.

The only thing left would be executing net scripts from the client to the server on ACS, but that's a different ticket.
2.7
child of 0001070new Dusk Phasing out the dangerous ConsoleCommand for various additional/improved ACS commands 
child of 0002172closed Torr Samaho Upgrade GZDoom base to 1.8.6 
7z setcvar.7z (9,730) 2014-08-07 08:15
https://zandronum.com/tracker/file_download.php?file_id=1278&type=bug
Issue History
2013-05-27 19:23Ijon TichyNew Issue
2013-05-27 19:25WatermelonNote Added: 0006348
2013-05-27 19:31TerminusEst13Note Added: 0006351
2013-05-27 20:22Edward-sanNote Added: 0006352
2013-05-30 00:06HypnotoadNote Added: 0006354
2013-06-11 23:42DuskRelationship addedchild of 0001070
2013-06-16 17:07Torr SamahoNote Added: 0006453
2013-12-27 13:42Torr SamahoNote Added: 0007739
2013-12-27 19:36Visual VincentNote Added: 0007744
2014-06-15 14:59DuskNote Deleted: 0007744
2014-06-15 15:00DuskNote Deleted: 0006354
2014-08-06 19:09Torr SamahoNote Added: 0010135
2014-08-06 19:10Torr SamahoNote Edited: 0010135
2014-08-06 19:10Torr SamahoNote Revision Dropped: 10135: 0005498
2014-08-06 19:10Torr SamahoAssigned To => Torr Samaho
2014-08-06 19:10Torr SamahoStatusnew => assigned
2014-08-06 19:10Torr SamahoStatusassigned => needs testing
2014-08-06 19:11Torr SamahoNote Edited: 0010135bug_revision_view_page.php?bugnote_id=10135#r5500
2014-08-06 19:11Torr SamahoNote Revision Dropped: 10135: 0005499
2014-08-06 20:45Ijon TichyNote Added: 0010136
2014-08-06 20:49Ijon TichyNote Edited: 0010136bug_revision_view_page.php?bugnote_id=10136#r5502
2014-08-07 08:15Torr SamahoFile Added: setcvar.7z
2014-08-07 08:17Torr SamahoNote Added: 0010139
2014-08-10 13:32Torr SamahoNote Added: 0010158
2014-08-10 15:27DuskNote Added: 0010159
2014-08-10 16:00Torr SamahoNote Added: 0010164
2014-08-10 21:01Torr SamahoNote Added: 0010173
2014-08-12 21:33QentNote Added: 0010192
2014-09-16 12:00ZzZomboNote Added: 0010273
2015-05-10 22:12WaTaKiDTarget Version => 3.0
2015-05-10 22:12WaTaKiDRelationship addedchild of 0002172
2016-03-17 18:03StrikerMan780Note Added: 0014584
2017-02-06 19:03DuskStatusneeds testing => resolved
2017-02-06 19:03DuskFixed in Version => 3.0
2017-02-06 19:03DuskResolutionopen => fixed
2018-09-30 21:49Blzut3Statusresolved => closed

Notes
(0006348)
Watermelon   
2013-05-27 19:25   
This would be great in helping phase out ConsoleCommand
(0006351)
TerminusEst13   
2013-05-27 19:31   
Not only great for helping phase out ConsoleCommand, but would help dramatically in bridging the gap between ZDoom and Zandronum. A lot of advanced ACS trickery works in Zandronum but not in ZDoom--now it's possible to use the advanced ACS trickery in ZDoom, but via an entirely different method that accomplishes the same result.

Making the methods the same would basically mean less difference between zdoom-specific builds for mods and Zandronum-specific builds.
(0006352)
Edward-san   
2013-05-27 20:22   
sorry, but this will happen after 1.1 comes out.
(0006453)
Torr Samaho   
2013-06-16 17:07   
I agree that it would be very useful to have this, but I didn't check yet whether it would be feasible to backport this at the moment. I'll have a look and report back.
(0007739)
Torr Samaho   
2013-12-27 13:42   
The implementation of this feature in ZDoom heavily relies on the changes made in ZDoom revision 4253 (revised userinfo handling). So 4253 would also need to be backported which is quite a bit of work on its own.
(0010135)
Torr Samaho   
2014-08-06 19:09   
(edited on: 2014-08-06 19:11)
Since this is an important feature to get rid of ConsoleCommand, I backported the CVARINFO lump and the ACS functions SetCVar, GetCVarString and SetCVarString. This binary contains the backports, but is completely untested. Please test if it works as expected.

Note: I intentionally did not backport the user cvars.

(0010136)
Ijon Tichy   
2014-08-06 20:45   
(edited on: 2014-08-06 20:49)
Before I do any serious tests, how do server CVars get handled in clientside scripts? Do they follow what the server says, or do they do what they do now and use what the client has them set to?

Edit: Also, is this on the Bitbucket repo? Because if so, I can't find it, and if not, I'll need a 64-bit Linux build to test this.

(0010139)
Torr Samaho   
2014-08-07 08:17   
Since this is still completely untested, I didn't push it to the Bitbucket repo yet. I attached the necessary patches, so you can test this locally.

So far there is no synchronization of server CVars to the clients, so they still have the old behavior. I plan to change this though, but would first like to know if the basic functionality is working at all.
(0010158)
Torr Samaho   
2014-08-10 13:32   
I implemented the synchronization of server CVars defined via CVARINFO. While at it, I noticed that the archiving of the custom CVars was completely broken. Even archiving of SERVERINFO CVARs (e.g. sv_smartaim) on the server was broken in 1.2. These issues should also be fixed now. I'll try to post updated binaries and the new source later today.
(0010159)
Dusk   
2014-08-10 15:27   
What is stopping you from posting these changes on the repo in a separate head?
(0010164)
Torr Samaho   
2014-08-10 16:00   
For one thing, I want to have as few heads in the main repository as possible (that's why I maintain the stable repository instead of a stable head). For another thing, I don't want to have code that is still completely experimental in the main repository.

I pushed the changes to the accounts repository.
(0010173)
Torr Samaho   
2014-08-10 21:01   
Here is an updated binary with the sync of custom server vars and the archive fixes.
(0010192)
Qent   
2014-08-12 21:33   
CVARINFO works for archiving clients' settings, replacing ConsoleCommand set/archivecvar in the coopbullets mod. I was also able to use GetCVarString to implement GetCVarFixed, replacing a ConsoleCommand eval. So far so good.
(0010273)
ZzZombo   
2014-09-16 12:00   
'http://zandronum.com/forum/showthread.php?tid=5134&pid=71751#pid71751 [^]'

Eh, Qent is quicker.
(0014584)
StrikerMan780   
2016-03-17 18:03   
Related:'http://zandronum.com/tracker/view.php?id=2674 [^]'