eSurfaceType
This commit is contained in:
@@ -548,18 +548,18 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
|
||||
return false;
|
||||
|
||||
for(i = 0; i < model.numSpheres; i++)
|
||||
if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
if(TestLineSphere(newline, model.spheres[i]))
|
||||
return true;
|
||||
|
||||
for(i = 0; i < model.numBoxes; i++)
|
||||
if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
if(TestLineBox(newline, model.boxes[i]))
|
||||
return true;
|
||||
|
||||
CalculateTrianglePlanes(&model);
|
||||
for(i = 0; i < model.numTriangles; i++)
|
||||
if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
if(TestLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i]))
|
||||
return true;
|
||||
|
||||
@@ -1179,16 +1179,16 @@ CCollision::ProcessLineOfSight(const CColLine &line,
|
||||
|
||||
float coldist = mindist;
|
||||
for(i = 0; i < model.numSpheres; i++)
|
||||
if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
ProcessLineSphere(newline, model.spheres[i], point, coldist);
|
||||
|
||||
for(i = 0; i < model.numBoxes; i++)
|
||||
if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
ProcessLineBox(newline, model.boxes[i], point, coldist);
|
||||
|
||||
CalculateTrianglePlanes(&model);
|
||||
for(i = 0; i < model.numTriangles; i++)
|
||||
if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
ProcessLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist);
|
||||
|
||||
if(coldist < mindist){
|
||||
@@ -1219,17 +1219,17 @@ CCollision::ProcessVerticalLine(const CColLine &line,
|
||||
|
||||
float coldist = mindist;
|
||||
for(i = 0; i < model.numSpheres; i++)
|
||||
if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
ProcessLineSphere(newline, model.spheres[i], point, coldist);
|
||||
|
||||
for(i = 0; i < model.numBoxes; i++)
|
||||
if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
ProcessLineBox(newline, model.boxes[i], point, coldist);
|
||||
|
||||
CalculateTrianglePlanes(&model);
|
||||
TempStoredPoly.valid = false;
|
||||
for(i = 0; i < model.numTriangles; i++)
|
||||
if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_SCAFFOLD)
|
||||
if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_TRANSPARENT_CLOTH)
|
||||
ProcessVerticalLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist, &TempStoredPoly);
|
||||
|
||||
if(coldist < mindist){
|
||||
@@ -1758,15 +1758,15 @@ CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel,
|
||||
b *= f;
|
||||
}
|
||||
|
||||
if(s == SURFACE_SCAFFOLD || s == SURFACE_METAL_FENCE ||
|
||||
s == SURFACE_BOLLARD || s == SURFACE_METAL_POLE)
|
||||
if(s == SURFACE_TRANSPARENT_CLOTH || s == SURFACE_METAL_CHAIN_FENCE ||
|
||||
s == SURFACE_TRANSPARENT_STONE || s == SURFACE_SCAFFOLD_POLE)
|
||||
if(CTimer::GetFrameCounter() & 1){
|
||||
r = 0;
|
||||
g = 0;
|
||||
b = 0;
|
||||
}
|
||||
|
||||
if(s > SURFACE_GATE){
|
||||
if(s > SURFACE_METAL_GATE){
|
||||
r = CGeneral::GetRandomNumber();
|
||||
g = CGeneral::GetRandomNumber();
|
||||
b = CGeneral::GetRandomNumber();
|
||||
@@ -1839,8 +1839,8 @@ CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel,
|
||||
b *= f;
|
||||
}
|
||||
|
||||
if(s == SURFACE_SCAFFOLD || s == SURFACE_METAL_FENCE ||
|
||||
s == SURFACE_BOLLARD || s == SURFACE_METAL_POLE)
|
||||
if(s == SURFACE_TRANSPARENT_CLOTH || s == SURFACE_METAL_CHAIN_FENCE ||
|
||||
s == SURFACE_TRANSPARENT_STONE || s == SURFACE_SCAFFOLD_POLE)
|
||||
if(CTimer::GetFrameCounter() & 1){
|
||||
r = 0;
|
||||
g = 0;
|
||||
|
||||
Reference in New Issue
Block a user