Remove trailing whitespace

This commit is contained in:
j883376
2013-05-06 13:07:41 -04:00
parent 7a93966158
commit ffcff4aea1
548 changed files with 16397 additions and 16398 deletions
+13 -13
View File
@@ -46,23 +46,23 @@ WaterRegionType WaterMap::BSPReturnRegionType(int32 node_number, float y, float
float distance;
const ZBSP_Node *current_node = &BSP_Root[node_number-1];
// Are we at a leaf
if((current_node->left==0)&&
(current_node->right==0)) {
return (WaterRegionType) current_node->special;
}
// No, so determine which side of the split plane we are on
//
distance = (x * current_node->normal[0]) +
(y * current_node->normal[1]) +
(z * current_node->normal[2]) +
current_node->splitdistance;
// If we are exactly on the split plane, I don't know what should happen.
//
if(distance == 0.0f) {
@@ -80,7 +80,7 @@ WaterRegionType WaterMap::BSPReturnRegionType(int32 node_number, float y, float
// This should't happen
return(RegionTypeNormal);
}
return BSPReturnRegionType(current_node->right,
y, x, z);
}
@@ -152,7 +152,7 @@ bool WaterMap::loadWaterMap(FILE *fp) {
char EQWMagic[10];
uint32 BSPTreeSize;
uint32 EQWVersion;
if(fread(EQWMagic, 10, 1, fp)!=1) {
printf("Error reading Water region map.\n");
return(false);
@@ -169,25 +169,25 @@ bool WaterMap::loadWaterMap(FILE *fp) {
printf("Incompatible Water region map version.\n");
return(false);
}
if(fread(&BSPTreeSize, sizeof(BSPTreeSize), 1, fp)!=1) {
printf("Error reading Water region map.\n");
return(false);
}
BSP_Root = (ZBSP_Node *) new ZBSP_Node[BSPTreeSize];
if(BSP_Root==nullptr) {
printf("Memory allocation failed while reading water map.\n");
return(false);
}
if(fread(BSP_Root, sizeof(ZBSP_Node), BSPTreeSize, fp) != BSPTreeSize) {
printf("Error reading Water region map.\n");
safe_delete_array(BSP_Root);
return(false);
}
printf("Water region map has %d nodes.\n", BSPTreeSize);
return(true);
}