CanCollideWith for hitscans

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 ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: CanCollideWith for hitscans

Re: CanCollideWith for hitscans

by argv » Tue Nov 14, 2017 11:10 pm

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.

Re: CanCollideWith for hitscans

by Major Cooke » Tue Nov 14, 2017 3: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.

CanCollideWith for hitscans

by argv » Tue Nov 14, 2017 12: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.

Top