Beispiel #1
0
    public override void SetPosition(Vector3 fvPosition)
    {
        base.SetPosition(fvPosition);

        // 如果自己在bus上面,则更新bus的时候需要更新摄像机 [9/2/2011 Ivan edit]
//      if( CObjectManager::GetMe()->GetMySelf()->IsInBus(GetServerID()) )
//      {
//          if(CWorldManager::GetMe()->GetCameraAnimation() == INVALID_ID)
//          {
//              CGameProcedure::s_pGfxSystem->Camera_SetLookAt(fvPosition);
//          }
//      }

        int i;

        for (i = 0; i < m_nPassengerCount; i++)
        {
            if (m_anPassengerIDs[i] != 0)
            {
                CObject pObj = CObjectManager.Instance.FindServerObject((int)m_anPassengerIDs[i]);
                if (pObj != null)
                {
                    pObj.SetMapPosition(fvPosition.x, fvPosition.z);
                    pObj.SetFootPosition(fvPosition);
                }
            }
        }
    }