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.
CanCollideWith for hitscans
Moderator: GZDoom Developers
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: CanCollideWith for hitscans
I asked about this a while ago and it was no'd. Can't remember why though...
You can use +HITTARGET/MASTER/TRACER though.
You can use +HITTARGET/MASTER/TRACER though.
Re: CanCollideWith for hitscans
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.
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.