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
0002634Zandronum[All Projects] Bugpublic2016-02-13 16:132017-04-16 07:03
Reporterarkore 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version3.0-beta 
Target Version3.0Fixed in Version 
Summary0002634: CLIENTSIDE SetMusic() or CVARINFO not working.
DescriptionWhen monster is active, music is no longer changing -- either because CLIENTSIDE script problem, or CVAR problem.

Steps To ReproduceRun this .pk3 and type summon TestMan.
Additional InformationWhen legendary monster is active, new music should be playing. When monster dies, music is reset back to map music.

This is how it's done in the LCA mod, for Complex Doom.

---

This is working in Zan 2.1.
Attached Files? file icon clientside-music.pk3 [^] (79,639 bytes) 2016-02-13 16:13
? file icon usercvarmusictest.wad [^] (5,849 bytes) 2016-11-29 23:32
? file icon usercvarmusictest2.wad [^] (6,004 bytes) 2016-11-30 05:53

- Relationships
related to 0003054closedTorr Samaho Using GetCVar clientside with user cvars is broken in 3.0 

-  Notes
User avatar (0014578)
arkore (reporter)
2016-03-13 21:14

I somehow got this working, so, please close this ticket.
User avatar (0014579)
arkore (reporter)
2016-03-13 21:16

My mistake, I was thinking of something else. This issue is still an issue.
User avatar (0016338)
Torr Samaho (administrator)
2016-11-27 09:50

This doesn't seem to be anything client related since it also happens offline. Furthermore, the problem also appears in GZDoom 1.8.6 and the latest GZDoom version for me. So it's either a bug of the wad or a GZDoom bug. Can you confirm this?
User avatar (0016391)
arkore (reporter)
2016-11-29 23:36

I can confirm the issue still occurs with latest dev 3.0 build 161030-2038.

It seems this issue primarily a CVAR issue. The Cvar is just not registering properly, or being read properly from GetCvar(). Works fine in Zandronum 2.1.2 though.

I've added usercvarmusictest.wad to this ticket now. It has minimal code, and uses the map SCRIPTS lump for execution. See the CVARINFO, DECORATE, and SCRIPTS lump. Here is pastebin of it:'http://pastebin.com/bUbamTqL [^]'
User avatar (0016393)
arkore (reporter)
2016-11-30 05:54

I added usercvarmusictest2.wad now, which correctly executes the non-CLIENTSIDE version of the script.
User avatar (0016394)
Torr Samaho (administrator)
2016-11-30 07:02

Thanks for the updated examples! usercvarmusictest.wad fails for me in single player both in 3.0 and the latest GZDoom version. Can you confirm this?
User avatar (0016395)
Edward-san (developer)
2016-11-30 08:16
edited on: 2016-11-30 09:10

According to the code, GetCVar expects the activator to be a player when the cvar in question is a user cvar, so that it checks such player's user cvar. zan 2.1 had the code commented out (in function GetCVar in p_acs.cpp), so this is why it never happened over there.

Probably it's a limitation of the user cvar system, but I'll ask at the zdoom forum anyways.

[edit] Just a note regarding the proper way to use user cvars: I think that GetUserCVar should be used. It has more freedom, as you can specify which players should have their user cvar checked.

[edit2] I fear it may be considered as [not a bug] because that seems intentional according to zdoom r4283 changelog. Torr, what's your opinion on this?

User avatar (0016403)
Torr Samaho (administrator)
2016-11-30 20:04

Looks like this is a mod error then, but I hate breaking backwards compatibility. We could let GetCVar fallback to the consoleplayer value if it's called without a player as activator on a user CVar.
User avatar (0016404)
arkore (reporter)
2016-11-30 20:18

Seems like the GetUserCvar() is the correct way to get user cvars, go figure. Also, the GetCvar wiki page has a big fat warning on it.

I suspect there won't be many mods like this, and so I wouldn't provide a fallback. I think that any mods affected by this should be updated/fixed instead of relying on a fallback.

Feel free to close this issue.
User avatar (0016405)
Edward-san (developer)
2016-11-30 20:47
edited on: 2016-11-30 20:48

I think the only circumstance I could see the solution in comment 0002634:0016403 causing no problems would be a CLIENTSIDE script. In the server side, how would we choose which player's user cvar would be read?

User avatar (0016704)
StrikerMan780 (reporter)
2017-01-28 05:09

GetUserCVar is fixed now. As for the SetMusic stuff, try LocalSetMusic if you want to set music for a single client. If you want to set music for all clients, use SetMusic in a non-clientside script.

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: No one explicitly supports this issue yet.
Opponents: Argentum

- Issue History
Date Modified Username Field Change
2016-02-13 16:13 arkore New Issue
2016-02-13 16:13 arkore File Added: clientside-music.pk3
2016-03-13 21:14 arkore Note Added: 0014578
2016-03-13 21:16 arkore Note Added: 0014579
2016-11-27 09:50 Torr Samaho Note Added: 0016338
2016-11-27 09:51 Torr Samaho Status new => feedback
2016-11-29 20:35 Torr Samaho Target Version => 3.0
2016-11-29 23:32 arkore File Added: usercvarmusictest.wad
2016-11-29 23:36 arkore Note Added: 0016391
2016-11-29 23:36 arkore Status feedback => new
2016-11-30 05:53 arkore File Added: usercvarmusictest2.wad
2016-11-30 05:54 arkore Note Added: 0016393
2016-11-30 07:02 Torr Samaho Note Added: 0016394
2016-11-30 07:07 Torr Samaho Status new => feedback
2016-11-30 08:16 Edward-san Note Added: 0016395
2016-11-30 08:44 Edward-san Note Edited: 0016395 View Revisions
2016-11-30 09:10 Edward-san Note Edited: 0016395 View Revisions
2016-11-30 20:04 Torr Samaho Note Added: 0016403
2016-11-30 20:18 arkore Note Added: 0016404
2016-11-30 20:18 arkore Status feedback => new
2016-11-30 20:47 Edward-san Note Added: 0016405
2016-11-30 20:48 Edward-san Note Edited: 0016405 View Revisions
2017-01-28 05:09 StrikerMan780 Note Added: 0016704
2017-02-06 19:36 Dusk Status new => closed
2017-02-06 19:36 Dusk Resolution open => no change required
2017-04-16 07:03 Torr Samaho Relationship added related to 0003054






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker