Inside3D!
     

QuakeC awareness of lighting?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Sun Nov 30, 2008 10:41 pm    Post subject: QuakeC awareness of lighting? Reply with quote

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
View user's profile Send private message
Downsider



Joined: 16 Sep 2008
Posts: 478

PostPosted: Sun Nov 30, 2008 10:53 pm    Post subject: Re: QuakeC awareness of lighting? Reply with quote

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
View user's profile Send private message
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Mon Dec 01, 2008 12:20 am    Post subject: Reply with quote

There's an extension for this in dpextensions.qc
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Mon Dec 01, 2008 1:07 am    Post subject: Reply with quote

Urre wrote:
There's an extension for this in dpextensions.qc


Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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