[UDMF] Linedefs that block hitscans?
Moderator: GZDoom Developers
[UDMF] Linedefs that block hitscans?
Can we have a linedef flag that blocks hitscans only? "Block everything" seems to block hitscans, so I assume there's already code to block hitscans...
Re: [UDMF] Linedefs that block hitscans?
I know this request is two years old. But is there a way to set lines blocking hitscans since then? 
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [UDMF] Linedefs that block hitscans?
Now there is.
Re: [UDMF] Linedefs that block hitscans?
I've found that:
But how can it be used? Will it be a flag in [wiki]Line_SetBlocking[/wiki] instead of railing or just an acs function or just an udmf property?Added ML_BLOCKHITSCAN line flag.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [UDMF] Linedefs that block hitscans?
UDMF property 'blockhitscan' and flag for Line_SetBlocking.
Re: [UDMF] Linedefs that block hitscans?
A quick question: If combined with the 3DMidtex flag, will the hitscan blocking property apply only to the area occupied by the texture? If so, that'd alleviate a lot of recent mapping headaches (with ZDCMP2 in particular -- we had to use transparent 3D floors as a hackaround!).
Re: [UDMF] Linedefs that block hitscans?
I think so. It wouldn't make sense if the whole wall-face blocked the hitscan bulletpuffs. Let alone the projectiles.will the hitscan blocking property apply only to the area occupied by the texture?
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [UDMF] Linedefs that block hitscans?
No. That's not how the hitscan trace code works.Xaser wrote:A quick question: If combined with the 3DMidtex flag, will the hitscan blocking property apply only to the area occupied by the texture? If so, that'd alleviate a lot of recent mapping headaches (with ZDCMP2 in particular -- we had to use transparent 3D floors as a hackaround!).
Re: [UDMF] Linedefs that block hitscans?
OK then, what will be the correct behaviour?No. That's not how the hitscan trace code works.
- NeuralStunner
-

- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [UDMF] Linedefs that block hitscans?
It will presumably block across the entire height of the line, like the other blocking flags.
Re: [UDMF] Linedefs that block hitscans?
That definitely monkey-wrenches its usefulness -- well, the usefulness of 3DMidtex, really, since the feature gap still persists.
When you say the hitscan trace code "doesn't work" like that, what exactly do you mean? That it doesn't know of 3dMidtex's existence at all? I understand if it needs additional code to even check for that case, at which point support for it is basically a new feature request.
When you say the hitscan trace code "doesn't work" like that, what exactly do you mean? That it doesn't know of 3dMidtex's existence at all? I understand if it needs additional code to even check for that case, at which point support for it is basically a new feature request.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [UDMF] Linedefs that block hitscans?
The check for 3DMidtex's is done in completely different places than the checks for the other flags. So in order to restrict their effect to the mid texture you'd have to add exclusion code to many, many places and then have to add special checks to the 3DMidtex code. It'll cause more problems than it's really worth.
- DoomRater
- Posts: 8270
- Joined: Wed Jul 28, 2004 8:21 am
- Preferred Pronouns: He/Him
- Location: WATR HQ
- Contact:
Re: [UDMF] Linedefs that block hitscans?
I'm cool with just being able to make a bunker where I can shoot rockets from a platform and I can't be sniped by a chaingun back. This can help tip the power back to projectiles in places where hitscans used to be king.
- NeuralStunner
-

- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [UDMF] Linedefs that block hitscans?
You can make a +SHOOTABLE object with a low [wiki=Actor_properties#ProjectilePassHeight]ProjectilePassHeight[/wiki]. This will allow rockets/plasma/whatever through, but not hitscans.
