Inside3D!
     

EF_BLUE/EF_RED = EF_DIMLIGHT

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



Joined: 12 Jan 2007
Posts: 413
Location: Brazil

PostPosted: Sun Apr 04, 2010 2:43 pm    Post subject: EF_BLUE/EF_RED = EF_DIMLIGHT Reply with quote

Well I didn't found any meaningful subject for this topic, but my question is, how can I do, on SSQC, detect if a player's engine support EF_BLUE/EF_RED or not? Because I have a CTF mod that the flags use EF_BLUE/RED. When I connect to the server with DP, JoeQuake, QRack, Tenebrae etc, the effects work. OK. But when I connect with any Software engine, or FitzQuake, or the regular GLQuakes, GLProQuake, etc the effects isn't there, making the flags almost unable to see in the dark.

QW does that, but you don't need to do anything on QC.

How can I "detect" which engine someone's using with SSQC, in NQ, to put the flags EF_DIMLIGHT instead of EF_BLUE/RED on an engine that doesn't support these effects?

Any help will be appreciated.
_________________
There's no signature here. Stop looking for one.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Sun Apr 04, 2010 4:48 pm    Post subject: Reply with quote

checkextension("DP_EF_BLUE")?


Alternatively, how well does self.effects = EF_DIMLIGHT|EF_BLUE; work?


The other thing is that just because an engine supports ef_bluelight doesn't mean that all clients do. So yeah, try to use both flags at the same time (you should find that one generally takes precidence over another).
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Sun Apr 04, 2010 9:38 pm    Post subject: Reply with quote

Exactly, including EF_BLUE or EF_RED in the team flag portion ie:
Code:

void () item_flag_team1 =
{
   self.team      = 5;   
   self.items     = IT_KEY2;   
   self.owner     = world;      
   self.effects   = self.effects | EF_RED;


where as the flag will also gain the normal glow when the flag is spawned

example
Code:

void () place_flag =
{
   self.mdl       = self.model;
   self.flags     = FL_ITEM;
   self.solid     = SOLID_TRIGGER;
   self.movetype  = MOVETYPE_TOSS;
   self.velocity  = VEC_ORIGIN;   
   self.effects   = self.effects | EF_DIMLIGHT;      


This will basically overlap the colored light over the dimlight if the engine supports it, or otherwise it will just display the normal EF_DIMLIGHT.
On a side note, in Qrack the radius of the colored light is maybe 10% larger than the dimlight this allows the inner area to be brightened like normal and the outer edge/surfaces to be the "highlight" color, this way EF_BLUE | EF_DIMLIGHT work together...
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