diff --git a/ReflexToQ3/includes/oopless-parser.hpp b/ReflexToQ3/includes/oopless-parser.hpp index 4dcba89..dede6f9 100644 --- a/ReflexToQ3/includes/oopless-parser.hpp +++ b/ReflexToQ3/includes/oopless-parser.hpp @@ -118,7 +118,7 @@ using namespace std; if (SECONDCH(fdata) == 'x') { // this is the unidentified hex digit. // out of range for stoi - x.hex = strtoul(fdata.c_str(), NULL, 16); + x.hex = fdata; hex = true; } } else if (!hex) { diff --git a/ReflexToQ3/includes/planes.cpp b/ReflexToQ3/includes/planes.cpp index c586af1..87dd031 100644 --- a/ReflexToQ3/includes/planes.cpp +++ b/ReflexToQ3/includes/planes.cpp @@ -90,6 +90,9 @@ std::vector GetBrushPlanes(const TBrush& _krBrush) } TPlanePoints PP = GetPlanePoints(Verts.data(), Verts.size()); PP.m_material = krFace.m_Material; + if (!krFace.hex.empty()) { + PP.m_material.append("+" + krFace.hex); + } Planes.push_back(PP); } diff --git a/ReflexToQ3/includes/worldspawn.h b/ReflexToQ3/includes/worldspawn.h index 85e767e..7ba971d 100644 --- a/ReflexToQ3/includes/worldspawn.h +++ b/ReflexToQ3/includes/worldspawn.h @@ -18,7 +18,7 @@ struct TFace float m_fYScale; float m_fRotation; std::vector m_Indices; - unsigned long hex; + std::string hex; std::string m_Material; };