Solatar
A) are you useing the -htl comand line option
B) what was the last build that worked for you
and becase I did a little experement that failed miserably I'm going to post the change to the trail rendering function so I can copy and paste it into a fresh copy
void trail_render( trail * trailp )
{
TIMERBAR_PUSH(6);
gr_set_lighting(false,false);//this shouldn't need to be here but it does need to be here, WHY!!!!!!!?-Bobboau
trail_info *ti;
if ( trailp->tail == trailp->head ) return;
ti = &trailp->info;
vector topv, botv, *fvec, last_pos, tmp_fvec;
vertex top, bot;
int sections[NUM_TRAIL_SECTIONS];
int num_sections = 0;
int n = trailp->tail;
// if this trail is on the player ship, and he's in any padlock view except rear view, don't draw
if((Player_ship != NULL) && trail_is_on_ship(trailp - Trails, Player_ship) && (Viewer_mode & (VM_PADLOCK_UP | VM_PADLOCK_LEFT | VM_PADLOCK_RIGHT)) ){
return;
}
do {
n--;
if ( n < 0 ) n = NUM_TRAIL_SECTIONS-1;
if ( trailp->val[n] > 1.0f ) {
break;
}
sections[num_sections++] = n;
} while ( n != trailp->head );
int i;
vertex *vlist[MAX_TRAIL_POLYS];
vertex v_list[MAX_TRAIL_POLYS];
int nv = 0;
for (i=0; i {
if(nv>MAX_TRAIL_POLYS-3)Error( LOCATION, "too many verts in trail render\n" );
n = sections[i];
float w;
ubyte l;
w = trailp->val[n]*(ti->w_end - ti->w_start) + ti->w_start;
l = (ubyte)fl2i((trailp->val[n]*(ti->a_end - ti->a_start) + ti->a_start)*255.0f);
vector pos;
pos = trailp->pos[n];
if ( i == 0 ) {
//fvec =
//&objp->orient.fvec;
if ( num_sections > 1 ) {
vm_vec_sub(&tmp_fvec, &pos, &trailp->pos[sections[i+1]] );
vm_vec_normalize_safe(&tmp_fvec);
fvec = &tmp_fvec;
} else {
fvec = &tmp_fvec;
fvec->xyz.x = 0.0f;
fvec->xyz.y = 0.0f;
fvec->xyz.z = 1.0f;
}
} else {
vm_vec_sub(&tmp_fvec, &last_pos, &pos );
vm_vec_normalize_safe(&tmp_fvec);
fvec = &tmp_fvec;
}
trail_calc_facing_pts( &topv, &botv, fvec, &pos, w );
if(!Cmdline_nohtl){
g3_transfer_vertex( &top, &topv );
g3_transfer_vertex( &bot, &botv );
}else{
g3_rotate_vertex( &top, &topv );
g3_rotate_vertex( &bot, &botv );
}
top.a = bot.a = l;
if ( i > 0 ) {
if ( i == num_sections-1 ) {
// Last one...
vector centerv;
vm_vec_avg( ¢erv, &topv, &botv );
if(!Cmdline_nohtl){
g3_transfer_vertex( &v_list[nv+2], ¢erv );
}else{
g3_rotate_vertex( &v_list[nv+2], ¢erv );
}
v_list[nv].a = l;
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i); vlist[nv]->v = 1.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;;
nv++;
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i); vlist[nv]->v = 0.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i+1); vlist[nv]->v = 0.5f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=0; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;
} else {
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i); vlist[nv]->v = 1.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i); vlist[nv]->v = 0.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;
}
}
last_pos = pos;
v_list[nv] = top;
v_list[nv+1] = bot;
}
if(!nv)return;
if(nv<3)Error( LOCATION, "too few verts in trail render\n" );
if(nv>MAX_TRAIL_POLYS-1)Error( LOCATION, "too many verts in trail render\n" );
gr_set_bitmap(ti->bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
if ( D3D_enabled || OGL_inited ) {
if(Cmdline_nohtl)g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED|TMAP_FLAG_ALPHA|TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_FLAG_TRISTRIP );
else g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED|TMAP_FLAG_ALPHA|TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_HTL_3D_UNLIT | TMAP_FLAG_TRISTRIP );
} else {
if(Cmdline_nohtl)g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED | TMAP_FLAG_TRISTRIP);
else g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED | TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT | TMAP_FLAG_TRISTRIP);
}
TIMERBAR_POP();
}