mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 15:32:10 +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;
|
||||
fixed_t bottomheight, topheight;
|
||||
msecnode_t *node;
|
||||
ffloor_t *rover;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
@ -2150,6 +2151,19 @@ void T_EachTimeThinker(levelspecthink_t *eachtime)
|
|||
{
|
||||
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++)
|
||||
{
|
||||
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;
|
||||
size_t i;
|
||||
INT32 sect;
|
||||
ffloor_t *rover;
|
||||
|
||||
case sc_side: // scroll wall texture
|
||||
side = sides + s->affectee;
|
||||
|
@ -6669,6 +6670,19 @@ void T_Scroll(scroll_t *s)
|
|||
sector_t *psec;
|
||||
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)
|
||||
{
|
||||
thing = node->m_thing;
|
||||
|
@ -6732,6 +6746,19 @@ void T_Scroll(scroll_t *s)
|
|||
sector_t *psec;
|
||||
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)
|
||||
{
|
||||
thing = node->m_thing;
|
||||
|
|
Loading…
Reference in a new issue