MantisBT - Zandronum
View Issue Details
0002991Zandronum[All Projects] Suggestionpublic2017-01-23 03:472024-02-29 06:20
Dark-Assassin 
 
normalcrashalways
confirmedbackport later 
3.0 
 
0002991: [Edit] Fix GetCVar in A_JumpIf actions
This is a pretty handy ACS function.
It's a part of ZDoom 2.8 but not 2.7.1

Edit: Turns out this does (kind of) exist but crashes the game on startup.
There may also be other ACS functions that also are supposed to work in A_JumpIf but crash instead.
Example of usage
Actor CustomParticle {
    +NOINTERACTION
    +FORCEXYBILLBOARD
    +CLIENTSIDEONLY
    RenderStyle "Stencil"
    States {
        Spawn:
            TNT1 A 0
            TNT1 A 0 A_JumpIf(GetCVar("vid_renderer") == 0,"Spawn0")
            TNT1 A 0 A_JumpIf(GetCVar("gl_particles_style") == 1,"Spawn1")
            TNT1 A 0 A_JumpIf(GetCVar("gl_particles_style") == 2,"Spawn2")
            Goto Spawn0
        Spawn0: // Square
            PART A 1 A_FadeOut(1/35)
            Loop
        Spawn1: // Round
            PART B 1 A_FadeOut(1/35)
            Loop
        Spawn2: // Smooth
            PART C 1 A_FadeOut(1/35)
            Loop
    }
}
No tags attached.
Issue History
2017-01-23 03:47Dark-AssassinNew Issue
2017-02-13 12:08Dark-AssassinNote Added: 0016859
2020-10-19 07:55Dark-AssassinSeverityfeature => crash
2020-10-19 07:55Dark-AssassinReproducibilityN/A => always
2020-10-19 07:55Dark-AssassinProduct Version => 3.0
2020-10-19 07:55Dark-AssassinSummaryBackport GetCVar => [Edit] Fix GetCVar in A_JumpIf actions
2020-10-19 07:55Dark-AssassinDescription Updatedbug_revision_view_page.php?rev_id=13262#r13262
2020-10-27 05:03EpicTyphlosionNote Added: 0021553
2020-10-27 10:44KaminskyNote Added: 0021555
2024-02-29 06:20Ru5tK1ngNote Added: 0023105
2024-02-29 06:20Ru5tK1ngStatusnew => confirmed
2024-02-29 06:20Ru5tK1ngResolutionopen => backport later

Notes
(0016859)
Dark-Assassin   
2017-02-13 12:08   
Ok, this function does exist in ACS, however using directly in A_JumpIf causes the game to crash on startup.
(0021553)
EpicTyphlosion   
2020-10-27 05:03   
Yeah, this one's pretty cut and dry. No reason that what looks like a very useful, if not essential ACS function from ZDoom should be left out of Zandro.
(0021555)
Kaminsky   
2020-10-27 10:44   
This ticket is referring to the DECORATE version of GetCVar(), which was added in a much later version of (G)ZDoom than the one Zandronum 3.0 is based off of:'https://zdoom.org/Changelog/ebe3f23/files [^]'

There are several or more DECORATE expressions such as this one that look and behave like their ACS counterparts, but aren't currently in Zandronum right now.

It's up to the developers to decide whether it's possible to backport an out of order feature like this one right now. For now, since GetCVar() works in ACS, you could have DECORATE call an ACS script that returns the CVar's value.
(0023105)
Ru5tK1ng   
2024-02-29 06:20   
Most likely to be added in the 4.0 codebase upgrade.