diff --git a/src/g_doomedmap.cpp b/src/g_doomedmap.cpp index 08d5aa2e2..42157101d 100644 --- a/src/g_doomedmap.cpp +++ b/src/g_doomedmap.cpp @@ -81,7 +81,7 @@ struct MapinfoEdMapItem { FName classname; // DECORATE is read after MAPINFO so we do not have the actual classes available here yet. short special; - bool argsdefined; + signed char argsdefined; int args[5]; // These are for error reporting. We must store the file information because it's no longer available when these items get resolved. FString filename; @@ -181,14 +181,14 @@ void FMapInfoParser::ParseDoomEdNums() editem.special = -1; } memset(editem.args, 0, sizeof(editem.args)); - editem.argsdefined = false; + editem.argsdefined = 0; int minargs = 0; int maxargs = 5; FString specialname; if (sc.CheckString(",")) { - editem.argsdefined = true; // mark args as used - if this is done we need to prevent assignment of map args in P_SpawnMapThing. + editem.argsdefined = 5; // mark args as used - if this is done we need to prevent assignment of map args in P_SpawnMapThing. if (editem.special < 0) editem.special = 0; if (!sc.CheckNumber()) { @@ -221,7 +221,14 @@ void FMapInfoParser::ParseDoomEdNums() editem.args[i] = sc.Number; i++; if (!sc.CheckString(",")) break; + // special check for the ambient sounds which combine the arg being set here with the ones on the mapthing. + if (sc.CheckString("+")) + { + editem.argsdefined = i; + break; + } sc.MustGetNumber(); + } if (specialname.IsNotEmpty() && (i < minargs || i > maxargs)) { diff --git a/src/info.h b/src/info.h index bdbb69940..22e3b2f5c 100644 --- a/src/info.h +++ b/src/info.h @@ -283,7 +283,7 @@ struct FDoomEdEntry { const PClass *Type; short Special; - bool ArgsDefined; + signed char ArgsDefined; int Args[5]; }; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index ab89ae04c..bc314dc0e 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4674,10 +4674,10 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position) } // copy args to mapthing so that we have them in one place for the rest of this function - if (mentry->ArgsDefined) + if (mentry->ArgsDefined > 0) { if (mentry->Type!= NULL) mthing->special = mentry->Special; - memcpy(mthing->args, mentry->Args, sizeof(mthing->args)); + memcpy(mthing->args, mentry->Args, sizeof(mthing->args[0]) * mentry->ArgsDefined); } int pnum = -1; diff --git a/wadsrc/static/mapinfo/common.txt b/wadsrc/static/mapinfo/common.txt index f26ca6731..4b663047c 100644 --- a/wadsrc/static/mapinfo/common.txt +++ b/wadsrc/static/mapinfo/common.txt @@ -118,70 +118,70 @@ DoomEdNums 9997 = SecActExit 9998 = SecActEnter 9999 = SecActHitFloor - 14001 = AmbientSound, 1 - 14002 = AmbientSound, 2 - 14003 = AmbientSound, 3 - 14004 = AmbientSound, 4 - 14005 = AmbientSound, 5 - 14006 = AmbientSound, 6 - 14007 = AmbientSound, 7 - 14008 = AmbientSound, 8 - 14009 = AmbientSound, 9 - 14010 = AmbientSound, 10 - 14011 = AmbientSound, 11 - 14012 = AmbientSound, 12 - 14013 = AmbientSound, 13 - 14014 = AmbientSound, 14 - 14015 = AmbientSound, 15 - 14016 = AmbientSound, 16 - 14017 = AmbientSound, 17 - 14018 = AmbientSound, 18 - 14019 = AmbientSound, 19 - 14020 = AmbientSound, 20 - 14021 = AmbientSound, 21 - 14022 = AmbientSound, 22 - 14023 = AmbientSound, 23 - 14024 = AmbientSound, 24 - 14025 = AmbientSound, 25 - 14026 = AmbientSound, 26 - 14027 = AmbientSound, 27 - 14028 = AmbientSound, 28 - 14029 = AmbientSound, 29 - 14030 = AmbientSound, 30 - 14031 = AmbientSound, 31 - 14032 = AmbientSound, 32 - 14033 = AmbientSound, 33 - 14034 = AmbientSound, 34 - 14035 = AmbientSound, 35 - 14036 = AmbientSound, 36 - 14037 = AmbientSound, 37 - 14038 = AmbientSound, 38 - 14039 = AmbientSound, 39 - 14040 = AmbientSound, 40 - 14041 = AmbientSound, 41 - 14042 = AmbientSound, 42 - 14043 = AmbientSound, 43 - 14044 = AmbientSound, 44 - 14045 = AmbientSound, 45 - 14046 = AmbientSound, 46 - 14047 = AmbientSound, 47 - 14048 = AmbientSound, 48 - 14049 = AmbientSound, 49 - 14050 = AmbientSound, 50 - 14051 = AmbientSound, 51 - 14052 = AmbientSound, 52 - 14053 = AmbientSound, 53 - 14054 = AmbientSound, 54 - 14055 = AmbientSound, 55 - 14056 = AmbientSound, 56 - 14057 = AmbientSound, 57 - 14058 = AmbientSound, 58 - 14059 = AmbientSound, 59 - 14060 = AmbientSound, 60 - 14061 = AmbientSound, 61 - 14062 = AmbientSound, 62 - 14063 = AmbientSound, 63 - 14064 = AmbientSound, 64 + 14001 = AmbientSound, 1, + + 14002 = AmbientSound, 2, + + 14003 = AmbientSound, 3, + + 14004 = AmbientSound, 4, + + 14005 = AmbientSound, 5, + + 14006 = AmbientSound, 6, + + 14007 = AmbientSound, 7, + + 14008 = AmbientSound, 8, + + 14009 = AmbientSound, 9, + + 14010 = AmbientSound, 10, + + 14011 = AmbientSound, 11, + + 14012 = AmbientSound, 12, + + 14013 = AmbientSound, 13, + + 14014 = AmbientSound, 14, + + 14015 = AmbientSound, 15, + + 14016 = AmbientSound, 16, + + 14017 = AmbientSound, 17, + + 14018 = AmbientSound, 18, + + 14019 = AmbientSound, 19, + + 14020 = AmbientSound, 20, + + 14021 = AmbientSound, 21, + + 14022 = AmbientSound, 22, + + 14023 = AmbientSound, 23, + + 14024 = AmbientSound, 24, + + 14025 = AmbientSound, 25, + + 14026 = AmbientSound, 26, + + 14027 = AmbientSound, 27, + + 14028 = AmbientSound, 28, + + 14029 = AmbientSound, 29, + + 14030 = AmbientSound, 30, + + 14031 = AmbientSound, 31, + + 14032 = AmbientSound, 32, + + 14033 = AmbientSound, 33, + + 14034 = AmbientSound, 34, + + 14035 = AmbientSound, 35, + + 14036 = AmbientSound, 36, + + 14037 = AmbientSound, 37, + + 14038 = AmbientSound, 38, + + 14039 = AmbientSound, 39, + + 14040 = AmbientSound, 40, + + 14041 = AmbientSound, 41, + + 14042 = AmbientSound, 42, + + 14043 = AmbientSound, 43, + + 14044 = AmbientSound, 44, + + 14045 = AmbientSound, 45, + + 14046 = AmbientSound, 46, + + 14047 = AmbientSound, 47, + + 14048 = AmbientSound, 48, + + 14049 = AmbientSound, 49, + + 14050 = AmbientSound, 50, + + 14051 = AmbientSound, 51, + + 14052 = AmbientSound, 52, + + 14053 = AmbientSound, 53, + + 14054 = AmbientSound, 54, + + 14055 = AmbientSound, 55, + + 14056 = AmbientSound, 56, + + 14057 = AmbientSound, 57, + + 14058 = AmbientSound, 58, + + 14059 = AmbientSound, 59, + + 14060 = AmbientSound, 60, + + 14061 = AmbientSound, 61, + + 14062 = AmbientSound, 62, + + 14063 = AmbientSound, 63, + + 14064 = AmbientSound, 64, + 14065 = AmbientSound 14066 = SoundSequence 14067 = AmbientSoundNoGravity