Bashe Posted December 28, 2004 Did the "You picked up the medikit that you REALLY need!" message ever appear in Vanilla Doom? I seem to only be able to get it in Zdoom. 0 Share this post Link to post
Bloodshedder Posted December 28, 2004 It only shows up in a strange circumstance in the original Doom, due to an error in the source code. You only get it if you pick up a medkit right after you take an immense amount of damage. I'm sure someone else here can point out the relevant line of code. 0 Share this post Link to post
sargebaldy Posted December 28, 2004 I actually don't remember ever having got it in all the years I played vanilla doom. I didn't know of its existence at all until I saw the message in DeHackEd. 0 Share this post Link to post
Mr. T Posted December 28, 2004 There's something else like that. If you turn godmode on straight after taking damage, he sometimes has a "surprised" face. 0 Share this post Link to post
Bloodshedder Posted December 28, 2004 I'm pretty sure getting the surprised face is directly connected to the same circumstances you would get the medikit message: taking a lot of damage, and then quickly regaining health. 0 Share this post Link to post
Grazza Posted December 28, 2004 The ouch face (STF_OUCH) appears when you take damage at the same time (it needs to be the same gametic, I presume) as your health increases overall by more than 20. This is due to an error in the code: it was meant to be if you lost more than 20 health all at the same time. Thus you can expect to see it if you are running across a damaging floor and pick up a medikit or a soulsphere, for instance. It also appears if you start a level in the pain state (e.g. in a damaging sector). link The "really need" message was meant to be displayed if you picked up a medikit when your health was less than 25. This is from cph's LxDoom changelog, under "Changes v1.3.7 to v1.4.0":- Fixed Doom bug where the "got a medikit you REALLY needed" message was never used. Thanks to James "Quasar" Haley for pointing that one out.AFAIK, these two bugs are not connected. Certainly, fixing the "really need" issue doesn't affect the circumstances under which the "ouch face" appears. 0 Share this post Link to post
fraggle Posted December 28, 2004 The message was supposed to be displayed if you got a medikit when your health was under 25%. However, a logic bug in the code which handled the medikit powerup prevented it from ever being displayed. The code looks like this: If the player picks up a medikit { Give the player 25% health If the players health is < 25% { Display "Picked up a medikit you REALLY NEED!" } else { Display "Picked up a medikit" } }As the player always has >0% health when alive and cannot pick up medikits when dead, the health is always increased to a value greater than 25% before the check is made, so the normal "picked up a medikit" message is always displayed. The correct code should be as follows: If the player picks up a medikit { If the players health is < 25% { Display "Picked up a medikit you REALLY NEED!" } else { Display "Picked up a medikit" } Give the player 25% health }Some ports fix this. I fixed it in SMMU (and Eternity has thus inherited it) and I think the fix got passed on to PrBoom as well. The "ouch" face bug is not related to this, although it is similar to this in that a simple logic error prevented things from being displayed. 0 Share this post Link to post
Grazza Posted December 28, 2004 fraggle said:I think the fix got passed on to PrBoom as well.Yes, via LxDoom, which merged with PrBoom. 0 Share this post Link to post
Stealthy Ivan Posted December 28, 2004 Good question, I am going to see for my self... 0 Share this post Link to post
Sephiroth Posted December 30, 2004 i had never seen that message in all my dooming years. If i did i didn't take note of it. 0 Share this post Link to post
188DarkRevived Posted January 21, 2005 It always showed up in Duke Nukem 3D when health was either 25% or below....But I never ever got to see it in vanilla DOOM. 0 Share this post Link to post
Jacknife Posted January 22, 2005 Never seen that in vanilla doom before. 0 Share this post Link to post
fraggle Posted January 22, 2005 DarkJedi188 said:It always showed up in Duke Nukem 3D when health was either 25% or below....But I never ever got to see it in vanilla DOOM. Jacknife said:Never seen that in vanilla doom before. YES, WE JUST EXPLAINED WHY YOU NEVER SEE IT. READ THE THREAD, YOU IDIOTS. 0 Share this post Link to post
fraggle Posted January 22, 2005 Bloodshedder said:I'm pretty sure getting the surprised face is directly connected to the same circumstances you would get the medikit message: taking a lot of damage, and then quickly regaining health. They arent connected. The "picked up a medikit you really need!" message is never displayed. 0 Share this post Link to post
fezzador Posted January 23, 2005 Just for comparison, Wolfenstein Spear of Destiny uses the correct programming of the "shock" face. If the hit is damaging enough (not sure how much damage) he'll use the "shock" expression. Much, much more common than in Doom. 0 Share this post Link to post
Quasar Posted January 25, 2005 IIRC, there are some early versions of DOOM in which the STFOUCH face is displayed properly (can anyone verify this, perhaps with a screenshot?). I seem to remember seeing it at the appropriate time when playing a long, long time ago with some old version. At any rate, the error in the status bar code is actually just an inverted test, like people have mentioned. Here's the pseudocode, like fraggle provided: if(player damagecount > 0 AND player attacker is valid AND player attacker != player) { // being attacked priority = 7; if(player health - old player health > 20) // **** { st_facecount = ST_TURNCOUNT; st_faceindex = ST_calcPainOffset() + ST_OUCHOFFSET; } else { // do normal pain face ... } ... } The line with four asterisks by it is the incorrect line. The "old player health" is the health since the last face widget update. If the player's current health minus the old health is greater than 20, that means the player's health increased, not decreased. But notice that this code segment is only entered when the player is counting down time since the last time he was hit (that's what damagecount is). Thus, the STFOUCH face only appears, as other people have noted, when you collect health while getting hurt at the same time. Inverting the test to if(old player health - player health > 20) fixes the error and makes the ouch face work properly, where it appears whenever you take more than 20 damage, and then changes back to the normal pain face after a few gametics (the priority = 7 line is what causes this). Somebody just got that one line backwards. 0 Share this post Link to post