ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.66k stars 616 forks source link

[HL] Barnacle tongues are invisible underwater #3794

Open rjd1922 opened 2 months ago

rjd1922 commented 2 months ago

Barnacle tongues cannot be seen underwater, which can easily blindside players in the maps c2a3a and c3a1a when they are suddenly pulled up by seemingly nothing. 20240718161816_1 c3a1a0000

rjd1922 commented 1 month ago

Oddly, this issue isn't present in Blue Shift. 20240720230010_1

Adambean commented 3 weeks ago

This happens because the water in c2a3a and c3a1a is a regular world brush as part of the map's "worldspawn" entity. The water you mention in Blue Shift is a "func_water" entity, which it needs to be so that it can rise when the flow control valve is turned.

The reason for this is that when you pass through a water surface of a world brush (as in c2a3a/c3a1a) the water's surface is also compiled as a visibility portal, as the opaque face couldn't possibly allow anything to be seen the other side of it. (Or so we'd think.) The visibility origin for the barnacle is at the top centre of its body, where it attaches to the ceiling, therefore the whole model is culled from your player visible set. This doesn't happen with "func_water" because the surface of this entity does not compile into a visibility portal.

Not a solution, just an insight into the issue. (We've looked into it already for Sven Co-op, it's not a simple one to solve.)

The same problem will happen without water if a barnacle is placed behind a high wall with a low cutout (e.g. hole for a door): Here is a crude drawing from 7 months ago of the problem: image

This can be replicated in a section of Office Complex: image