diff --git a/src/p_saveg.c b/src/p_saveg.c index 27f60684a..6f96cbf0c 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -2003,6 +2003,7 @@ static void SaveLaserThinker(const thinker_t *th, const UINT8 type) WRITEUINT32(save_p, SaveSector(ht->sector)); WRITEUINT32(save_p, SaveSector(ht->sec)); WRITEUINT32(save_p, SaveLine(ht->sourceline)); + WRITEUINT8(save_p, ht->nobosses); } // @@ -3257,6 +3258,7 @@ static inline thinker_t* LoadLaserThinker(actionf_p1 thinker) ht->sector = LoadSector(READUINT32(save_p)); ht->sec = LoadSector(READUINT32(save_p)); ht->sourceline = LoadLine(READUINT32(save_p)); + ht->nobosses = READUINT8(save_p); for (rover = ht->sector->ffloors; rover; rover = rover->next) if (rover->secnum == (size_t)(ht->sec - sectors) && rover->master == ht->sourceline) diff --git a/src/p_spec.c b/src/p_spec.c index 19bbdf57e..17b4d047e 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6206,8 +6206,7 @@ void T_LaserFlash(laserthink_t *flash) { thing = node->m_thing; - if ((fflr->master->flags & ML_EFFECT1) - && thing->flags & MF_BOSS) + if (flash->nobosses && thing->flags & MF_BOSS) continue; // Don't hurt bosses // Don't endlessly kill egg guard shields (or anything else for that matter) @@ -6236,7 +6235,7 @@ void T_LaserFlash(laserthink_t *flash) * \sa T_LaserFlash * \author SSNTails */ -static inline void EV_AddLaserThinker(sector_t *sec, sector_t *sec2, line_t *line, thinkerlist_t *secthinkers) +static inline void EV_AddLaserThinker(sector_t *sec, sector_t *sec2, line_t *line, thinkerlist_t *secthinkers, boolean nobosses) { laserthink_t *flash; ffloor_t *fflr = P_AddFakeFloor(sec, sec2, line, laserflags, secthinkers); @@ -6253,6 +6252,7 @@ static inline void EV_AddLaserThinker(sector_t *sec, sector_t *sec2, line_t *lin flash->sector = sec; // For finding mobjs flash->sec = sec2; flash->sourceline = line; + flash->nobosses = nobosses; } // @@ -7068,8 +7068,8 @@ void P_SpawnSpecials(boolean fromnetsave) sec = sides[*lines[i].sidenum].sector - sectors; // No longer totally disrupts netgames - for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;) - EV_AddLaserThinker(§ors[s], §ors[sec], lines + i, secthinkers); + for (s = -1; (s = P_FindSectorFromTag(lines[i].tag, s)) >= 0 ;) + EV_AddLaserThinker(§ors[s], §ors[sec], lines + i, secthinkers, !!(lines[i].flags & ML_EFFECT1)); break; case 259: // Custom FOF diff --git a/src/p_spec.h b/src/p_spec.h index d81726b14..53e0076ef 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -108,6 +108,7 @@ typedef struct sector_t *sector; ///< Sector in which the effect takes place. sector_t *sec; line_t *sourceline; + UINT8 nobosses; } laserthink_t; /** Strobe light action structure..