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

Technically incorrect comment #1627

Open
haleyjd opened this issue Oct 16, 2023 · 1 comment
Open

Technically incorrect comment #1627

haleyjd opened this issue Oct 16, 2023 · 1 comment

Comments

@haleyjd
Copy link
Contributor

haleyjd commented Oct 16, 2023

Background

Version of Chocolate Doom: Any/current

Operating System and version: All

Game: (Doom/Heretic/Hexen/Strife/other) Doom

Any loaded WADs and mods (please include full command line):

Bug description

The comment at

// Thing type 0 is actually "player -1 start".
is describing vanilla Doom as "accepting/ignoring" negative doomednums in mapthing_t when that is not what happens. The original game will corrupt arbitrary memory with addresses computed backward from the start of playerstarts[] if given any doomednum between 0 and -32768, in chunks of sizeof(mapthing_t). Emulation of this would be nigh impossible for most cases and it is known to lead to crashing the game easily, but the comment here should be demystified to actually explain what really happens if the behavior is left unchecked.

@andwj
Copy link

andwj commented Jan 7, 2024

I think the comment just means that a thing with type 0 in a map is accepted (and ignored) by Vanilla DOOM because it gets treated like a player start. I certainly don't interpret it as saying something about negative values of thing types.

I just tested a map with a thing of type 0 in it, and the Vanilla DOOM.EXE did play the map without any crash. Whatever memory is corrupted by a thing of type 0 does not seem critical to the game working.

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

2 participants