shithub: choc

Download patch

ref: 031c8ff2d2dcb1a94d730d28555989722aeffdea
parent: 017afaf61c058770665ae7238ff0862f02eb8048
author: Simon Howard <[email protected]>
date: Fri Oct 14 13:32:57 EDT 2011

Fix query output for non-Doom games.

Subversion-branch: /branches/v2-branch
Subversion-revision: 2422

--- a/src/net_query.c
+++ b/src/net_query.c
@@ -646,23 +646,35 @@
 
 static char *GameDescription(GameMode_t mode, GameMission_t mission)
 {
-    switch (mode)
+    switch (mission)
     {
-        case shareware:
-            return "shareware";
-        case registered:
-            return "registered";
-        case retail:
-            return "ultimate";
-        case commercial:
-            if (mission == doom2)
-                return "doom2";
-            else if (mission == pack_tnt)
-                return "tnt";
-            else if (mission == pack_plut)
-                return "plutonia";
+        case doom:
+            if (mode == shareware)
+                return "swdoom";
+            else if (mode == registered)
+                return "regdoom";
+            else if (mode == retail)
+                return "ultdoom";
+            else
+                return "doom";
+        case doom2:
+            return "doom2";
+        case pack_tnt:
+            return "tnt";
+        case pack_plut:
+            return "plutonia";
+        case pack_chex:
+            return "chex";
+        case pack_hacx:
+            return "hacx";
+        case heretic:
+            return "heretic";
+        case hexen:
+            return "hexen";
+        case strife:
+            return "strife";
         default:
-            return "unknown";
+            return "?";
     }
 }