mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-19 16:51:53 +00:00
Merge branch 'issue1175' into 'next'
ML_BOUNCY will count pushables in all sectors the line is tagged to See merge request STJr/SRB2!2368
This commit is contained in:
commit
a67ee77782
1 changed files with 24 additions and 5 deletions
29
src/p_spec.c
29
src/p_spec.c
|
@ -1529,12 +1529,31 @@ static boolean P_CheckPushables(line_t *triggerline, sector_t *caller)
|
|||
if (!caller)
|
||||
return false; // we need a calling sector to find pushables in, silly!
|
||||
|
||||
// Count the pushables in this sector
|
||||
for (node = caller->touching_thinglist; node; node = node->m_thinglist_next)
|
||||
if (triggerline->flags & ML_BOUNCY) // Count pushables in ALL sectors this line is tagged to
|
||||
{
|
||||
mo = node->m_thing;
|
||||
if ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse))
|
||||
numpushables++;
|
||||
for (size_t i = 0; i < numsectors; i++)
|
||||
{
|
||||
if (sectors[i].triggertag != caller->triggertag)
|
||||
continue;
|
||||
|
||||
// Count the pushables in this sector
|
||||
for (node = sectors[i].touching_thinglist; node; node = node->m_thinglist_next)
|
||||
{
|
||||
mo = node->m_thing;
|
||||
if ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse))
|
||||
numpushables++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Count the pushables in this sector
|
||||
for (node = caller->touching_thinglist; node; node = node->m_thinglist_next)
|
||||
{
|
||||
mo = node->m_thing;
|
||||
if ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse))
|
||||
numpushables++;
|
||||
}
|
||||
}
|
||||
|
||||
switch (triggerline->args[2])
|
||||
|
|
Loading…
Reference in a new issue