ref: 544320206de9f54893aa77d2e4e75976e6fa84cb
parent: d7a54ff91636b507c115ba6bf48f57931b4d8407
author: Simon Howard <[email protected]>
date: Mon Sep 2 02:14:25 EDT 2013
Fix net_gamesettings_t checking code to use common function for checking for episode/map number validation. Subversion-branch: /branches/v2-branch Subversion-revision: 2631
--- a/src/net_common.c
+++ b/src/net_common.c
@@ -533,33 +533,9 @@
if (!D_ValidGameVersion(mission, settings->gameversion))
return false;
- if (mode == shareware || mode == retail || mode == registered)
- {
- if (settings->map < 1 || settings->map > 9)
- return false;
- }
- else
- {
- if (settings->map < 1 || settings->map > 32)
- return false;
- }
-
- if (mode == shareware)
- {
- if (settings->episode != 1)
- return false;
- }
- else if (mode == registered)
- {
- if (settings->episode < 1 || settings->episode > 3)
- return false;
- }
- else if (mode == retail)
- {
- if (settings->episode < 1 || settings->episode > 4)
- return false;
- }
-
+ if (!D_ValidEpisodeMap(mission, mode, settings->episode, settings->map))
+ return false;
+
return true;
}