diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 80532c788..6933a449d 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -74,7 +74,8 @@ enum CP_END, CP_CLEARFLAGS, CP_SETFLAGS, - CP_SETSPECIAL + CP_SETSPECIAL, + CP_SETACTIVATION }; // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- @@ -239,6 +240,15 @@ void ParseCompatibility() CompatParams.Push(sc.Number); } } + else if (sc.Compare("setactivation")) + { + if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); + CompatParams.Push(CP_SETACTIVATION); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + } else { sc.UnGet(); @@ -388,6 +398,16 @@ void SetCompatibilityParams() i+=8; break; } + case CP_SETACTIVATION: + { + if (CompatParams[i+1] < numlines) + { + line_t *line = &lines[CompatParams[i+1]]; + line->activation = CompatParams[i+2]; + } + i += 3; + break; + } } } } diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 0dcac898a..e78dd99ea 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -5293,8 +5293,11 @@ int DLevelScript::RunScript () break; case PCD_CLEARLINESPECIAL: - if (activationline) + if (activationline != NULL) + { activationline->special = 0; + DPrintf("Cleared line special on line %d\n", activationline - lines); + } break; case PCD_CASEGOTO: @@ -5931,6 +5934,8 @@ int DLevelScript::RunScript () line->args[2] = STACK(3); line->args[3] = STACK(2); line->args[4] = STACK(1); + DPrintf("Set special on line %d (id %d) to %d(%d,%d,%d,%d,%d)\n", + linenum, STACK(7), specnum, arg0, STACK(4), STACK(3), STACK(2), STACK(1)); } sp -= 7; } diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 2a8a40211..21a907992 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -148,3 +148,11 @@ DCE862393CAAA6FF1294FB7056B53057 // UAC Ultra map07: Contains a scroller dependi { badangles } + +E2B5D1400279335811C1C1C0B437D9C8 // Deathknights of the Dark Citidel, map54 +{ + // This map has two gear boxes which are flagged for player cross + // activation instead of the proper player uses activation. + setactivation 963 2 + setactivation 943 2 +}