Skip to content
Permalink
Browse files

Merge pull request #1162 from jmtd/count-scrollers

Report number of scrollers when there are too many
  • Loading branch information...
jmtd committed May 12, 2019
2 parents 18213cb + f9f7fbd commit 5e6377aa3bd2c7d4999a180c8131284b94b50457
Showing with 15 additions and 2 deletions.
  1. +15 −2 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];

0 comments on commit 5e6377a

Please sign in to comment.
You can’t perform that action at this time.