CanCollideWith for hitscans

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

Moderator: GZDoom Developers

CanCollideWith for hitscans

Postby argv » Tue Nov 14, 2017 1:31 pm

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.
Joined: 30 Aug 2016

Re: CanCollideWith for hitscans

Postby Major Cooke » Tue Nov 14, 2017 4:42 pm

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

You can use +HITTARGET/MASTER/TRACER though.
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: CanCollideWith for hitscans

Postby argv » Wed Nov 15, 2017 12:10 am

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.
Joined: 30 Aug 2016

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests