- fixed: Boom's switch-based equivalents of FloorandCeiling_LowerRaise can only move either the ceiling or the floor but never both due to a programming error. Changed this special so that Boom's broken mode can be reactivated through xlat.

SVN r3004 (trunk)
This commit is contained in:
Christoph Oelckers 2010-11-10 11:25:34 +00:00
parent 5e7753d7e8
commit 340ffc08d6
2 changed files with 13 additions and 5 deletions

View file

@ -1683,10 +1683,18 @@ FUNC(LS_FloorAndCeiling_RaiseByValue)
}
FUNC(LS_FloorAndCeiling_LowerRaise)
// FloorAndCeiling_LowerRaise (tag, fspeed, cspeed)
// FloorAndCeiling_LowerRaise (tag, fspeed, cspeed, boomemu)
{
return EV_DoCeiling (DCeiling::ceilRaiseToHighest, ln, arg0, SPEED(arg2), 0, 0, 0, 0, 0, false) |
EV_DoFloor (DFloor::floorLowerToLowest, ln, arg0, SPEED(arg1), 0, 0, 0, false);
bool res = EV_DoCeiling (DCeiling::ceilRaiseToHighest, ln, arg0, SPEED(arg2), 0, 0, 0, 0, 0, false);
// The switch based Boom equivalents of FloorandCeiling_LowerRaise do incorrect checks
// which cause the floor only to move when the ceiling fails to do so.
// To avoid problems with maps that have incorrect args this only uses a
// more or less unintuitive value for the fourth arg to trigger Boom's broken behavior
if (arg3 != 1998 || !res) // (1998 for the year in which Boom was released... :P)
{
res |= EV_DoFloor (DFloor::floorLowerToLowest, ln, arg0, SPEED(arg1), 0, 0, 0, false);
}
return res;
}
FUNC(LS_Elevator_MoveToFloor)

View file

@ -168,7 +168,7 @@ include "xlat/defines.i"
163 = USE, Plat_Stop (tag)
164 = USE, Ceiling_CrushAndRaiseA (tag, C_NORMAL, C_NORMAL, 10)
165 = USE, Ceiling_CrushAndRaiseSilentA (tag, C_SLOW, C_SLOW, 10)
166 = USE, FloorAndCeiling_LowerRaise (tag, F_SLOW, C_SLOW)
166 = USE, FloorAndCeiling_LowerRaise (tag, F_SLOW, C_SLOW, 1998)
167 = USE, Ceiling_LowerAndCrush (tag, C_SLOW, 0, 2)
168 = USE, Ceiling_CrushStop (tag)
169 = USE, Light_MaxNeighbor (tag)
@ -188,7 +188,7 @@ include "xlat/defines.i"
183 = USE|REP, Ceiling_CrushAndRaiseA (tag, C_NORMAL, C_NORMAL, 10)
184 = USE|REP, Ceiling_CrushAndRaiseA (tag, C_SLOW, C_SLOW, 10)
185 = USE|REP, Ceiling_CrushAndRaiseSilentA (tag, C_SLOW, C_SLOW, 10)
186 = USE|REP, FloorAndCeiling_LowerRaise (tag, F_SLOW, C_SLOW)
186 = USE|REP, FloorAndCeiling_LowerRaise (tag, F_SLOW, C_SLOW, 1998)
187 = USE|REP, Ceiling_LowerAndCrush (tag, C_SLOW, 0, 2)
188 = USE|REP, Ceiling_CrushStop (tag)
189 = USE, Floor_TransferTrigger (tag)