add
int numframes[MAX_MODEL_TEXTURES]; // number o frames-Bobboau
int fps[MAX_MODEL_TEXTURES]; // frames per second-Bobboau
int is_ani[MAX_MODEL_TEXTURES]; // flag for weather this texture is an ani-Bobboau
to the polymodel structure in model.h
in the case ID_TXTR of read_model_file
replace (the bold part is what is replaced)
if ( strstr(tmp_name, "thruster") || strstr(tmp_name, "invisible") || strstr(tmp_name, "warpmap") ) { //added warp map for subspace rift rendering-Bobboau
// Don't load textures for thruster animations or invisible textures
pm->textures[i] = -1;
[b]} else {
pm->textures[i] = bm_load( tmp_name );
}[/b]
with
} else {
pm->textures[i] = bm_load( tmp_name );
if (pm->textures[i]<0) { //if I couldn't find the PCX see if there is an ani-Bobboau
nprintf(("couldn't find %s.pcx",tmp_name));
pm->is_ani[i] = 1; //this is an animated texture
pm->textures[i] = bm_load_animation(tmp_name, &pm->numframes[i], &pm->fps[i], 1);
if(pm->textures[i]<0){
Warning( LOCATION, "Couldn't open texture '%s'\nreferenced by model '%s'\n", tmp_name, pm->filename );
pm->textures[i] = -1;
pm->is_ani[i] = 0; //this isn't an animated texture after all
nprintf((" or %s.ani\n",tmp_name));
}else{
mprintf(("but I did find %s.ani, ", tmp_name));
mprintf(("with %d frames, ", pm->numframes[i]));
mprintf(("and a rate of %d\n", pm->fps[i]));
}
}
}
and
were in model_interp_tmappoly it says
texture = pm->textures[w(p+40)];//here is were it picks the texture to render for ani-Bobboau
replace with
if (pm->is_ani[w(p+40)]){
texture = pm->textures[w(p+40)] + ((timestamp() / (int)(pm->fps[w(p+40)])) % pm->numframes[w(p+40)]);//here is were it picks the texture to render for ani-Bobboau
}else{
texture = pm->textures[w(p+40)];//here is were it picks the texture to render for normal-Bobboau
}
that was easier than it should have been, after I set my mind to it it took all of about fifteen minutes to get working (note I haven't tested this in game, only the tech room, I may need to page this in still)
and the exe is in my latest revision of
TBP open(if you don't want to mess with the TBP stuff just extract the exe)