@@ -29,7 +29,6 @@ clsCannonball::clsCannonball() {
2929/* *********************************************************************************************************************************************/
3030void clsCannonball::enableDrag (void ) {
3131 blnDragEnabled = true ;
32- Drag_calcvalues ();
3332 if (Global::blnDebugMode) {printf (" Drag enabled.\n " );}
3433}
3534/* *********************************************************************************************************************************************/
@@ -117,7 +116,7 @@ void clsCannonball::update(double newdeltat) {
117116 if (total_v < Global::Physics::fMinVelocity || isnan (total_v) ) {
118117 blnstarted = false ;
119118 if (Global::blnDebugMode) {
120- if ( isnan (total_v) ) {printf (" Ball vel is Nan ; killing it\n " );}
119+ if ( isnan (total_v) ) {printf (" Ball vel is NaN ; killing it\n " );}
121120 else {printf (" Ball moving too slow; killing it\n " );}
122121 } // end if debug mode
123122 } // end if should kill
@@ -139,7 +138,6 @@ void clsCannonball::show() {
139138/* *********************************************************************************************************************************************/
140139void clsCannonball::setValues (double r, LOC init_place, double init_vel, double init_angle, uint ID) {
141140 props.radius = r; // in meters
142- props.density = Global::Physics::uBallDensity; // density of steel in kg/m^3
143141
144142 acc.x = 0.00 ;
145143 acc.y = Global::Physics::fGravity ;
@@ -154,7 +152,7 @@ void clsCannonball::setValues(double r, LOC init_place, double init_vel, double
154152 ballID = ID;
155153 blnstarted = true ;
156154
157-
155+ Drag_calcvalues ();
158156 if (Global::Config.values .blnDragMode ) { enableDrag (); }
159157}
160158/* *********************************************************************************************************************************************/
0 commit comments