From d48dee0fc52855ea87edb65fced2f198342b1e04 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Wed, 7 Jul 2021 08:56:50 +0200 Subject: [PATCH] do not override numerical values already set for MBF21 Bits fields (#237) * do not override numerical values already set for MBF21 Bits fields * setting Args3 to 0 for A_MonsterMeleeAttack() means to play no sound at all * Revert "setting Args3 to 0 for A_MonsterMeleeAttack() means to play no sound at all" This reverts commit ada1849337ddf07dba81418d6a70387592620dc4. --- Source/d_deh.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/d_deh.c b/Source/d_deh.c index 2d7d2c6f..e6304758 100644 --- a/Source/d_deh.c +++ b/Source/d_deh.c @@ -1829,8 +1829,10 @@ void deh_procThing(DEHFILE *fpin, FILE* fpout, char *line) if (!strcasecmp(key,deh_mobjinfo[ix])) // killough 8/98 { // mbf21: process thing flags - if (!strcasecmp(key, "MBF21 Bits") && !value) + if (!strcasecmp(key, "MBF21 Bits")) { + if (!value) + { for (value = 0; (strval = strtok(strval, ",+| \t\f\r")); strval = NULL) { size_t iy; @@ -1849,6 +1851,7 @@ void deh_procThing(DEHFILE *fpin, FILE* fpout, char *line) fprintf(fpout, "Could not find MBF21 bit mnemonic %s\n", strval); } } + } mobjinfo[indexnum].flags2 = value; } @@ -2068,6 +2071,8 @@ void deh_procFrame(DEHFILE *fpin, FILE* fpout, char *line) // mbf21: process state flags if (!strcasecmp(key,deh_state[15])) // MBF21 Bits { + if (!value) + { for (value = 0; (strval = strtok(strval, ",+| \t\f\r")); strval = NULL) { const struct deh_flag_s *flag; @@ -2086,6 +2091,7 @@ void deh_procFrame(DEHFILE *fpin, FILE* fpout, char *line) fprintf(fpout, "Could not find MBF21 frame bit mnemonic %s\n", strval); } } + } states[indexnum].flags = value; } @@ -2346,6 +2352,8 @@ void deh_procWeapon(DEHFILE *fpin, FILE* fpout, char *line) // mbf21: process weapon flags if (!strcasecmp(key,deh_weapon[7])) // MBF21 Bits { + if (!value) + { for (value = 0; (strval = strtok(strval, ",+| \t\f\r")); strval = NULL) { const struct deh_flag_s *flag; @@ -2361,6 +2369,7 @@ void deh_procWeapon(DEHFILE *fpin, FILE* fpout, char *line) if (!flag->name && fpout) fprintf(fpout, "Could not find MBF21 weapon bit mnemonic %s\n", strval); } + } weaponinfo[indexnum].flags = value; }