I’m trying to figure out when a trace hits glass, however, some windows, like the ones in cs_office have a NoDraw on the backside, causing the trace’s table to have MatType as MAT_CONCRETE and SurfaceProps as 0. This can be worked around serverside with Entity:GetMaterialType(), however, that is not available on the client.
This is probably no help whatsoever since the window probably isn’t an entity with a model but I found that using
util.GetModelInfo clientside gives you the surface material for a model at some point in the table
Also, why do you need to do a clientside trace rather than a networked one?
Entity’s model returns *2 instead of notexture; never seen that before. And I need it clientside since it’s in a predicted weapon context, so it can be ran multiple times.
Wait, so it actually did something? Wow, I didn’t expect that… maybe try doing
util.GetSurfacePropName on that 2? You probably meant that it’s a string with the characters '’ and ‘2’ in it though
No, the GetMaterial string was “*2”. The trace’s SurfaceProps was still 0.
[editline]10th August 2016[/editline]
2 is “metal_box” anyway.
Is this a case of this? (just being nitpicky, ignore me)
Yeah, you’re right. English was not my first written language so I tend to follow grammar really strictly.
FYI, *2, *3 and stuff are map brush models. They are unique for each map (obviously).
Tracing past on HitNoDraw seems to be the only way