Changeset 165


Ignore:
Timestamp:
03/11/14 14:32:44 (10 years ago)
Author:
sz
Message:

Model object does not enforce p.m when new style shape is used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/model.cpp

    r153 r165  
    883883        p->owner=this;
    884884        p->refno=i;
    885         if (checklevel>0)
    886                 p->mass=0.0;
     885        if (p->shape==0)
     886                {
     887                if (checklevel>0)
     888                        p->mass=0.0;
     889                }
    887890//      VALIDMINMAX(p,part,mass);
    888891        VALIDMINMAX(p,Part,size);
     
    914917                if (checklevel>0)
    915918                        {
    916                         j->part1->mass+=1.0;
    917                         j->part2->mass+=1.0;
     919                        if (j->part1->shape==0)
     920                                j->part1->mass+=1.0;
     921                        if (j->part2->shape==0)
     922                                j->part2->mass+=1.0;
    918923                        }
    919924                if ((j->usedelta)&&((j->d.x!=JOINT_DELTA_MARKER)||(j->d.y!=JOINT_DELTA_MARKER)||(j->d.z!=JOINT_DELTA_MARKER)))
     
    10071012                {
    10081013                p=(Part*)parts(i);
    1009                 if (p->mass<=0.001)
    1010                         p->mass=1.0;
     1014                if (p->shape==0)
     1015                        if (p->mass<=0.001)
     1016                                p->mass=1.0;
    10111017                p->flags&=~LINKFLAG;
    10121018                }
Note: See TracChangeset for help on using the changeset viewer.