使用了几天GOOF,发现他存在很多bug啊,什么缓存溢出,数组越界之类的。。很明显这个框架没有真正用在一个项目上的。我列举几个大问题吧。好让大家别到处碰壁。
bool EnvironmentGameSystem::save(DataElementPtr element)这个函数没有实现,所以无法保存环境信息。
还有
 void GridPartition::enumerateConnectedPartitions(vector<CorePartition*>& connected)
 {
  //get surrounding grid cells within a certain radius
  float loadRadius = mGridPartitionMgr->getGridCellLoadRadius();
  //enumerate partitions
  vector<CorePartition*> partitions;
  mGridPartitionMgr->enumeratePartitions(partitions);
  //iterate through and check distance
  for(vector<CorePartition*>::iterator itr = partitions.begin(); itr != partitions.end(); ++itr)
  {
   float distance = Vector3(getWorldPosition() - (*itr)->getWorldPosition()).length();
   // add by 李锦俊 2007-7-16
   // 不要返回自己作为邻居,会产生bug
   if(distance < loadRadius && *itr != this)
    connected.push_back(*itr);
  }
 }
再给出一个比较严重的bug
GOOFTranslationManipulator.h中的
  // add by 李锦俊 2007-7-12
  // 不要用魔术数,搞到缓存溢出
  SceneNode* mNode[AT_LAST];
  Entity* mEnt[AT_LAST];
  Entity* mConeEnt[AT_LAST];
  CollisionShapePtr mCol[AT_LAST];
  AxisManipulatorHandle* mHandle[AT_LAST];
另外,CorePartition中的setSkyboxMaterial、setGlobalAmbient之类的代码貌似没用。准备弃之。
    // add by 李锦俊 2007-7-16
    // 这个算法暂时有问题,先屏蔽,以后再慢慢解决
    //disable static geometry until it is fixed
    if(false)// getStaticGeometryRule() == SGR_ALWAYS || (getStaticGeometryRule() == SGR_WHEN_NOT_PROX_IMMEDIATE && getPartition()->getProximity() != CorePartition::PROX_IMMEDIATE)) 
    {
     willConvertToStaticGeometry = true;
     getPartition()->addObjectToConvertToStaticGeometry(this);
    }