From 61b244b8504c521dae99bcfd9efe1f0a8498fe5f Mon Sep 17 00:00:00 2001 From: GoaLitiuM Date: Tue, 31 Aug 2021 20:03:19 +0300 Subject: [PATCH] q1 map support --- Source/Game/MapParser/MapParser.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Game/MapParser/MapParser.cs b/Source/Game/MapParser/MapParser.cs index 7a3fce2..21cdd15 100644 --- a/Source/Game/MapParser/MapParser.cs +++ b/Source/Game/MapParser/MapParser.cs @@ -196,7 +196,7 @@ namespace Game while (index < data.Length) { - if (data[index] != ' ') + if (data[index] != ' ' && data[index] != '\t') break; index++; } @@ -342,7 +342,8 @@ namespace Game plane.rotation = ParseFloat(data, ref index); plane.scale = ParseVector2(data, ref index); - if (true) // quake3 format + var peekChar = (char) data[index]; + if (peekChar != '\n') // quake3 format { plane.contentFlags = ParseInt(data, ref index); plane.surfaceFlags = ParseInt(data, ref index);