[Latest] Psychic Sigil 1 does not damage Spectres

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Latest] Psychic Sigil 1 does not damage Spectres

Re: [Latest] Psychic Sigil 1 does not damage Spectres

by Graf Zahl » Sat Jun 09, 2012 3:46 am

No, it doesn't. The way this function works it just doesn't need that flag on the spot.
However, if you use some of the generic functions it can't do the same assumptions.

Re: [Latest] Psychic Sigil 1 does not damage Spectres

by Xaser » Sat Jun 09, 2012 3:35 am

Ah, thanks -- that fixed it. Surprised it never had it set, though, even moreso now that the original worked anyway. A_FireSigil1 is doing some wizardry.

Re: [Latest] Psychic Sigil 1 does not damage Spectres

by randi » Fri Jun 08, 2012 10:33 pm

This is because SpectralLightningSpot isn't spectral. It's just a spot displayed for effect. You can add +SPECTRAL to your subclasses, and they'll get their FriendPlayer set when spawned.

Re: [Latest] Psychic Sigil 1 does not damage Spectres

by Xaser » Sun Jun 03, 2012 5:23 pm

No dice. I have it set on both of them and it doesn't seem to make a difference. I am using Linetarget to doublecheck if the Spectre has actually lost any health, and it remains the same.

Re: [Latest] Psychic Sigil 1 does not damage Spectres

by Graf Zahl » Sun Jun 03, 2012 5:17 pm

Try giving the spot a +SEEKERMISSILE flag (but not +MISSILE!)

It uses the 'tracer' field to track its player and that's not set unless you declare your missile to be able to seek.

[Latest] Psychic Sigil 1 does not damage Spectres

by Xaser » Sun Jun 03, 2012 5:09 pm

I've run into a major problem in Psychic. that I can't fix at all mod-side.

The mod redefines the Sigil for Strife, but the new version ("PsySigil") cannot actually inherit from Sigil because it needs to inherit from Psychic's base weapon definition to allow casing of altfires. Everything works as expected except for A_FireSigil1 emulation, which results in a nasty bug in which Spectres are unkillable due to the way the SPECTRAL flag is handled.

The problem is on line 989 of p_interaction.cpp, in the function P_DamageMobj:

Code: Select all

...
else if (target->flags4 & MF4_SPECTRAL)
{
	if (inflictor->FriendPlayer == 0 && !target->IsHostile(inflictor)) // Line 989
		return;
}
...
The problem is that any attempt to A_FireCustomMissile a SpectralLightningSpot results in the projectiles "forgetting" which player shot it (i.e. inflictor->FriendPlayer becomes zero) and causing the check on Line 989 to 'pass' and break out of P_DamageMobj. This results in a SPECTRAL projectile which successfully impacts the monster but deals no damage.

I thought the trouble with SpectralLightningSpot was due to it not actually being a projectile, but I've tried redefining it with +MISSILE (and +FLOORHUGGER and a bunch of A_ScaleVelocity hacks) and using A_SpawnItemEx with SXF_TRANSFERPOINTERS to spawn the SpectralLightningV1/V2 projectiles, but no matter what I do, I can't get the engine to pass the check.

The purpose of this check, if I'm interpreting it correctly, is to not take damage from Spectral projectiles unless a player fired it or the monster who shot it is hostile toward the target, presumably to prevent infighting between Spectres and EntitySecond actors unless Thing_Hate is used. The trouble is that it also cancels damage from this projectile in a way I cannot figure out how to fix, and some way around this or alternative to this hardcoded check would be most welcome. As-is, I cannot figure out how on Earth to emulate Sigil 1's attack without running into this issue, which throws a monkey wrench into Strife modding.

Top