From a09cbe20bdb78c30b217d121d8e6d767be3e5aef Mon Sep 17 00:00:00 2001
From: Denis Pauk <pauk.denis@gmail.com>
Date: Sun, 10 Nov 2024 22:26:47 +0200
Subject: [PATCH] maps: fix daikatana context flag convert

---
 src/common/header/flags.h | 8 ++++----
 src/common/maps.c         | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/common/header/flags.h b/src/common/header/flags.h
index 6a59da90..775146fa 100644
--- a/src/common/header/flags.h
+++ b/src/common/header/flags.h
@@ -196,7 +196,7 @@ static const int daikatana_flags[32] = {
 	0,              /* 16: Mirror */
 	0,              /* 17: Holy Grond */
 	SURF_ALPHATEST, /* 18: Alphachan */
-	0,              /* 19: Midtexture (Used together with Clear and Nodraw.) */
+	SURF_ALPHATEST, /* 19: Midtexture (Used together with Clear and Nodraw.) */
 	0,              /* 20: Puddle */
 	0,              /* 21: Water Surge */
 	0,              /* 22: Big Water Surge */
@@ -214,15 +214,15 @@ static const int daikatana_flags[32] = {
 static const int daikatana_contents_flags[32] = {
 	CONTENTS_SOLID,        /* 0: Default for all brushes */
 	CONTENTS_WINDOW,       /* 1: Brush is a window (not really used) */
-	0,                     /* 2: Unused by the Dk's engine? */
+	CONTENTS_AUX,          /* 2: Unused by the Dk's engine? */
 	CONTENTS_LAVA,         /* 3: The brush is lava */
 	CONTENTS_SLIME,        /* 4: The brush is slime */
 	CONTENTS_WATER,        /* 5: The brush is water */
 	CONTENTS_MIST,         /* 6: The brush is non-solid */
-	0,                     /* 7: clear */
+	CONTENTS_SOLID,        /* 7: clear */
 	0,                     /* 8: notsolid */
 	0,                     /* 9: noshoot */
-	0,                     /* 10: fog */
+	CONTENTS_MIST,         /* 10: fog */
 	0,                     /* 11: nitro */
 	0,                     /* 12: Unused */
 	0,                     /* 13: Unused */
diff --git a/src/common/maps.c b/src/common/maps.c
index 125b7678..77651bfd 100644
--- a/src/common/maps.c
+++ b/src/common/maps.c
@@ -68,6 +68,7 @@ Mod_LoadSurfConvertFlags(int flags, maptype_t maptype)
 		case map_kingpin: convert = kingpin_flags; break;
 		case map_anachronox: convert = anachronox_flags; break;
 		case map_sin: convert = sin_flags; break;
+		case map_quake2: convert = quake2_flags; break;
 		default: convert = NULL; break;
 	}