Tag handling: don't take trigger tag into account if it's 0

This commit is contained in:
spherallic 2024-06-21 14:37:41 +02:00
parent d7d2ebcedf
commit 20254791b6

View file

@ -3929,8 +3929,11 @@ namespace CodeImp.DoomBuilder.Map
bool changed = false;
// Make a copy of tags, otherwise BeforePropsChange will be triggered after tag changes
List<int> tags = new List<int>(s.Tags);
// SRB2 also has separate trigger tag field
tags.Add(s.Fields.GetValue("triggertag", 0));
int triggertag = s.Fields.GetValue("triggertag", 0);
if (triggertag > 0) tags.Add(triggertag);
for(int i = 0; i < tags.Count; i++)
{
int tag = tags[i];