Forum

EF_BLUE/EF_RED = EF_DIMLIGHT

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

EF_BLUE/EF_RED = EF_DIMLIGHT

Postby Orion » Sun Apr 04, 2010 2:43 pm

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.
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby Spike » Sun Apr 04, 2010 4:48 pm

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).
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby r00k » Sun Apr 04, 2010 9:38 pm

Exactly, including EF_BLUE or EF_RED in the team flag portion ie:
Code: Select all
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: Select all
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...
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest