ref: 5e6377aa3bd2c7d4999a180c8131284b94b50457
parent: 18213cb88a5e296f6c0f3527e405ccb90715b46e
parent: f9f7fbd6b1a987603bc1802f835cf92705317254
author: Jonathan Dowland <[email protected]>
date: Sun May 12 11:00:55 EDT 2019
Merge pull request #1162 from jmtd/count-scrollers Report number of scrollers when there are too many
--- 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];