CanCollideWith for hitscans

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

argv
Posts: 184
Joined: Tue Aug 30, 2016 4:47 pm

CanCollideWith for hitscans

Post by argv »

As far as I can tell (both by testing and by reading the engine source), CanCollideWith is not called to decide whether hitscans can hit an actor (as opposed to going through harmlessly, as if the actor wasn't solid/shootable). If I'm correct, then please also call it with hitscan puffs or add some other way to similarly control hitscans.

The use case I have in mind is a “shield” actor that surrounds and protects another actor. Currently, there doesn't seem to be any way to do this without making the protected actor's own hitscan attacks hit the shield. I suppose another THRU flag could be added for this specific case, but generalizing it seems like a better idea.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: CanCollideWith for hitscans

Post by Major Cooke »

I asked about this a while ago and it was no'd. Can't remember why though...

You can use +HITTARGET/MASTER/TRACER though.
argv
Posts: 184
Joined: Tue Aug 30, 2016 4:47 pm

Re: CanCollideWith for hitscans

Post by argv »

Which post was it?

I found this one that's kind of related, but that request is served by CanCollideWith already.

HITTARGET/MASTER/TRACER requires changes to be made on projectile/puff classes, rather than being implemented through the weapon. That's not good for mod compatibility. It also applies after the puff/projectile has already hit, at which point it's too late to prevent bleeding/damage/whatnot.
Post Reply

Return to “Feature Suggestions [GZDoom]”