[r1934] Custom pain states and 0 damage projectiles

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

[r1934] Custom pain states and 0 damage projectiles

Post by The Ultimate DooMer »

Before r1925 (at least), projectiles with 0 damage were able to cause monsters to enter their custom pain states if the painchance for that state was 255. This has stopped working at some point before r1925 (not sure when as I jumped to r1925 from quite a bit back, and confirmed this to be true for it and r1934)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [r1934] Custom pain states and 0 damage projectiles

Post by Graf Zahl »

Fixed bugs won't get reintroduced.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [r1934] Custom pain states and 0 damage projectiles

Post by Gez »

Use the FORCEPAIN flag.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Re: [r1934] Custom pain states and 0 damage projectiles

Post by The Ultimate DooMer »

Tried FORCEPAIN (before I created this thread) and nothing happened.

(on a side note that means that along with 2 of my items, BGPA's sonic grenades are now broken, since they used the mechanic too iirc. It was a neat exploit for items that do special things to monsters but without damaging them like GvH creeper balls do)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [r1934] Custom pain states and 0 damage projectiles

Post by Graf Zahl »

Sigh...

Why do people constantly have to abuse bugs instead of reporting them? How am I supposed to work in such an environment? One person reports the bug so it gets fixed and then 5 others come in and report the fix as a bug... :?

To make it short: No damage, no pain!
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Re: [r1934] Custom pain states and 0 damage projectiles

Post by The Ultimate DooMer »

I didn't know it was a bug. And I've no way of knowing unless it's reported as one before I exploit it.

(edit: maybe FORCEPAIN could be altered so it triggers the pain state even with 0 damage (like the wiki suggests), since there'd be no reason to use the flag on such a projectile otherwise)
User avatar
Enjay
 
 
Posts: 27332
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r1934] Custom pain states and 0 damage projectiles

Post by Enjay »

The Ultimate DooMer wrote:BGPA's sonic grenades are now broken
Heh, I just discovered this problem independently of this bug report.

http://forum.zdoom.org/viewtopic.php?f= ... 2&p=465716
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [r1934] Custom pain states and 0 damage projectiles

Post by randi »

Was 0 damage causing pain states reported as a bug before? I don't remember seeing it. Considering that the actor is still being struck by something, even though they aren't hurt by it, it seems perfectly reasonable for it to trigger pain frames.

And since we're talking about pain:
The Ultimate DooMer wrote:if the painchance for that state was 255
That leaves a 1 in 256 chance that it won't enter the pain state. The check is like this:
if random(0, 255) < painchance then enter pain state
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [r1934] Custom pain states and 0 damage projectiles

Post by Gez »

randy wrote:Considering that the actor is still being struck by something, even though they aren't hurt by it, it seems perfectly reasonable for it to trigger pain frames.
Even then, they would need a painthreshold of -1, now.

Also, if the FORCEPAIN flag does not force pain even for 0-damage projectiles, it's definitely a bug. There's code in there that's specifically to make sure that P_DamageMobj (which handles pain, among others) is called even when no damage is dealt if the inflictor has this flag.
User avatar
Enjay
 
 
Posts: 27332
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r1934] Custom pain states and 0 damage projectiles

Post by Enjay »

randy wrote:Was 0 damage causing pain states reported as a bug before?
From memory, being struck by a 0 damage projectile did not cause pain states. However, being struck by a 0 damage ripping projectile did. That's one of the reasons that I used a ripping projectile for my sonic grenades. ie, when I asked how to get this kind of effect, I was advised that a ripping projectile would be the way to do it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [r1934] Custom pain states and 0 damage projectiles

Post by Graf Zahl »

Grrrr. Why do some people have to do this...? Recommending hacks to solve a problem is really bad. Following that advice even worse! :twisted:
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [r1934] Custom pain states and 0 damage projectiles

Post by randi »

Enjay wrote:From memory, being struck by a 0 damage projectile did not cause pain states.
Referencing the original id Source, it should. I probably introduced this bug myself when I made negative missile damage do healing.
Post Reply

Return to “Closed Bugs [GZDoom]”