MantisBT - Zandronum
View Issue Details
0003060Zandronum[All Projects] Bugpublic2017-04-15 19:072017-04-18 06:10
Legendary 
 
highminoralways
closedno change required 
Microsoft Windows 10
3.0-beta 
3.0 
0003060: ACS for music on monsters doesn't work
There's a little issue I'm having when trying to play my mod/addon on the latest Zandronum 3.0 alpha build. It's supposed to work like this. A specific monster wakes up and you hear his music playing, once it dies the music stops. There are console cvars that allow you to turn the music on and off at will. Those cvars don't work for turning on or off the music for the monsters and only work for turning on the music for the weapon.
You can reproduce this bug by going to the custom map for my mod/addon called LCADEMO. Shoot while standing in front of the cage for one of the golden monsters (Legendary monsters). Notice how you don't hear any music playing even with the music turned on (lca_legmusic 1 turns it on, 0 turns it off). To turn the weapon music on an off the command is lca_legweapmusic 1, and 0 for off. Try doing the same thing in the current Zandronum version and you'll notice that everything works fine.
I could only attach one file so I will be listing them both here. Load Complex Doom first followed by LCA.

Complex Doom:'http://allfearthesentinel.net/download?file=complex-doom.v26a2.pk3 [^]'

LCA:'http://allfearthesentinel.net/download?file=lca-v1.5.8.pk3 [^]'
No tags attached.
Issue History
2017-04-15 19:07LegendaryNew Issue
2017-04-16 07:54Torr SamahoNote Added: 0017145
2017-04-16 07:54Torr SamahoAssigned To => Torr Samaho
2017-04-16 07:54Torr SamahoStatusnew => needs testing
2017-04-16 23:01LegendaryNote Added: 0017165
2017-04-16 23:24WaTaKiDNote Added: 0017166
2017-04-16 23:32WaTaKiDNote Edited: 0017166bug_revision_view_page.php?bugnote_id=17166#r10328
2017-04-17 03:03LegendaryNote Added: 0017167
2017-04-17 06:06Torr SamahoNote Added: 0017169
2017-04-17 14:56LegendaryNote Added: 0017171
2017-04-17 15:31LegendaryNote Edited: 0017171bug_revision_view_page.php?bugnote_id=17171#r10330
2017-04-17 19:04Torr SamahoNote Added: 0017176
2017-04-18 02:50LegendaryNote Added: 0017189
2017-04-18 06:09Torr SamahoNote Added: 0017190
2017-04-18 06:10Torr SamahoStatusneeds testing => closed
2017-04-18 06:10Torr SamahoAssigned ToTorr Samaho =>
2017-04-18 06:10Torr SamahoResolutionopen => no change required
2017-04-18 06:10Torr SamahoFixed in Version => 3.0

Notes
(0017145)
Torr Samaho   
2017-04-16 07:54   
Sounds like 0003054. If it is, this should be fixed in the new beta build I just released.
(0017165)
Legendary   
2017-04-16 23:01   
Nope, I just tested it offline and it still doesn't work. If this newest version is 170416-0710 then no, the outcome is still the same. Also, there's another little mod called: hpbar-v15b.pk3. It's supposed to show the health of the monsters in the top middle of the screen but that is broken in 3.0 also. Here's the link:'http://allfearthesentinel.net/download?file=hpbar-v15b.pk3. [^]' This pk3 also works with 2.1.2 but doesn't work with 3.0's alpha.
(0017166)
WaTaKiD   
2017-04-16 23:24   
(edited on: 2017-04-16 23:32)
i took a quick peek at hpbar-v15b.pk3 and noticed there is a cvar 'server noarchive bool hpbar_zan3 = false;' in the CVARINFO lump

the README.md lump says:
* `hpbar_zan3` (server): Set this variable to true if you are hosting with Zandronum 3.0. This includes: HP display for farther targets, more accurate invul flag, reflect flag, etc. (default: false)

i only ran around for 30 seconds but it seemed to work fine once i enabled hpbar_zan3

EDIT: while the acs source is not provided within the wad itself, the readme provides 'https://github.com/pkmx/hpbar [^]' and thus i believe this is the acs source file: 'https://github.com/PkmX/hpbar/blob/master/hpbar.acs [^]'

(0017167)
Legendary   
2017-04-17 03:03   
Oh I see now, thanks for clearing that up. I tried it as well and that command worked. Now the only issue is the music.
(0017169)
Torr Samaho   
2017-04-17 06:06   
Quote from Legendary
Nope, I just tested it offline and it still doesn't work. If this newest version is 170416-0710 then no, the outcome is still the same.

The adjustment I made to support the legacy behavior of existing mods has no effect offline to stay as ZDoom compatible as possible. In ZDoom, a non-player activated script returns zero if GetCVar if used on a user cvar. See 0002634:0016395 and the following notes for more details. The proper way to fix this is to use GetUserCVar instead of GetCVar. Does this work for you?
(0017171)
Legendary   
2017-04-17 14:56   
(edited on: 2017-04-17 15:31)
Thank you. That in fact was the same exact issue which I failed to look at before posting. Using GetUserCVar fixes the issue.

Edit: It fixes the issue for Zandronum 3.0 but then the music no longer works in 2.1.2.

(0017176)
Torr Samaho   
2017-04-17 19:04   
Zandronum 2.1.2 does not support GetUserCVar. If you need a solution that works in both 2.1.2 and 3.0 you can try to use GetCVar in combination with setting the activator of the script to the player whose user cvar value you'd like to access.
(0017189)
Legendary   
2017-04-18 02:50   
Oh ok, thank you. I guess you can close this now. I can just make two separate versions then.
(0017190)
Torr Samaho   
2017-04-18 06:09   
Ok, I'll do.