[since old times] A morphprojectile affects allied players

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.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

[since old times] A morphprojectile affects allied players

Post by Edward-san »

From zandronum bug ticket 2905.

It's present an example wad. Load it, summon Chickengun, make sure switch on pickup is on, pick the weapon, summon a bot and fire the weapon against it.

Question: is that inherited from Heretic/Hexen or a mistake by ZDoom? If it should be fixed, should friend actors, too, be immune to morphing?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [since old times] A morphprojectile affects allied playe

Post by Graf Zahl »

Think about what a normal projectile does to an allied player. This should behave identically, i.e. if the normal projectile hurts, this one should morph, if the normal one does not, it shouldn't morph. I can't recall right now what options exist here.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [since old times] A morphprojectile affects allied playe

Post by Edward-san »

AFAIR the only way to damage an allied player is when 'team damage' is on. So the bug here is that morphing is done even if 'team damage' is off.
User avatar
Rachael
Posts: 13956
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [since old times] A morphprojectile affects allied playe

Post by Rachael »

Edward-san wrote:Question: is that inherited from Heretic/Hexen or a mistake by ZDoom?
Team Damage is something new to ZDoom, it did not even exist in Heretic/Hexen, so in that game you always had the ability to damage other players as well as morphing them, as far as I know.

I doubt there's many mods that depend on the present behavior, but fixing this may require additional actor flags, IMO, because you may want "friend morph" projectiles (i.e. give a fellow player a "superman" morph in a coop game).
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [since old times] A morphprojectile affects allied playe

Post by Ed the Bat »

Eruanna wrote:...you may want "friend morph" projectiles (i.e. give a fellow player a "superman" morph in a coop game).
The issue of 'good' morphs vs 'bad' morphs is one that already could stand to be re-evaluated. For instance, the DONTMORPH flag is absolute, even if a modder would want an actor protected from bad morphs but still able to collect good morphs. Some more control would be very desirable. The fact that PowerMorph even exists means there's already supposed to be some distinction between good and bad morphs.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [since old times] A morphprojectile affects allied playe

Post by Edward-san »

I have a fix for the allied players, though, as always, the function to change is the messed one. I'll make a PR for that.

[edit] Done. When team damage is off, the projectile passes through the allied player, but I don't know if it makes sense.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [since old times] A morphprojectile affects allied playe

Post by Graf Zahl »

I don't like how you did it. Shouldn't this be part of AMorphProjectile::DoSpecialDamage?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [since old times] A morphprojectile affects allied playe

Post by Edward-san »

The virtual function DoSpecialDamage doesn't pass the source. Should I add it as a parameter?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [since old times] A morphprojectile affects allied playe

Post by Graf Zahl »

The source of the projectile or the damage inflictor? Isn't projectile->target enough?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [since old times] A morphprojectile affects allied playe

Post by Edward-san »

I mean literally 'source', one of the parameters of P_DamageMobj, because that's what's used when checking for teammates. If you say 'inflictor->target' is enough, why is 'source' used?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [since old times] A morphprojectile affects allied playe

Post by Graf Zahl »

Because it may matter in other situations, but in the case of a projectile hitting a shootable actor it's the same thing, if you examine the one single relevant call to this function responsible here.

p_map.cpp line 1383: int newdam = P_DamageMobj(thing, tm.thing, tm.thing->target, damage, tm.thing->DamageType);
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [since old times] A morphprojectile affects allied playe

Post by Edward-san »

Updated. One funny part is that it's possible to make the player morph by making it fire against its voodoo doll counterpart. Also it ignores invulnerabilities, but I guess that's okay.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [since old times] A morphprojectile affects allied playe

Post by Graf Zahl »

Edward-san wrote:Updated. One funny part is that it's possible to make the player morph by making it fire against its voodoo doll counterpart.

Yes, and there's mods which actually depend on it!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [since old times] A morphprojectile affects allied playe

Post by Graf Zahl »

And where's the update?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [since old times] A morphprojectile affects allied playe

Post by Edward-san »

Ah, you closed the pull. I force-pushed in the same branch, so if it was left open, it would show you the new commit. Anyway, here.
Post Reply

Return to “Closed Bugs [GZDoom]”