Changeset 9058 in orxonox.OLD for branches/single_player_map/src/lib/graphics/importer
- Timestamp:
- Jul 3, 2006, 6:05:34 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc
r9056 r9058 972 972 Vector position1 = position; 973 973 Vector position2 = position + Vector(0.0,1.0,0.0); 974 Vector position3 = position; 975 Vector position4 = position + Vector(0.0,1.0,0.0); 974 976 Vector dest = worldEntity->getAbsCoor() - upDir*40.0f; // 975 977 Vector dest1 = position + forwardDir*4.0f; 976 978 Vector dest2 = position2 + forwardDir*4.0; 979 Vector dest3 = position + forwardDir*4.0f; 980 Vector dest4 = position2 + forwardDir*4.0; 977 981 dest = position - Vector(0.0, 40.0,0.0); 978 982 Vector out = dest; … … 986 990 987 991 if( box != NULL) { 988 position = worldEntity->getAbsCoor() + box->center + Vector(0.0, 1.0, 0.0) * box->halfLength[1] * 1.0f;992 position = worldEntity->getAbsCoor() + box->center; // + Vector(0.0, 1.0, 0.0) * box->halfLength[1] * 1.0f; 989 993 dest = worldEntity->getAbsCoor() + box->center - Vector(0.0, 1.0, 0.0) * (box->halfLength[1] + BSP_Y_OFFSET) * 100; 990 994 991 995 Vector dirX = worldEntity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize(); 992 996 993 position1 = worldEntity->getAbsCoor() + box->center - dirX * (box->halfLength[0] + BSP_X_OFFSET);997 //position1 = worldEntity->getAbsCoor() + box->center - dirX * (box->halfLength[0] + BSP_X_OFFSET); 994 998 dest1 = worldEntity->getAbsCoor() + box->center + dirX * (box->halfLength[0] + BSP_X_OFFSET); 995 999 dest2 = worldEntity->getAbsCoor() - box->center + dirX * (box->halfLength[0] + BSP_X_OFFSET); 1000 996 1001 Vector dirZ = worldEntity->getAbsDirZ(); dirX.y = 0.0f; dirZ.normalize(); 997 position2 = worldEntity->getAbsCoor() + box->center - dirZ * (box->halfLength[2] + BSP_Z_OFFSET);998 dest 2= worldEntity->getAbsCoor() + box->center + dirZ * (box->halfLength[2] + BSP_Z_OFFSET);999 1002 //position2 = worldEntity->getAbsCoor() + box->center - dirZ * (box->halfLength[2] + BSP_Z_OFFSET); 1003 dest3 = worldEntity->getAbsCoor() + box->center + dirZ * (box->halfLength[2] + BSP_Z_OFFSET); 1004 dest4 = worldEntity->getAbsCoor() - box->center + dirZ * (box->halfLength[2] + BSP_Z_OFFSET); 1000 1005 } else { 1001 1006 // Init positions and destinations to anything useful! … … 1055 1060 bool xCollision = false; 1056 1061 bool zCollision = false; 1062 bool xCollisionNeg = false; 1063 bool zCollisionNeg = false; 1064 1057 1065 1058 1066 … … 1123 1131 // Return the normal here: Normal's stored in this->collPlane; 1124 1132 if( collision) { 1125 worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);1133 worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y_NEG , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag); 1126 1134 } 1127 1135 if(xCollision) { 1128 1136 worldEntity->registerCollision(COLLISION_TYPE_AXIS_X , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z),dest1 , SolidFlag); 1129 1137 } 1138 1130 1139 if(zCollision) { 1131 1140 worldEntity->registerCollision(COLLISION_TYPE_AXIS_Z , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), dest2 , SolidFlag);
Note: See TracChangeset
for help on using the changeset viewer.