Cg_noProjectileTrail - for 1.16n
Some weapons have smoke trail that run behind them. In quake 3 version 1.27 I thank. dont quote me on that. ID put in cg_noProjectileTrail Cvar to remove some of the smoke from weapons not all weapon but well will be addeding some to what thy removed.
First we will need to put in or Cvar's to open and close the thing. This is all client side so we only need to work with cgame folder.
in cg_main.c add to list of vmCvar_t -= note this opens the cvar so engien can read it.=-
vmCvar_t cg_noProjectileTrail;
lower down add this to set values. AKA -- static cvarTable_t
{ &cg_noProjectileTrail, "cg_noProjectileTrail", "0", CVAR_ARCHIVE},
Now go to cg_local.h and look for the extern vmCvar_t list -= Note this will close the Cvar back up =-. Any time you open a Cvar you must allso close it else quake gets piss-off and crashes. if it compiles at all.
Add to list of exit Cvar's
extern vmCvar_t cg_noProjectileTrail;
Now open up cg_effects.c and look for CG_BubbleTrail Should look something like this.
void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ) {
vec3_t move;
vec3_t vec;
float len;
int i;
// Added - remove buble trails from weapon
if ( cg_noProjectileTrail.integer ) {
return;
}
//end
VectorCopy (start, move);
VectorSubtract (end, start, vec);
len = VectorNormalize (vec);
As you can see we add the new integer at the top of this string.
Now were of to cg_weapons.c
look for CG_RocketTrail and added you new code right under localEntity_t *smoke; like so.
static void CG_RocketTrail( centity_t *ent, const weaponInfo_t *wi ) {
int step;
vec3_t origin, lastPos;
int t;
int startTime, contents;
int lastContents;
entityState_t *es;
vec3_t up;
localEntity_t *smoke;
// added code
if ( cg_noProjectileTrail.integer ) {
return;
}
//end added
up[0] = 0;
up[1] = 0;
up[2] = 0;
OK in most cases that is all there is to it if you use the new plasema code you may need add it yo that and any thing else you added extera smoke to like shotgun and so on .
Play hard -- Powerr