commit f9f7fbd6b1a987603bc1802f835cf92705317254
Author: Jonathan Dowland <jon@dow.land>
AuthorDate: Sun May 12 10:04:10 2019 +0100
Commit: Jonathan Dowland <jon@dow.land>
CommitDate: Sun May 12 10:04:10 2019 +0100
Report number of scrollers when there are too many
When bailing out after the vanilla scrolling wall limit is reached,
report the number of scrolling walls in the current map as part of
the error message. This aids mappers who are working as close to
the limit as possible.
---
src/doom/p_spec.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/doom/p_spec.c b/src/doom/p_spec.c
index b5c8fa7e..e56db82d 100644
--- a/src/doom/p_spec.c
+++ b/src/doom/p_spec.c
@@ -1369,6 +1369,19 @@ int EV_DoDonut(line_t* line)
short numlinespecials;
line_t* linespeciallist[MAXLINEANIMS];
+static unsigned int NumScrollers()
+{
+ unsigned int i, scrollers = 0;
+
+ for (i = 0; i < numlines; i++)
+ {
+ if (48 == lines[i].special)
+ {
+ scrollers++;
+ }
+ }
+ return scrollers;
+}
// Parses command line parameters.
void P_SpawnSpecials (void)
@@ -1463,8 +1476,8 @@ void P_SpawnSpecials (void)
case 48:
if (numlinespecials >= MAXLINEANIMS)
{
- I_Error("Too many scrolling wall linedefs! "
- "(Vanilla limit is 64)");
+ I_Error("Too many scrolling wall linedefs (%d)! "
+ "(Vanilla limit is 64)", NumScrollers());
}
// EFFECT FIRSTCOL SCROLL+
linespeciallist[numlinespecials] = &lines[i];