ref: f9f7fbd6b1a987603bc1802f835cf92705317254
parent: 18213cb88a5e296f6c0f3527e405ccb90715b46e
author: Jonathan Dowland <[email protected]>
date: Sun May 12 06:04:10 EDT 2019
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.
--- a/src/doom/p_spec.c
+++ b/src/doom/p_spec.c
@@ -1369,7 +1369,20 @@
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 @@
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];