Skip to content

Duke3D: Parsing for negated CON labels does not work properly

While it is currently possible to negate gamevars (and constant integers) inside CON statements as such:

mul temp1 -temp2

The same is not possible for labels. The following code will throw a warning in the console, indicating that the label is being interpreted as a constant due to the negation that's placed in front:

define TEST 10
var temp 20 0

onevent EVENT_ALTFIRE
    set temp -TEST
    al temp
endevent

Console output after pressing Altfire:

CONLOGVAR: L=6 temp  (Global) =0

Not only does the parsing fail, it also produces a completely unexpected value.