mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- fixed: Hexen's Floor_RaiseAndCrush is not the same action as the one used by Doom and which was used by ZDoom before r4053. Restored the old code and gave it a new special 99:Floor_RaiseAndCrushDoom.
SVN r4125 (trunk)
This commit is contained in:
parent
9af00a22d3
commit
027a99d772
6 changed files with 23 additions and 11 deletions
|
@ -97,7 +97,7 @@ DEFINE_SPECIAL(FloorAndCeiling_LowerByValue, 95, 3, 3, 3)
|
||||||
DEFINE_SPECIAL(FloorAndCeiling_RaiseByValue, 96, 3, 3, 3)
|
DEFINE_SPECIAL(FloorAndCeiling_RaiseByValue, 96, 3, 3, 3)
|
||||||
DEFINE_SPECIAL(Ceiling_LowerAndCrushDist, 97, 3, 5, 5)
|
DEFINE_SPECIAL(Ceiling_LowerAndCrushDist, 97, 3, 5, 5)
|
||||||
DEFINE_SPECIAL(Sector_SetTranslucent, 98, 3, 4, 4)
|
DEFINE_SPECIAL(Sector_SetTranslucent, 98, 3, 4, 4)
|
||||||
|
DEFINE_SPECIAL(Floor_RaiseAndCrushDoom, 99, 3, 4, 4)
|
||||||
DEFINE_SPECIAL(Scroll_Texture_Left, 100, -1, -1, 2)
|
DEFINE_SPECIAL(Scroll_Texture_Left, 100, -1, -1, 2)
|
||||||
DEFINE_SPECIAL(Scroll_Texture_Right, 101, -1, -1, 2)
|
DEFINE_SPECIAL(Scroll_Texture_Right, 101, -1, -1, 2)
|
||||||
DEFINE_SPECIAL(Scroll_Texture_Up, 102, -1, -1, 2)
|
DEFINE_SPECIAL(Scroll_Texture_Up, 102, -1, -1, 2)
|
||||||
|
|
|
@ -375,13 +375,18 @@ manual_floor:
|
||||||
floor->m_Direction = (floor->m_FloorDestDist > sec->floorplane.d) ? -1 : 1;
|
floor->m_Direction = (floor->m_FloorDestDist > sec->floorplane.d) ? -1 : 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DFloor::floorRaiseAndCrushDoom:
|
||||||
|
floor->m_Crush = crush;
|
||||||
case DFloor::floorRaiseToLowestCeiling:
|
case DFloor::floorRaiseToLowestCeiling:
|
||||||
floor->m_Direction = 1;
|
floor->m_Direction = 1;
|
||||||
newheight = sec->FindLowestCeilingSurrounding (&spot);
|
newheight = sec->FindLowestCeilingSurrounding (&spot);
|
||||||
|
if (floortype == DFloor::floorRaiseAndCrush)
|
||||||
|
newheight -= 8 * FRACUNIT;
|
||||||
ceilingheight = sec->FindLowestCeilingPoint (&spot2);
|
ceilingheight = sec->FindLowestCeilingPoint (&spot2);
|
||||||
floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight);
|
floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight);
|
||||||
if (sec->floorplane.ZatPointDist (spot2, floor->m_FloorDestDist) > ceilingheight)
|
if (sec->floorplane.ZatPointDist (spot2, floor->m_FloorDestDist) > ceilingheight)
|
||||||
floor->m_FloorDestDist = sec->floorplane.PointToDist (spot2, ceilingheight);
|
floor->m_FloorDestDist = sec->floorplane.PointToDist (spot2,
|
||||||
|
floortype == DFloor::floorRaiseAndCrush ? ceilingheight - 8*FRACUNIT : ceilingheight);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DFloor::floorRaiseToHighest:
|
case DFloor::floorRaiseToHighest:
|
||||||
|
|
|
@ -326,6 +326,12 @@ FUNC(LS_Floor_RaiseAndCrush)
|
||||||
return EV_DoFloor (DFloor::floorRaiseAndCrush, ln, arg0, SPEED(arg1), 0, arg2, 0, CRUSHTYPE(arg3));
|
return EV_DoFloor (DFloor::floorRaiseAndCrush, ln, arg0, SPEED(arg1), 0, arg2, 0, CRUSHTYPE(arg3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FUNC(LS_Floor_RaiseAndCrushDoom)
|
||||||
|
// Floor_RaiseAndCrushDoom (tag, speed, crush, crushmode)
|
||||||
|
{
|
||||||
|
return EV_DoFloor (DFloor::floorRaiseAndCrushDoom, ln, arg0, SPEED(arg1), 0, arg2, 0, CRUSHTYPE(arg3));
|
||||||
|
}
|
||||||
|
|
||||||
FUNC(LS_Floor_RaiseByValueTimes8)
|
FUNC(LS_Floor_RaiseByValueTimes8)
|
||||||
// FLoor_RaiseByValueTimes8 (tag, speed, height)
|
// FLoor_RaiseByValueTimes8 (tag, speed, height)
|
||||||
{
|
{
|
||||||
|
@ -3232,7 +3238,7 @@ lnSpecFunc LineSpecials[256] =
|
||||||
/* 96 */ LS_FloorAndCeiling_RaiseByValue,
|
/* 96 */ LS_FloorAndCeiling_RaiseByValue,
|
||||||
/* 97 */ LS_Ceiling_LowerAndCrushDist,
|
/* 97 */ LS_Ceiling_LowerAndCrushDist,
|
||||||
/* 98 */ LS_Sector_SetTranslucent,
|
/* 98 */ LS_Sector_SetTranslucent,
|
||||||
/* 99 */ LS_NOP,
|
/* 99 */ LS_Floor_RaiseAndCrushDoom,
|
||||||
/* 100 */ LS_NOP, // Scroll_Texture_Left
|
/* 100 */ LS_NOP, // Scroll_Texture_Left
|
||||||
/* 101 */ LS_NOP, // Scroll_Texture_Right
|
/* 101 */ LS_NOP, // Scroll_Texture_Right
|
||||||
/* 102 */ LS_NOP, // Scroll_Texture_Up
|
/* 102 */ LS_NOP, // Scroll_Texture_Up
|
||||||
|
|
|
@ -697,6 +697,7 @@ public:
|
||||||
floorRaiseToHighest,
|
floorRaiseToHighest,
|
||||||
floorRaiseToNearest,
|
floorRaiseToNearest,
|
||||||
floorRaiseAndCrush,
|
floorRaiseAndCrush,
|
||||||
|
floorRaiseAndCrushDoom,
|
||||||
floorCrushStop,
|
floorCrushStop,
|
||||||
floorLowerInstant,
|
floorLowerInstant,
|
||||||
floorRaiseInstant,
|
floorRaiseInstant,
|
||||||
|
|
|
@ -54,8 +54,8 @@ include "xlat/defines.i"
|
||||||
52 = WALK, Exit_Normal (0)
|
52 = WALK, Exit_Normal (0)
|
||||||
53 = WALK, Plat_PerpetualRaiseLip (tag, P_SLOW, PLATWAIT, 0)
|
53 = WALK, Plat_PerpetualRaiseLip (tag, P_SLOW, PLATWAIT, 0)
|
||||||
54 = WALK, Plat_Stop (tag)
|
54 = WALK, Plat_Stop (tag)
|
||||||
55 = USE, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
55 = USE, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
56 = WALK, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
56 = WALK, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
57 = WALK, Ceiling_CrushStop (tag)
|
57 = WALK, Ceiling_CrushStop (tag)
|
||||||
58 = WALK, Floor_RaiseByValue (tag, F_SLOW, 24)
|
58 = WALK, Floor_RaiseByValue (tag, F_SLOW, 24)
|
||||||
59 = WALK, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
59 = WALK, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
||||||
|
@ -64,7 +64,7 @@ include "xlat/defines.i"
|
||||||
62 = USE|REP, Plat_DownWaitUpStayLip (tag, P_FAST, PLATWAIT, 0)
|
62 = USE|REP, Plat_DownWaitUpStayLip (tag, P_FAST, PLATWAIT, 0)
|
||||||
63 = USE|REP, Door_Raise (tag, D_SLOW, VDOORWAIT)
|
63 = USE|REP, Door_Raise (tag, D_SLOW, VDOORWAIT)
|
||||||
64 = USE|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
64 = USE|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
||||||
65 = USE|REP, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
65 = USE|REP, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
66 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 3)
|
66 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 3)
|
||||||
67 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 4)
|
67 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 4)
|
||||||
68 = USE|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
68 = USE|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
||||||
|
@ -93,7 +93,7 @@ include "xlat/defines.i"
|
||||||
91 = WALK|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
91 = WALK|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
||||||
92 = WALK|REP, Floor_RaiseByValue (tag, F_SLOW, 24)
|
92 = WALK|REP, Floor_RaiseByValue (tag, F_SLOW, 24)
|
||||||
93 = WALK|REP, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
93 = WALK|REP, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
||||||
94 = WALK|REP, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
94 = WALK|REP, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
95 = WALK|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
95 = WALK|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
||||||
96 = WALK|REP, Floor_RaiseByTexture (tag, F_SLOW)
|
96 = WALK|REP, Floor_RaiseByTexture (tag, F_SLOW)
|
||||||
97 = WALK|REP|MONST, Teleport (0, tag)
|
97 = WALK|REP|MONST, Teleport (0, tag)
|
||||||
|
|
|
@ -113,7 +113,7 @@ RetailOnly = 121
|
||||||
52 = WALK|REP, ACS_ExecuteAlways (0, 0, 52, tag)
|
52 = WALK|REP, ACS_ExecuteAlways (0, 0, 52, tag)
|
||||||
53 = WALK, Plat_PerpetualRaiseLip (tag, P_SLOW, PLATWAIT, 0)
|
53 = WALK, Plat_PerpetualRaiseLip (tag, P_SLOW, PLATWAIT, 0)
|
||||||
54 = WALK, Plat_Stop (tag)
|
54 = WALK, Plat_Stop (tag)
|
||||||
56 = WALK, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
56 = WALK, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
57 = WALK, Ceiling_CrushStop (tag)
|
57 = WALK, Ceiling_CrushStop (tag)
|
||||||
58 = WALK, Floor_RaiseByValue (tag, F_SLOW, 64)
|
58 = WALK, Floor_RaiseByValue (tag, F_SLOW, 64)
|
||||||
59 = WALK, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
59 = WALK, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
||||||
|
@ -164,7 +164,7 @@ RetailOnly = 121
|
||||||
91 = WALK|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
91 = WALK|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
||||||
92 = WALK|REP, Floor_RaiseByValue (tag, F_SLOW, 64)
|
92 = WALK|REP, Floor_RaiseByValue (tag, F_SLOW, 64)
|
||||||
93 = WALK|REP, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
93 = WALK|REP, Floor_RaiseByValueTxTy (tag, F_SLOW, 24)
|
||||||
94 = WALK|REP, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
94 = WALK|REP, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
95 = WALK|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
95 = WALK|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
||||||
96 = WALK|REP, Floor_RaiseByTexture (tag, F_SLOW)
|
96 = WALK|REP, Floor_RaiseByTexture (tag, F_SLOW)
|
||||||
97 = WALK|REP|MONST, Teleport (0, tag)
|
97 = WALK|REP|MONST, Teleport (0, tag)
|
||||||
|
@ -247,7 +247,7 @@ RetailOnly = 121
|
||||||
49 = USE, Ceiling_CrushAndRaiseDist (tag, 8, C_SLOW, 0, 2)
|
49 = USE, Ceiling_CrushAndRaiseDist (tag, 8, C_SLOW, 0, 2)
|
||||||
50 = USE, Door_Close (tag, D_SLOW)
|
50 = USE, Door_Close (tag, D_SLOW)
|
||||||
51 = USE, Teleport_EndGame (0)
|
51 = USE, Teleport_EndGame (0)
|
||||||
55 = USE, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
55 = USE, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
101 = USE, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
101 = USE, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
||||||
102 = USE, Floor_LowerToHighest (tag, F_SLOW, 128)
|
102 = USE, Floor_LowerToHighest (tag, F_SLOW, 128)
|
||||||
103 = USE, Door_Open (tag, D_SLOW)
|
103 = USE, Door_Open (tag, D_SLOW)
|
||||||
|
@ -289,7 +289,7 @@ RetailOnly = 121
|
||||||
64 = USE|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
64 = USE|REP, Floor_RaiseToLowestCeiling (tag, F_SLOW)
|
||||||
66 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 3)
|
66 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 3)
|
||||||
67 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 4)
|
67 = USE|REP, Plat_UpByValueStayTx (tag, P_SLOW/2, 4)
|
||||||
65 = USE|REP, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)
|
65 = USE|REP, Floor_RaiseAndCrushDoom (tag, F_SLOW, 10, 2)
|
||||||
68 = USE|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
68 = USE|REP, Plat_RaiseAndStayTx0 (tag, P_SLOW/2)
|
||||||
69 = USE|REP, Floor_RaiseToNearest (tag, F_SLOW)
|
69 = USE|REP, Floor_RaiseToNearest (tag, F_SLOW)
|
||||||
70 = USE|REP, Floor_LowerToHighest (tag, F_FAST, 128)
|
70 = USE|REP, Floor_LowerToHighest (tag, F_FAST, 128)
|
||||||
|
|
Loading…
Reference in a new issue