title.jpg (14569 bytes)

frags.gif (1518 bytes) Adding trails to bullets frags.gif (1518 bytes)

Up ] SplatFest News ] SplatFest Project ] Downloads ] Contacts ] Mapping Tutorials ] Texture Tutorials ] Other Site Links ] Free Web based E-Mail ] Send Us Feedback ] Home Page ]

Home
Adding A Timer
Adding trails to bullets
Air Blaster
Alternate Fire
Backpacks
Bindable +/- Aliases
Bouncing Plasma
Cluster Grenades
Creating Classes
Forcing Teams
Grapping Hook
How to Use the +/- Button Method
Looking Around After Death
Lowering Weapon Switch Time
Player Speeds Vs. Weapons
Railgun Colors
Remote Detonation Pipe Bombs
Renable the Save/Load Menu
Rocket Bounce
Sniper Zoom
Team Stats
Teleporting Plasma Gun
Vampire Mod
Vunlerable Missles

e_l.jpg (1811 bytes) e_r.jpg (1821 bytes)

Back ] Next ]

frags.gif (1518 bytes) Adding trails to bullets: frags.gif (1518 bytes)

Created By: Hunter-Killer of Quick Phrag Productions

Yet another simple tutorial from Hunter-Killer. In this edition we will add a Matrix like trail effect to shotgun and machinegun bullets. Open cg_weapons.c in cgame and go to line 1535. It should look like this:


//FIXME: should probably move this cruft into CG_BubbleTrail
if ( sourceContentType == destContentType ) {
if ( sourceContentType & CONTENTS_WATER ) {
CG_BubbleTrail( start, tr.endpos, 32 );
}
} else if ( sourceContentType & CONTENTS_WATER ) {
trace_t trace;

trap_CM_BoxTrace( &trace, end, start, NULL, NULL, 0, CONTENTS_WATER );
CG_BubbleTrail( start, trace.endpos, 32 );
} else if ( destContentType & CONTENTS_WATER ) {
trace_t trace;

trap_CM_BoxTrace( &trace, start, end, NULL, NULL, 0, CONTENTS_WATER );
CG_BubbleTrail( tr.endpos, trace.endpos, 32 );
}

All we need to do is comment out the if's and call this regardless of contents. Change it to look like this:


/*
// FIXME: should probably move this cruft into CG_BubbleTrail
if ( sourceContentType == destContentType ) {
if ( sourceContentType & CONTENTS_WATER ) {
*/
CG_BubbleTrail( start, tr.endpos, 32 );
/*
}
} else if ( sourceContentType & CONTENTS_WATER ) {
trace_t trace;

trap_CM_BoxTrace( &trace, end, start, NULL, NULL, 0, CONTENTS_WATER );
CG_BubbleTrail( start, trace.endpos, 32 );
} else if ( destContentType & CONTENTS_WATER ) {
trace_t trace;

trap_CM_BoxTrace( &trace, start, end, NULL, NULL, 0, CONTENTS_WATER );
CG_BubbleTrail( tr.endpos, trace.endpos, 32 );
}
*/

There you go. It should look something like this: (note: I'm strafing to show the full trail)

Created By: Hunter-Killer of Quick Phrag Productions

e_l.jpg (1811 bytes) e_r.jpg (1821 bytes)

 

Quake III Arena is a trade mark of ID Software

Get ZZN