Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
deeplinks

1% damage bug

Recommended Posts

I think I found a bug. When player in Doom receive exactly 1% damage, the screen will not flash red at all, and face on status bar will not change. I checked, and bug is present in vanilla Doom 1.9, ZDoom 2.7.1 and PrBoom+ 2.5.1.3. Is this bug known?

It can easily be demonstrated: start E1M1 on "I'm Too Young To Die" and go to courtyard, then pick blue armor and stand in the nuclear waste pool (it will deal 1% damage to player).

The bug happens because damage is added to varirable "damagecount" (it becomes 1), but then it decreases by 1 and set to 0 the same frame before drawing screen (if (player->damagecount) player->damagecount--;), so both screen palette and status bar face will not react (damagecount is 0 already when screen is drawn).

Share this post


Link to post

I noticed this one years ago, I think it's been documented. I assume it hasn't been changed in source ports because it's such a negligible oddity, even more so than the 'ouch face'.

Share this post


Link to post

Is this documented on the wiki? I couldn't find anything.

Share this post


Link to post

Doomguy is so tough that 1% damage doesn't even register in his senses. That's how boss he is.

Share this post


Link to post
Maes said:

Doomguy is so tough that 1% damage doesn't even register in his senses. That's how boss he is.

Is he? Or did the UAC splice some of his genes with that a frog during his supersoldier development phase?

Share this post


Link to post
Maes said:

Doomguy is so tough that 1% damage doesn't even register in his senses. That's how boss he is.

He does grunt in pain, though.

bradharding said:

Very nice find! Just implemented a quick fix in DOOM RETRO here.

I think better fix would be this:

player->damagecount += damage;	// add damage after armor / invuln

// Next two lines added
if ((damage > 0) && (player->damagecount < 2))
player->damagecount = 2;
because you can receive 1% damage multiple times during one frame.

Share this post


Link to post
deeplinks said:

I think better fix would be this:
....
because you can receive 1% damage multiple times during one frame.


Yes, that seems better to me too!

Share this post


Link to post
deeplinks said:

He does grunt in pain, though.

Only because of id trying to economise on resources. The player pain grunt, in this case, is being used as a "hmmph, is that all you got?" sound. ;)

Share this post


Link to post

Has anyone ever taken damage yet didn't at the same time? That happened to me in one of my demos. In my Hell Revealed Skill 1 run, I shot a rocket at a group of monsters. It was close enough that I heard the pain sound, yet my health didn't go down.

Share this post


Link to post

Do you remember where approximately that happened? Sorry, I don't feel like watching a 2 hour and a half demo. :)

Share this post


Link to post
Revved said:

Has anyone ever taken damage yet didn't at the same time? That happened to me in one of my demos. In my Hell Revealed Skill 1 run, I shot a rocket at a group of monsters. It was close enough that I heard the pain sound, yet my health didn't go down.

Yeah, that can happen only on Skill 1: each damage you receive got divided by two, so when you receive exactly 1 damage from rocket splash damage, it got reduced to 0 damage, but game doesn't check that and play pain sound anyway.

Share this post


Link to post
deeplinks said:

Yeah, that can happen only on Skill 1: each damage you receive got divided by two, so when you receive exactly 1 damage from rocket splash damage, it got reduced to 0 damage, but game doesn't check that and play pain sound anyway.


OH NOES THE CURSE OF REGEN HEALTH HAS CREEPED INTO DOOM FROM THE WEAKEST LINK!!!

Share this post


Link to post
deeplinks said:

Yeah, that can happen only on Skill 1: each damage you receive got divided by two, so when you receive exactly 1 damage from rocket splash damage, it got reduced to 0 damage, but game doesn't check that and play pain sound anyway.

I never noticed this one, two great finds in one thread.

Has someone added this stuff to the wiki? I thought it was there but I can't find it now.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×