Fixed some indentation, I stumbled across (spaces vs tabs)
authorKent Mein <mein@cs.umn.edu>
Mon, 5 May 2008 17:29:11 +0000 (17:29 +0000)
committerKent Mein <mein@cs.umn.edu>
Mon, 5 May 2008 17:29:11 +0000 (17:29 +0000)
and also removed return 0 from a void stub.

Kent

source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp

index 291dd70c801f7c81aba190a7c223c18695babea1..c913820205b4ac8cadb66fb6174f2b40414fe355 100644 (file)
@@ -355,7 +355,7 @@ TimeMarker *get_frame_marker(int frame){return 0;};
 
 /* editseq.c */
 Sequence *get_forground_frame_seq(int frame){return 0;};
-void set_last_seq(Sequence *seq){return 0;};
+void set_last_seq(Sequence *seq){};
 
 /* modifier.c stub */
 void harmonic_coordinates_bind(struct MeshDeformModifierData *mmd,
index 08e9e36c0483f5411a16da8d046ed11ffb103de7..089af9a68e7a6999b433991662404b7690b95db4 100644 (file)
@@ -2176,70 +2176,71 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
        {
                KX_GameObject* gameobj = (KX_GameObject*) sumolist->GetValue(i);
                struct Object* blenderobject = converter->FindBlenderObject(gameobj);
-               int nummeshes = gameobj->GetMeshCount();
-               RAS_MeshObject* meshobj = 0;
-        ListBase *conlist;
-        bConstraint *curcon;
-        conlist = get_active_constraints2(blenderobject);
-        if (conlist) {
-            for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) {
-                if (curcon->type==CONSTRAINT_TYPE_RIGIDBODYJOINT){
-                    bRigidBodyJointConstraint *dat=(bRigidBodyJointConstraint *)curcon->data;
-                    //if (dat->tar)
-                        if (!dat->child){
-                                                       PHY_IPhysicsController* physctr2 = 0;
-                                                       if (dat->tar)
-                                                       {
-                                                               KX_GameObject *gotar=getGameOb(dat->tar->id.name,sumolist);
-                                                               if (gotar && gotar->GetPhysicsController())
-                                                                       physctr2 = (PHY_IPhysicsController*) gotar->GetPhysicsController()->GetUserData();
-                                                       }
+               ListBase *conlist;
+               bConstraint *curcon;
+               conlist = get_active_constraints2(blenderobject);
 
-                                                       if (gameobj->GetPhysicsController())
-                                                       {
-                                                               float radsPerDeg = 6.283185307179586232f / 360.f;
+               if (conlist) {
+                       for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) {
+                               if (curcon->type==CONSTRAINT_TYPE_RIGIDBODYJOINT){
+
+                                       bRigidBodyJointConstraint *dat=(bRigidBodyJointConstraint *)curcon->data;
+
+                                       if (!dat->child){
+
+                                               PHY_IPhysicsController* physctr2 = 0;
+
+                                               if (dat->tar)
+                                               {
+                                                       KX_GameObject *gotar=getGameOb(dat->tar->id.name,sumolist);
+                                                       if (gotar && gotar->GetPhysicsController())
+                                                               physctr2 = (PHY_IPhysicsController*) gotar->GetPhysicsController()->GetUserData();
+                                               }
 
-                                                               PHY_IPhysicsController* physctrl = (PHY_IPhysicsController*) gameobj->GetPhysicsController()->GetUserData();
-                                                               //we need to pass a full constraint frame, not just axis
+                                               if (gameobj->GetPhysicsController())
+                                               {
+                                                       float radsPerDeg = 6.283185307179586232f / 360.f;
+
+                                                       PHY_IPhysicsController* physctrl = (PHY_IPhysicsController*) gameobj->GetPhysicsController()->GetUserData();
+                                                       //we need to pass a full constraint frame, not just axis
                                    
-                                                               //localConstraintFrameBasis
-                                                               MT_Matrix3x3 localCFrame(MT_Vector3(radsPerDeg*dat->axX,radsPerDeg*dat->axY,radsPerDeg*dat->axZ));
-                                                               MT_Vector3 axis0 = localCFrame.getColumn(0);
-                                                               MT_Vector3 axis1 = localCFrame.getColumn(1);
-                                                               MT_Vector3 axis2 = localCFrame.getColumn(2);
+                                                       //localConstraintFrameBasis
+                                                       MT_Matrix3x3 localCFrame(MT_Vector3(radsPerDeg*dat->axX,radsPerDeg*dat->axY,radsPerDeg*dat->axZ));
+                                                       MT_Vector3 axis0 = localCFrame.getColumn(0);
+                                                       MT_Vector3 axis1 = localCFrame.getColumn(1);
+                                                       MT_Vector3 axis2 = localCFrame.getColumn(2);
                                                                
-                                                               int constraintId = kxscene->GetPhysicsEnvironment()->createConstraint(physctrl,physctr2,(PHY_ConstraintType)dat->type,(float)dat->pivX,(float)dat->pivY,(float)dat->pivZ,
+                                                       int constraintId = kxscene->GetPhysicsEnvironment()->createConstraint(physctrl,physctr2,(PHY_ConstraintType)dat->type,(float)dat->pivX,
+                                                               (float)dat->pivY,(float)dat->pivZ,
                                                                (float)axis0.x(),(float)axis0.y(),(float)axis0.z(),
                                                                (float)axis1.x(),(float)axis1.y(),(float)axis1.z(),
-                                                               (float)axis2.x(),(float)axis2.y(),(float)axis2.z()
-                                                                                       );
-                                                               if (constraintId)
+                                                               (float)axis2.x(),(float)axis2.y(),(float)axis2.z());
+                                                       if (constraintId)
+                                                       {
+                                                               //if it is a generic 6DOF constraint, set all the limits accordingly
+                                                               if (dat->type == PHY_GENERIC_6DOF_CONSTRAINT)
                                                                {
-                                                                       //if it is a generic 6DOF constraint, set all the limits accordingly
-                                                                       if (dat->type == PHY_GENERIC_6DOF_CONSTRAINT)
+                                                                       int dof;
+                                                                       int dofbit=1;
+                                                                       for (dof=0;dof<6;dof++)
                                                                        {
-                                                                               int dof;
-                                                                               int dofbit=1;
-                                                                               for (dof=0;dof<6;dof++)
+                                                                               if (dat->flag & dofbit)
                                                                                {
-                                                                                       if (dat->flag & dofbit)
-                                                                                       {
-                                                                                               kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,dat->minLimit[dof],dat->maxLimit[dof]);
-                                                                                       } else
-                                                                                       {
-                                                                                               //minLimit > maxLimit means free(disabled limit) for this degree of freedom
-                                                                                               kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,1,-1);
-                                                                                       }
-                                                                                       dofbit<<=1;
+                                                                                       kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,dat->minLimit[dof],dat->maxLimit[dof]);
+                                                                               } else
+                                                                               {
+                                                                                       //minLimit > maxLimit means free(disabled limit) for this degree of freedom
+                                                                                       kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,1,-1);
                                                                                }
+                                                                               dofbit<<=1;
                                                                        }
                                                                }
                                                        }
-                        }
-                }
-            }
-        }
-
+                                               }
+                                       }
+                               }
+                       }
+               }
        }
 
        templist->Release();