Made converter preserve textures.
This commit is contained in:
parent
3148eec685
commit
e0e924fadf
@ -14,6 +14,7 @@ struct TPlanePoints
|
|||||||
TVector3f m_A;
|
TVector3f m_A;
|
||||||
TVector3f m_B;
|
TVector3f m_B;
|
||||||
TVector3f m_C;
|
TVector3f m_C;
|
||||||
|
std::string m_material;
|
||||||
};
|
};
|
||||||
|
|
||||||
TPlanePoints GetPlanePoints(const TVector3f* _kpPoints, const size_t _kNumPoints)
|
TPlanePoints GetPlanePoints(const TVector3f* _kpPoints, const size_t _kNumPoints)
|
||||||
@ -54,7 +55,9 @@ std::vector<TPlanePoints> GetBrushPlanes(const TBrush& _krBrush)
|
|||||||
{
|
{
|
||||||
Verts[i] = _krBrush.m_Vertices[krFace.m_Indices[i]];
|
Verts[i] = _krBrush.m_Vertices[krFace.m_Indices[i]];
|
||||||
}
|
}
|
||||||
Planes.push_back(GetPlanePoints(Verts.data(), Verts.size()));
|
TPlanePoints PP = GetPlanePoints(Verts.data(), Verts.size());
|
||||||
|
PP.m_material = krFace.m_Material;
|
||||||
|
Planes.push_back(PP);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(Planes);
|
return(Planes);
|
||||||
@ -73,7 +76,14 @@ std::string GetBrushString(const TBrush& _krBrush)
|
|||||||
ssOutput << "( " << krPlane.m_A.m_fX << " " << krPlane.m_A.m_fZ << " " << krPlane.m_A.m_fY << " ) ";
|
ssOutput << "( " << krPlane.m_A.m_fX << " " << krPlane.m_A.m_fZ << " " << krPlane.m_A.m_fY << " ) ";
|
||||||
ssOutput << "( " << krPlane.m_B.m_fX << " " << krPlane.m_B.m_fZ << " " << krPlane.m_B.m_fY << " ) ";
|
ssOutput << "( " << krPlane.m_B.m_fX << " " << krPlane.m_B.m_fZ << " " << krPlane.m_B.m_fY << " ) ";
|
||||||
ssOutput << "( " << krPlane.m_C.m_fX << " " << krPlane.m_C.m_fZ << " " << krPlane.m_C.m_fY << " ) ";
|
ssOutput << "( " << krPlane.m_C.m_fX << " " << krPlane.m_C.m_fZ << " " << krPlane.m_C.m_fY << " ) ";
|
||||||
ssOutput << "common/caulk 0 0 0 0.500000 0.500000 0 4 0" << std::endl;
|
if(krPlane.m_material.length())
|
||||||
|
{
|
||||||
|
ssOutput << krPlane.m_material << " 0 0 0 0.500000 0.500000 0 4 0" << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ssOutput << "common/caulk 0 0 0 0.500000 0.500000 0 4 0" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ssOutput << "}" << std::endl;
|
ssOutput << "}" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
reflex map version 6
|
|
||||||
entity
|
|
||||||
type WorldSpawn
|
|
||||||
brush
|
|
||||||
vertices
|
|
||||||
-256.000000 0.000000 256.000000
|
|
||||||
256.000000 0.000000 256.000000
|
|
||||||
256.000000 0.000000 -256.000000
|
|
||||||
-256.000000 0.000000 -256.000000
|
|
||||||
-256.000000 -16.000000 256.000000
|
|
||||||
256.000000 -16.000000 256.000000
|
|
||||||
256.000000 -16.000000 -256.000000
|
|
||||||
-256.000000 -16.000000 -256.000000
|
|
||||||
faces
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5
|
|
||||||
brush
|
|
||||||
vertices
|
|
||||||
-64.000000 64.000000 256.000000
|
|
||||||
64.000000 64.000000 256.000000
|
|
||||||
64.000000 0.000000 128.000000
|
|
||||||
-64.000000 0.000000 256.000000
|
|
||||||
-64.000000 0.000000 128.000000
|
|
||||||
64.000000 0.000000 256.000000
|
|
||||||
faces
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 3 0 4
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 4
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 3 5
|
|
||||||
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5
|
|
||||||
entity
|
|
||||||
type PlayerSpawn
|
|
||||||
entity
|
|
||||||
type CameraPath
|
|
||||||
UInt8 posLerp 2
|
|
||||||
UInt8 angleLerp 2
|
|
Loading…
Reference in New Issue
Block a user