[since old times] A morphprojectile affects allied players
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.
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.
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
[since old times] A morphprojectile affects allied players
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?
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?
- Graf Zahl
- 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
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.
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: [since old times] A morphprojectile affects allied playe
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.
Re: [since old times] A morphprojectile affects allied playe
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.Edward-san wrote:Question: is that inherited from Heretic/Hexen or a mistake by ZDoom?
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).
- 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
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.Eruanna wrote:...you may want "friend morph" projectiles (i.e. give a fellow player a "superman" morph in a coop game).
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: [since old times] A morphprojectile affects allied playe
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.
[edit] Done. When team damage is off, the projectile passes through the allied player, but I don't know if it makes sense.
- Graf Zahl
- 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
I don't like how you did it. Shouldn't this be part of AMorphProjectile::DoSpecialDamage?
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: [since old times] A morphprojectile affects allied playe
The virtual function DoSpecialDamage doesn't pass the source. Should I add it as a parameter?
- Graf Zahl
- 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
The source of the projectile or the damage inflictor? Isn't projectile->target enough?
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: [since old times] A morphprojectile affects allied playe
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?
- Graf Zahl
- 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
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);
p_map.cpp line 1383: int newdam = P_DamageMobj(thing, tm.thing, tm.thing->target, damage, tm.thing->DamageType);
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: [since old times] A morphprojectile affects allied playe
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.
- Graf Zahl
- 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
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!
- Graf Zahl
- 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
And where's the update?
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: [since old times] A morphprojectile affects allied playe
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.