Move flush_fcd_cache calls up from kill_stuck_objects

Many callers of kill_stuck_objects call it twice, once for each of two
walls.  Move the flush_fcd_cache up to occur only once, rather than once
per wall.
This commit is contained in:
Kp 2016-07-21 01:43:21 +00:00
parent 82e6ab130b
commit 278c10dec0
2 changed files with 3 additions and 3 deletions

View file

@ -223,6 +223,7 @@ static int do_change_walls(const trigger &t, const uint8_t new_wall_type)
if (wall1)
kill_stuck_objects(csegp->sides[cside].wall_num);
}
flush_fcd_cache();
return ret;
}

View file

@ -198,6 +198,7 @@ static void blast_blastable_wall(const vsegptridx_t seg, int side)
kill_stuck_objects(seg->sides[side].wall_num);
if (w1)
kill_stuck_objects(cwall_num);
flush_fcd_cache();
const auto a = w0.clip_num;
//if this is an exploding wall, explode it
@ -817,6 +818,7 @@ void do_door_open(int door_num)
}
}
flush_fcd_cache();
}
@ -1375,9 +1377,6 @@ void kill_stuck_objects(int wallnum)
}
}
Num_stuck_objects = n;
// Ok, this is awful, but we need to do things whenever a door opens/closes/disappears, etc.
flush_fcd_cache();
}
#if defined(DXX_BUILD_DESCENT_II)