Make 96's flags consistent with 97-99 by default

This commit is contained in:
flarn2006 2021-05-30 12:16:15 -04:00
parent f8fe763df2
commit 0b51b391f1
2 changed files with 28 additions and 24 deletions

View file

@ -644,32 +644,33 @@ linedeftypes
{
title = "Apply Tag to Tagged Sectors";
prefix = "(96)";
flags8192text = "[13] Use Front Side Offsets";
flags32768text = "[15] Use Back Side Offsets";
flags1024text = "[10] Offsets are target tags";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
97
{
title = "Apply Tag to Front Sector";
prefix = "(97)";
flags8192text = "[13] Use Front Side Offsets";
flags32768text = "[15] Use Back Side Offsets";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
98
{
title = "Apply Tag to Back Sector";
prefix = "(98)";
flags8192text = "[13] Use Front Side Offsets";
flags32768text = "[15] Use Back Side Offsets";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
99
{
title = "Apply Tag to Front and Back Sectors";
prefix = "(99)";
flags8192text = "[13] Use Front Side Offsets";
flags32768text = "[15] Use Back Side Offsets";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
540

View file

@ -2982,28 +2982,31 @@ static void P_AddBinaryMapTags(void)
if (lines[i].special == 96) {
size_t j;
mtag_t tag = Tag_FGet(&lines[i].frontsector->tags);
mtag_t target_tags[5];
target_tags[0] = Tag_FGet(&lines[i].tags);
mtag_t target_tag = Tag_FGet(&lines[i].tags);
mtag_t offset_tags[4];
memset(offset_tags, 0, sizeof(mtag_t)*4);
if (lines[i].flags & ML_EFFECT6) {
target_tags[1] = (INT32)sides[lines[i].sidenum[0]].textureoffset / FRACUNIT;
target_tags[2] = (INT32)sides[lines[i].sidenum[0]].rowoffset / FRACUNIT;
} else {
target_tags[1] = target_tags[2] = 0;
offset_tags[1] = (INT32)sides[lines[i].sidenum[0]].textureoffset / FRACUNIT;
offset_tags[2] = (INT32)sides[lines[i].sidenum[0]].rowoffset / FRACUNIT;
}
if (lines[i].flags & ML_TFERLINE) {
target_tags[3] = (INT32)sides[lines[i].sidenum[1]].textureoffset / FRACUNIT;
target_tags[4] = (INT32)sides[lines[i].sidenum[1]].rowoffset / FRACUNIT;
} else {
target_tags[3] = target_tags[4] = 0;
offset_tags[3] = (INT32)sides[lines[i].sidenum[1]].textureoffset / FRACUNIT;
offset_tags[4] = (INT32)sides[lines[i].sidenum[1]].rowoffset / FRACUNIT;
}
for (j = 0; j < numsectors; j++) {
size_t k; for (k = 0; k < 5; k++) {
if (k > 0 && !target_tags[k])
continue;
if (Tag_Find(&sectors[j].tags, target_tags[k])) {
Tag_Add(&sectors[j].tags, tag);
break;
boolean matches_target_tag = Tag_Find(&sectors[j].tags, target_tag);
size_t k; for (k = 0; k < 4; k++) {
if (lines[i].flags & ML_EFFECT5) {
if (matches_target_tag || offset_tags[k] && Tag_Find(&sectors[j].tags, offset_tags[k])) {
Tag_Add(&sectors[j].tags, tag);
break;
}
} else if (matches_target_tag) {
if (k == 0)
Tag_Add(&sectors[j].tags, tag);
if (offset_tags[k])
Tag_Add(&sectors[j].tags, offset_tags[k]);
}
}
}