Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

QuakeC awareness of lighting?

| Inside3d Forums Forum Index -> QuakeC Programming

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 |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group