mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
Stop Each Time trigger linedefs and object-carrying scrollers from doing anything with FOFs without FF_EXISTS
This commit is contained in:
parent
4f75ae3a68
commit
f061ffa00e
2 changed files with 41 additions and 0 deletions
|
@ -2103,6 +2103,7 @@ void T_EachTimeThinker(levelspecthink_t *eachtime)
|
||||||
boolean floortouch = false;
|
boolean floortouch = false;
|
||||||
fixed_t bottomheight, topheight;
|
fixed_t bottomheight, topheight;
|
||||||
msecnode_t *node;
|
msecnode_t *node;
|
||||||
|
ffloor_t *rover;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
@ -2150,6 +2151,19 @@ void T_EachTimeThinker(levelspecthink_t *eachtime)
|
||||||
{
|
{
|
||||||
targetsec = §ors[targetsecnum];
|
targetsec = §ors[targetsecnum];
|
||||||
|
|
||||||
|
// Find the FOF corresponding to the control linedef
|
||||||
|
for (rover = targetsec->ffloors; rover; rover = rover->next)
|
||||||
|
{
|
||||||
|
if (rover->master == sec->lines[i])
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rover) // This should be impossible, but don't complain if it is the case somehow
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there
|
||||||
|
continue;
|
||||||
|
|
||||||
for (j = 0; j < MAXPLAYERS; j++)
|
for (j = 0; j < MAXPLAYERS; j++)
|
||||||
{
|
{
|
||||||
if (!playeringame[j])
|
if (!playeringame[j])
|
||||||
|
|
27
src/p_spec.c
27
src/p_spec.c
|
@ -6628,6 +6628,7 @@ void T_Scroll(scroll_t *s)
|
||||||
line_t *line;
|
line_t *line;
|
||||||
size_t i;
|
size_t i;
|
||||||
INT32 sect;
|
INT32 sect;
|
||||||
|
ffloor_t *rover;
|
||||||
|
|
||||||
case sc_side: // scroll wall texture
|
case sc_side: // scroll wall texture
|
||||||
side = sides + s->affectee;
|
side = sides + s->affectee;
|
||||||
|
@ -6669,6 +6670,19 @@ void T_Scroll(scroll_t *s)
|
||||||
sector_t *psec;
|
sector_t *psec;
|
||||||
psec = sectors + sect;
|
psec = sectors + sect;
|
||||||
|
|
||||||
|
// Find the FOF corresponding to the control linedef
|
||||||
|
for (rover = psec->ffloors; rover; rover = rover->next)
|
||||||
|
{
|
||||||
|
if (rover->master == sec->lines[i])
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rover) // This should be impossible, but don't complain if it is the case somehow
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there
|
||||||
|
continue;
|
||||||
|
|
||||||
for (node = psec->touching_thinglist; node; node = node->m_thinglist_next)
|
for (node = psec->touching_thinglist; node; node = node->m_thinglist_next)
|
||||||
{
|
{
|
||||||
thing = node->m_thing;
|
thing = node->m_thing;
|
||||||
|
@ -6732,6 +6746,19 @@ void T_Scroll(scroll_t *s)
|
||||||
sector_t *psec;
|
sector_t *psec;
|
||||||
psec = sectors + sect;
|
psec = sectors + sect;
|
||||||
|
|
||||||
|
// Find the FOF corresponding to the control linedef
|
||||||
|
for (rover = psec->ffloors; rover; rover = rover->next)
|
||||||
|
{
|
||||||
|
if (rover->master == sec->lines[i])
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rover) // This should be impossible, but don't complain if it is the case somehow
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there
|
||||||
|
continue;
|
||||||
|
|
||||||
for (node = psec->touching_thinglist; node; node = node->m_thinglist_next)
|
for (node = psec->touching_thinglist; node; node = node->m_thinglist_next)
|
||||||
{
|
{
|
||||||
thing = node->m_thing;
|
thing = node->m_thing;
|
||||||
|
|
Loading…
Reference in a new issue