From e05e86fe67adfaa08e47c7b15a7688a7f65b2be6 Mon Sep 17 00:00:00 2001 From: <> Date: Sat, 6 May 2017 17:54:48 -0700 Subject: [PATCH] Added hex digit to TFace --- ReflexToQ3/includes/oopless-parser.cpp | 3 ++- ReflexToQ3/includes/worldspawn.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ReflexToQ3/includes/oopless-parser.cpp b/ReflexToQ3/includes/oopless-parser.cpp index 63f6ee2..e615808 100644 --- a/ReflexToQ3/includes/oopless-parser.cpp +++ b/ReflexToQ3/includes/oopless-parser.cpp @@ -129,7 +129,8 @@ vector parse_face(ifstream &f) { if (!hex && fdata.length() > 1) { if (SECONDCH(fdata) == 'x') { // this is the unidentified hex digit. - // just it signify the texture at the end. + // out of range for stoi + x.hex = strtoul(fdata.c_str(), NULL, 16); hex = true; } } else if (!hex) { diff --git a/ReflexToQ3/includes/worldspawn.h b/ReflexToQ3/includes/worldspawn.h index 2f0ed15..85e767e 100644 --- a/ReflexToQ3/includes/worldspawn.h +++ b/ReflexToQ3/includes/worldspawn.h @@ -18,6 +18,7 @@ struct TFace float m_fYScale; float m_fRotation; std::vector m_Indices; + unsigned long hex; std::string m_Material; };