I remember something like this from HL1 where some code would affect
how likely a NPC would spot you if you were hidden in the shadows.

That said, I use the following in one of my VGUI panels to check how
bright I need to make a DLIGHT to illuminate something:

float ambient = engine->GetLightForPoint( origin, true ).Length();

That might be what you need.

- Jed

On 02/11/2007, Michael Tilden <[EMAIL PROTECTED]> wrote:
> --
> [ Picked text/plain from multipart/alternative ]
> I was just wondering if there was a built-in way to check if an NPC is in a
> shadowed area or a lighted one. I've tried looking through base npc files
> but haven't found anything that jumps out about checking if an NPC is in a
> dark area or a lit up one. If someone knows something about this and/or can
> show some code I'd really appreciate it, I have a pressing need to know
> whether or not an NPC is in a lit area or a dark one, specifically an
> npc_zombie. Thanks!
>
> Mike
> --
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to