I have been trying to get the beginings of an animation suport and for some reason I can't get the properties string to parse without crashing
I tried replaceing the string with a constant but it still crashes at this line
subsystemp->ai_rotation->min = (float)atof("90");
made changes to set_subsystem_info in modelread.cpp
so far this is all I've done (also made changes to the necisary structure)
// CASE OF AI ROTATION
else if ( (p = strstr(props, "$ai")) != NULL) {
get_user_prop_value(p+3, buf);
subsystemp->flags |= MSS_FLAG_AI_ROTATE;
//reading early animation suport-Bobboau
if(!stricmp("dock",buf)){
mprintf(("model has AI animation, %s", buf));
if((p = strstr(props, "$up")) != NULL){
get_user_prop_value(p+3, buf);
mprintf((" up"));
subsystemp->ai_rotation->min = (float)(atof("90"));
}
if((p = strstr(props, "$down")) != NULL){
mprintf(("down"));
get_user_prop_value(p+5, buf);
subsystemp->ai_rotation->max = (float)atof("0");
}
// if((p = strstr(props, "$time")) != NULL){
// mprintf(("time"));
// get_user_prop_value(p+5, buf);
subsystemp->ai_rotation->time = (int)(turn_time * 1000);
// }
mprintf(("animation values, %f %f %d", subsystemp->ai_rotation->min, subsystemp->ai_rotation->max, subsystemp->ai_rotation->time));
}
// get parameters - ie, speed / dist / other ??
// time to activate
// condition
}
ok it seems to be something with the data structure it's going into..
agg never mind, I foget it was a pointer
ignor this thread for the time being, I'm sure I'll need some help later on