mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
- Fixed a bug where searching for generalized sector effects was not handled properly in Find & Replace Mode. Fixes 305.
This commit is contained in:
parent
4b86f5458f
commit
05a64b4ab8
1 changed files with 11 additions and 1 deletions
|
@ -115,7 +115,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else if(General.Map.Config.GeneralizedEffects && effect != 0 && s.Effect != 0)
|
||||
{
|
||||
SectorEffectData sdo = General.Map.Config.GetSectorEffectData(s.Effect);
|
||||
match = (sd.Effect == sdo.Effect || (sd.GeneralizedBits.Count == sdo.GeneralizedBits.Count && sd.GeneralizedBits.Overlaps(sdo.GeneralizedBits)));
|
||||
|
||||
// It's a bit complicated, so use the following logic:
|
||||
// Searching for normal effect + generalized effect -> sector has to have both (plus optionally other generalized effects)
|
||||
// Searching for generalized effect -> sector has to have this generalized effect (plus optionally other generalized effects) and optionally any normal effect
|
||||
// Searching for normal effect -> sector has to have normal effect and optionally any generalized effect
|
||||
if (sd.Effect != 0 && sd.GeneralizedBits.Count > 0)
|
||||
match = sd.Effect == sdo.Effect && sd.GeneralizedBits.IsSubsetOf(sdo.GeneralizedBits);
|
||||
else if (sd.GeneralizedBits.Count > 0)
|
||||
match = sd.GeneralizedBits.IsSubsetOf(sdo.GeneralizedBits);
|
||||
else if (sd.Effect == sdo.Effect)
|
||||
match = true;
|
||||
}
|
||||
|
||||
if(match)
|
||||
|
|
Loading…
Reference in a new issue