From: <hel...@us...> - 2006-02-28 11:41:56
|
Revision: 10127 Author: hellcatv Date: 2006-02-28 03:41:54 -0800 (Tue, 28 Feb 2006) ViewCVS: http://svn.sourceforge.net/vegastrike/?rev=10127&view=rev Log Message: ----------- made first drawing pass only depend on target and saveparent(turret parent or me) Modified Paths: -------------- trunk/vegastrike/src/cmd/unit.cpp trunk/vegastrike/src/star_system.cpp Modified: trunk/vegastrike/src/cmd/unit.cpp =================================================================== --- trunk/vegastrike/src/cmd/unit.cpp 2006-02-28 11:40:06 UTC (rev 10126) +++ trunk/vegastrike/src/cmd/unit.cpp 2006-02-28 11:41:54 UTC (rev 10127) @@ -344,11 +344,11 @@ Matrix *ctm; Matrix invview; Transformation * ct; - if (cam_setup_phase) { + //if (cam_setup_phase) { this->cumulative_transformation = linear_interpolate(this->prev_physical_state, this->curr_physical_state, interpolation_blend_factor); this->cumulative_transformation.Compose(parent, parentMatrix); this->cumulative_transformation.to_matrix(this->cumulative_transformation_matrix); - } + //} ctm =&this->cumulative_transformation_matrix; ct = &this->cumulative_transformation; if (this->graphicOptions.FaceCamera==1) { Modified: trunk/vegastrike/src/star_system.cpp =================================================================== --- trunk/vegastrike/src/star_system.cpp 2006-02-28 11:40:06 UTC (rev 10126) +++ trunk/vegastrike/src/star_system.cpp 2006-02-28 11:41:54 UTC (rev 10127) @@ -357,15 +357,26 @@ cam_setup_phase=true; //int numships=0; - for (unsigned int sim_counter=0;sim_counter<=SIM_QUEUE_SIZE;++sim_counter) { + Unit * saveparent=_Universe->AccessCockpit()->GetSaveParent(); + Unit * targ; + if (saveparent) { + targ=saveparent->Target(); + } + for (unsigned int sim_counter=0;sim_counter<=SIM_QUEUE_SIZE&&(targ||saveparent);++sim_counter) { Unit *unit; UnitCollection::UnitIterator iter = physics_buffer[sim_counter].createIterator(); float backup=SIMULATION_ATOM; unsigned int cur_sim_frame = _Universe->activeStarSystem()->getCurrentSimFrame(); while((unit = iter.current())!=NULL) { - interpolation_blend_factor=calc_blend_factor(saved_interpolation_blend_factor,unit->sim_atom_multiplier,unit->cur_sim_queue_slot,cur_sim_frame); - SIMULATION_ATOM = backup*unit->sim_atom_multiplier; - ((GameUnit<Unit> *)unit)->Draw(); + if (unit==saveparent||unit==targ) { + interpolation_blend_factor=calc_blend_factor(saved_interpolation_blend_factor,unit->sim_atom_multiplier,unit->cur_sim_queue_slot,cur_sim_frame); + SIMULATION_ATOM = backup*unit->sim_atom_multiplier; + ((GameUnit<Unit> *)unit)->Draw(); + if (unit==saveparent) + saveparent=NULL; + if (unit==targ) + targ=NULL; + } iter.advance(); //numships++; } |