Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8934 in orxonox.OLD for branches/single_player_map/src/lib


Ignore:
Timestamp:
Jun 30, 2006, 1:38:40 AM (18 years ago)
Author:
patrick
Message:

found a major error in the cr alg

Location:
branches/single_player_map/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r8933 r8934  
    9696        // collision in the x-axis
    9797      case COLLISION_TYPE_AXIS_X:
    98         front = collPos.x - box->halfLength[2]; // should be [0]
     98        front = collPos.x - box->halfLength[0]; // should be [0]
    9999
    100100        // object is beneath the plane (ground)
     
    102102        {
    103103          Vector backoff = entity->getAbsDirX() * front;
    104           entity->shiftCoor(backoff);
     104//           entity->shiftCoor(backoff);
    105105        }
    106106        // object is already in the wall
     
    134134      case COLLISION_TYPE_AXIS_Z:
    135135
    136         side = collPos.z - box->halfLength[0]; // should be [2]
     136        side = collPos.z - box->halfLength[2]; // should be [2]
    137137
    138138        // object is beneath the plane (ground)
     
    140140        {
    141141          Vector backoff = entity->getAbsDirX() * side;
    142           entity->shiftCoor(backoff);
    143 //           entity->shiftCoor(Vector(0.0f, 0.0f, side));
     142//           entity->shiftCoor(backoff);
    144143        }
    145144        // object is already in the wall
  • branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc

    r8933 r8934  
    986986
    987987  if( box != NULL) {
    988     position = worldEntity->getAbsCoor() +  box->center + box->axis[1] * box->halfLength[1];
    989     dest     = worldEntity->getAbsCoor() +  box->center - box->axis[1] * box->halfLength[1]  * 40.0f;
    990 
    991     position1 = worldEntity->getAbsCoor() +  box->center + box->axis[0] * box->halfLength[0] * 10.0f;
    992     dest1     = worldEntity->getAbsCoor() +  box->center - box->axis[0] * box->halfLength[0] * 10.0f;
    993 
    994 
    995     position2 = worldEntity->getAbsCoor() +  box->center + box->axis[2] * box->halfLength[2] * 0.0f;
    996     dest2     = worldEntity->getAbsCoor() +  box->center - box->axis[2] * box->halfLength[2] * 0.0f;
     988    position = worldEntity->getAbsCoor() +  box->center + worldEntity->getAbsDirY() * box->halfLength[1];
     989    dest     = worldEntity->getAbsCoor() +  box->center - worldEntity->getAbsDirY() * (box->halfLength[1] + BSP_Y_OFFSET);
     990
     991    position1 = worldEntity->getAbsCoor() +  box->center + worldEntity->getAbsDirX() * (box->halfLength[0]  + BSP_X_OFFSET);
     992    dest1     = worldEntity->getAbsCoor() +  box->center - worldEntity->getAbsDirX() * (box->halfLength[0]  + BSP_X_OFFSET);
     993
     994    position2 = worldEntity->getAbsCoor() +  box->center + worldEntity->getAbsDirZ() * (box->halfLength[2]  + BSP_Z_OFFSET);
     995    dest2     = worldEntity->getAbsCoor() +  box->center - worldEntity->getAbsDirZ() * (box->halfLength[2]  + BSP_Z_OFFSET);
    997996
    998997  } else {
Note: See TracChangeset for help on using the changeset viewer.