View previous topic :: View next topic |
Author |
Message |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Sun Nov 30, 2008 10:41 pm Post subject: QuakeC awareness of lighting? |
|
|
Can QuakeC ... even if it requires some DP or FTE extension .. be aware of the lighting level that, say, a player is in?
Theoretical uses:
1. solar-powered armor or something that doesn't recharge in lower light levels.
2. A true ring of shadows where the player is totally invisible to monsters/other players if the player is in a sufficiently "dark place".
I'm assuming the answer is no, but my QuakeC knowledge is still rather limited. |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 478
|
Posted: Sun Nov 30, 2008 10:53 pm Post subject: Re: QuakeC awareness of lighting? |
|
|
Two ways, at least that I can think of.
Without any sort of engine code, you can search for any light entities within a certain radius. Not very good, I dunno.
Maybe you can refine that by checking if there are any walls in the way, thus detecting "shadows" to an extent.
Other way is a bit more obvious and just uses DarkPlace's getlight function. |
|
Back to top |
|
 |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Mon Dec 01, 2008 12:20 am Post subject: |
|
|
There's an extension for this in dpextensions.qc _________________ Look out for Twigboy |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Mon Dec 01, 2008 1:07 am Post subject: |
|
|
Urre wrote: | There's an extension for this in dpextensions.qc |
Thanks! |
|
Back to top |
|
 |
|