Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doom/Doom2: Donut line action differs from vanilla #1577

Open
ManxLoaghtan opened this issue Feb 5, 2023 · 10 comments
Open

Doom/Doom2: Donut line action differs from vanilla #1577

ManxLoaghtan opened this issue Feb 5, 2023 · 10 comments

Comments

@ManxLoaghtan
Copy link

Background

Version of Chocolate Doom: built from Git repository 2023-02-05

Operating System and version: Windows

Game: Doom2

Any loaded WADs and mods (please include full command line):
chocolate-doom -file baddonut.wad

Bug description

Observed behavior:
The floor donut switch action (9) can break in chocolate-doom if it targets multiple sectors where at least one of them doesn't move. I made a map for doom2 in to demonstrate. Unlike vanilla and other accurate ports, the switch will not lower the exit platform. It seems confused by the inert sector outside the map to the right.
Download Example: https://anonfiles.com/zex6l3Waya

Expected behavior:
Hit the switch to trigger the donut and lower the exit. Both the pool and pillar are supposed to move to the surrounding floor height.

@fabiangreffrath
Copy link
Member

and other accurate ports

Which ports would that be?

@ManxLoaghtan
Copy link
Author

I tried it in a few ports as well as Doom2 version 1.9 through dosbox. It doesn't work in the latest chocolate or any close derivative like crispy (5.12.0x64) or inter doom (6.2.1x64). It works fine in Woof (10.5.1x64) and DSDA-Doom (0.25.2) even when specifying -complevel 2. It also works fine in Gzdoom with compatibility set to Doom (strict).
It also weirdly does not work in PrBoom-Plus (2.6.2) under any compat (the switch will not even animate), and it crashes Vavoom (1.33).

@rfomin
Copy link
Contributor

rfomin commented Feb 6, 2023

The problem is in this line:


If we change break to continue it will work like in MBF/PrBoom+.

@fabiangreffrath
Copy link
Member

Surprising to find a desyncing bug in Chocolate Doom after all these years - especially one that other ports did get right.

@rfomin While at it, it seems that we are still missing a certain overflow emulation in Woof, i.e. the case when s3 == NULL.

@rfomin
Copy link
Contributor

rfomin commented Feb 6, 2023

Surprising to find a desyncing bug in Chocolate Doom after all these years - especially one that other ports did get right.

It seems check for s2 == NULL was added in Boom: https://github.com/Doom-Utils/historic-ports/blob/3ae2d25740b9d4ea896f0fde0c73f6b112135ce5/p_floor.c#L849
I think another overflow emulation is needed for true vanilla compatibility.

it seems that we are still missing a certain overflow emulation in Woof

I never found a map/demo that depends on it. Just a test file donut_av.wad in the PrBoom+ repository. Maybe we should advise @ManxLoaghtan to just not abuse this bug?

@fabiangreffrath
Copy link
Member

It seems check for s2 == NULL was added in Boom: https://github.com/Doom-Utils/historic-ports/blob/3ae2d25740b9d4ea896f0fde0c73f6b112135ce5/p_floor.c#L849

Oh, andI think I introduced a bug in Woof when I fixed (!s2->lines[i]->flags & ML_TWOSIDED) to !(s2->lines[i]->flags & ML_TWOSIDED) a few lines later.

@rfomin
Copy link
Contributor

rfomin commented Feb 6, 2023

(!s2->lines[i]->flags & ML_TWOSIDED) to !(s2->lines[i]->flags & ML_TWOSIDED)

Hmm, I don't know the actual order of evaluation here, but your fix looks logical.

@fabiangreffrath
Copy link
Member

Hmm, I don't know the actual order of evaluation here, but your fix looks logical.

Yes, it does. 😉 But there's a comment in PrBoom+: The original code evaluates to 0 & ML_TWOSIDED.

@nveaa1
Copy link

nveaa1 commented Aug 22, 2023

Do you happen to have a new link to the wad file? The link in the report doesn't work now.

@ManxLoaghtan
Copy link
Author

Do you happen to have a new link to the wad file? The link in the report doesn't work now.

Yes, I didn't notice at the time github supported zip uploads directly. This one should be much more permanent.
baddonut.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants