mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- fixed: EV_DoFloor was a bit too selective about which movement types were allowed to crush. Changed so that the crush parameter is always used. Also changed all non-crushing calls to explicitly pass -1 as crush damage instead of relying on EV_DoFloor to ignore the passed value.
This commit is contained in:
parent
15b1c71257
commit
6f7b83faa1
6 changed files with 27 additions and 29 deletions
|
@ -106,7 +106,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
|
|||
switch (self->GetClass()->TypeName)
|
||||
{
|
||||
case NAME_AlienSpectre1:
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 999, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 999, FRACUNIT, 0, -1, 0, false);
|
||||
log = 95;
|
||||
break;
|
||||
|
||||
|
@ -180,7 +180,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
|
|||
{ // Another Sigil piece. Woohoo!
|
||||
log = 83;
|
||||
}
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, FRACUNIT, 0, -1, 0, false);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -80,6 +80,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrusaderDeath)
|
|||
{
|
||||
if (CheckBossDeath (self))
|
||||
{
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 667, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 667, FRACUNIT, 0, -1, 0, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -548,7 +548,7 @@ void APowerCoupling::Die (AActor *source, AActor *inflictor, int dmgflags)
|
|||
P_NoiseAlert (source, this);
|
||||
}
|
||||
EV_DoDoor (DDoor::doorClose, NULL, players[i].mo, 225, 2*FRACUNIT, 0, 0, 0);
|
||||
EV_DoFloor (DFloor::floorLowerToHighest, NULL, 44, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorLowerToHighest, NULL, 44, FRACUNIT, 0, -1, 0, false);
|
||||
players[i].mo->GiveInventoryType (QuestItemClasses[5]);
|
||||
S_Sound (CHAN_VOICE, "svox/voc13", 1, ATTN_NORM);
|
||||
players[i].SetLogNumber (13);
|
||||
|
|
|
@ -3275,13 +3275,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_BossDeath)
|
|||
{
|
||||
if (type == NAME_Fatso)
|
||||
{
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, FRACUNIT, 0, -1, 0, false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == NAME_Arachnotron)
|
||||
{
|
||||
EV_DoFloor (DFloor::floorRaiseByTexture, NULL, 667, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorRaiseByTexture, NULL, 667, FRACUNIT, 0, -1, 0, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3290,11 +3290,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_BossDeath)
|
|||
switch (level.flags & LEVEL_SPECACTIONSMASK)
|
||||
{
|
||||
case LEVEL_SPECLOWERFLOOR:
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorLowerToLowest, NULL, 666, FRACUNIT, 0, -1, 0, false);
|
||||
return;
|
||||
|
||||
case LEVEL_SPECLOWERFLOORTOHIGHEST:
|
||||
EV_DoFloor (DFloor::floorLowerToHighest, NULL, 666, FRACUNIT, 0, 0, 0, false);
|
||||
EV_DoFloor (DFloor::floorLowerToHighest, NULL, 666, FRACUNIT, 0, -1, 0, false);
|
||||
return;
|
||||
|
||||
case LEVEL_SPECOPENDOOR:
|
||||
|
|
|
@ -320,7 +320,7 @@ manual_floor:
|
|||
rtn = true;
|
||||
floor = new DFloor (sec);
|
||||
floor->m_Type = floortype;
|
||||
floor->m_Crush = -1;
|
||||
floor->m_Crush = crush;
|
||||
floor->m_Hexencrush = hexencrush;
|
||||
floor->m_Speed = speed;
|
||||
floor->m_ResetCount = 0; // [RH]
|
||||
|
@ -374,7 +374,6 @@ manual_floor:
|
|||
break;
|
||||
|
||||
case DFloor::floorRaiseAndCrushDoom:
|
||||
floor->m_Crush = crush;
|
||||
case DFloor::floorRaiseToLowestCeiling:
|
||||
floor->m_Direction = 1;
|
||||
newheight = sec->FindLowestCeilingSurrounding (&spot);
|
||||
|
@ -406,7 +405,6 @@ manual_floor:
|
|||
break;
|
||||
|
||||
case DFloor::floorRaiseAndCrush:
|
||||
floor->m_Crush = crush;
|
||||
floor->m_Direction = 1;
|
||||
newheight = sec->FindLowestCeilingPoint (&spot) - 8*FRACUNIT;
|
||||
floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight);
|
||||
|
|
|
@ -281,43 +281,43 @@ FUNC(LS_Generic_Door)
|
|||
FUNC(LS_Floor_LowerByValue)
|
||||
// Floor_LowerByValue (tag, speed, height)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorLowerByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorLowerByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_LowerToLowest)
|
||||
// Floor_LowerToLowest (tag, speed)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorLowerToLowest, ln, arg0, SPEED(arg1), 0, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorLowerToLowest, ln, arg0, SPEED(arg1), 0, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_LowerToHighest)
|
||||
// Floor_LowerToHighest (tag, speed, adjust, hereticlower)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorLowerToHighest, ln, arg0, SPEED(arg1), (arg2-128)*FRACUNIT, 0, 0, false, arg3==1);
|
||||
return EV_DoFloor (DFloor::floorLowerToHighest, ln, arg0, SPEED(arg1), (arg2-128)*FRACUNIT, -1, 0, false, arg3==1);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_LowerToNearest)
|
||||
// Floor_LowerToNearest (tag, speed)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorLowerToNearest, ln, arg0, SPEED(arg1), 0, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorLowerToNearest, ln, arg0, SPEED(arg1), 0, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseByValue)
|
||||
// Floor_RaiseByValue (tag, speed, height)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseToHighest)
|
||||
// Floor_RaiseToHighest (tag, speed)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseToHighest, ln, arg0, SPEED(arg1), 0, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseToHighest, ln, arg0, SPEED(arg1), 0, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseToNearest)
|
||||
// Floor_RaiseToNearest (tag, speed)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseToNearest, ln, arg0, SPEED(arg1), 0, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseToNearest, ln, arg0, SPEED(arg1), 0, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseAndCrush)
|
||||
|
@ -335,13 +335,13 @@ FUNC(LS_Floor_RaiseAndCrushDoom)
|
|||
FUNC(LS_Floor_RaiseByValueTimes8)
|
||||
// FLoor_RaiseByValueTimes8 (tag, speed, height)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2*8, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2*8, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_LowerByValueTimes8)
|
||||
// Floor_LowerByValueTimes8 (tag, speed, height)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorLowerByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2*8, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorLowerByValue, ln, arg0, SPEED(arg1), FRACUNIT*arg2*8, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_CrushStop)
|
||||
|
@ -353,51 +353,51 @@ FUNC(LS_Floor_CrushStop)
|
|||
FUNC(LS_Floor_LowerInstant)
|
||||
// Floor_LowerInstant (tag, unused, height)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorLowerInstant, ln, arg0, 0, arg2*FRACUNIT*8, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorLowerInstant, ln, arg0, 0, arg2*FRACUNIT*8, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseInstant)
|
||||
// Floor_RaiseInstant (tag, unused, height)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseInstant, ln, arg0, 0, arg2*FRACUNIT*8, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseInstant, ln, arg0, 0, arg2*FRACUNIT*8, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_MoveToValueTimes8)
|
||||
// Floor_MoveToValueTimes8 (tag, speed, height, negative)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorMoveToValue, ln, arg0, SPEED(arg1),
|
||||
arg2*FRACUNIT*8*(arg3?-1:1), 0, 0, false);
|
||||
arg2*FRACUNIT*8*(arg3?-1:1), -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_MoveToValue)
|
||||
// Floor_MoveToValue (tag, speed, height, negative)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorMoveToValue, ln, arg0, SPEED(arg1),
|
||||
arg2*FRACUNIT*(arg3?-1:1), 0, 0, false);
|
||||
arg2*FRACUNIT*(arg3?-1:1), -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseToLowestCeiling)
|
||||
// Floor_RaiseToLowestCeiling (tag, speed)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseToLowestCeiling, ln, arg0, SPEED(arg1), 0, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseToLowestCeiling, ln, arg0, SPEED(arg1), 0, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseByTexture)
|
||||
// Floor_RaiseByTexture (tag, speed)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseByTexture, ln, arg0, SPEED(arg1), 0, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseByTexture, ln, arg0, SPEED(arg1), 0, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_RaiseByValueTxTy)
|
||||
// Floor_RaiseByValueTxTy (tag, speed, height)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorRaiseAndChange, ln, arg0, SPEED(arg1), arg2*FRACUNIT, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorRaiseAndChange, ln, arg0, SPEED(arg1), arg2*FRACUNIT, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_LowerToLowestTxTy)
|
||||
// Floor_LowerToLowestTxTy (tag, speed)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorLowerAndChange, ln, arg0, SPEED(arg1), arg2*FRACUNIT, 0, 0, false);
|
||||
return EV_DoFloor (DFloor::floorLowerAndChange, ln, arg0, SPEED(arg1), arg2*FRACUNIT, -1, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_Waggle)
|
||||
|
@ -1764,7 +1764,7 @@ FUNC(LS_FloorAndCeiling_LowerRaise)
|
|||
// 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);
|
||||
res |= EV_DoFloor (DFloor::floorLowerToLowest, ln, arg0, SPEED(arg1), 0, -1, 0, false);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue