QSG_Versioning 1.44

Short text on how to use the versioning in your mods to use TQ specific stuff but still make the mod work in original quake.

This standards are still in development and are VERY likely to change.

Supported extension

TQ_DLIGHTS	Use when using brush and model glows	   (self.glow_size, self.glow_red, seld.glow_green, self.glow_blue)
TQ_RAIN		Use when using rain brushes 		   (TE_RAIN)
TQ_SNOW		Use when using snow brushes		   (TE_SNOW)
TQ_LIGHTNING	Use when using lightning brushes	   (TE_LIGHTNING)
TQ_RAILTRAIL	Use when using the railgun		   (TE_RAILTRAIL)
TQ_PLASMA	Use when using the plasma gun		   (TE_PLASMA)
TQ_SLOWMO	Use to slow down  pr speed up game speed   (slow-mo)
QSG_ALPHA	Use when using brush and model alphas	   (self.alpha)
QSG_SCALE	Use when using with brush and model scales (self.scale)
QSG_BUTTONS	Not sure how to use this one yet
QSG_QUAKE2MODE	Use when using md2's		

add this do defs.qc

float qsg_allowed;

float TQ_DLIGHTS;
float TQ_RAIN;
float TQ_SNOW;
float TQ_LIGHTNING;
float TQ_RAILTRAIL;
float TQ_PLASMA;
float TQ_SLOWMO
float QSG_ALPHA;
float QSG_SCALE;
float QSG_BUTTONS;
float QSG_QUAKE2MODEL;

and add this to world.qc in void() worldspawn =

	qsg_allowed = cvar("QSG_VERSION");

	if (qsg_allowed)
	{
		TQ_DLIGHTS 	= checkextension("TQ_DLIGHTS");
		TQ_RAIN 	= checkextension("TQ_RAIN");
		TQ_SNOW 	= checkextension("TQ_SNOW");
		TQ_LIGHTNING	= checkextension("TQ_LIGHTNING");
		TQ_RAILTRAIL 	= checkextension("TQ_RAILTRAIL");
		TQ_PLASMA 	= checkextension("TQ_PLASMA");
		TQ_SLOWMO	= checkextension("TQ_SLOWMO");
		QSG_ALPHA 	= checkextension("QSG_ALPHA");
		QSG_SCALE 	= checkextension("QSG_SCALE");
		QSG_BUTTONS 	= checkextension("QSG_BUTTONS");
		QSG_QUAKE2MODEL = checkextension("QSG_QUAKE2MODEL");
	}

now if the engine u are using have any of these... then it will return true

so for example

void () fade_bullethole =
{
	if (QSG_ALPHA)
	{
		self.alpha = self.alpha - 0.05;
	
		if (self.alpha < 0.06)
			self.think = SUB_Remove;
		else
			self.think = fade_bullethole;
		self.nextthink = time + 0.1;
	}
	else
		self.think = SUB_Remove;
};

if the engine currently running supports QSG_ALPHA.... then the bullethole will fade... if not it will just simply be removed...

I suck at explaining... so this is the best i can do at the moment...
