mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- added Floor_Stop and Ceiling_Stop action specials.
This commit is contained in:
parent
1ff4016498
commit
d5d383ee93
5 changed files with 50 additions and 0 deletions
|
@ -260,5 +260,7 @@ DEFINE_SPECIAL(Stairs_BuildUpDoomSync, 271, 4, 4, 4)
|
|||
DEFINE_SPECIAL(Stairs_BuildDownDoomSync, 272, 4, 4, 4)
|
||||
DEFINE_SPECIAL(Stairs_BuildUpDoomCrush, 273, 5, 5, 5)
|
||||
DEFINE_SPECIAL(Door_AnimatedClose, 274, 4, 4, 4)
|
||||
DEFINE_SPECIAL(Floor_Stop, 275, 1, 1, 1)
|
||||
DEFINE_SPECIAL(Ceiling_Stop, 276, 1, 1, 1)
|
||||
|
||||
#undef DEFINE_SPECIAL
|
||||
|
|
|
@ -582,3 +582,18 @@ bool EV_CeilingCrushStop (int tag, bool remove)
|
|||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
bool EV_StopCeiling(int tag)
|
||||
{
|
||||
FSectorTagIterator it(tag);
|
||||
while (int sec = it.Next())
|
||||
{
|
||||
if (level.sectors[sec].ceilingdata)
|
||||
{
|
||||
SN_StopSequence(&level.sectors[sec], CHAN_CEILING);
|
||||
level.sectors[sec].ceilingdata->Destroy();
|
||||
level.sectors[sec].ceilingdata = nullptr;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -561,6 +561,21 @@ bool EV_FloorCrushStop (int tag)
|
|||
return true;
|
||||
}
|
||||
|
||||
// same as above but stops any floor mover that was active on the given sector.
|
||||
bool EV_StopFloor(int tag)
|
||||
{
|
||||
FSectorTagIterator it(tag);
|
||||
while (int sec = it.Next())
|
||||
{
|
||||
if (level.sectors[sec].floordata)
|
||||
{
|
||||
SN_StopSequence(&level.sectors[sec], CHAN_FLOOR);
|
||||
level.sectors[sec].floordata->Destroy();
|
||||
level.sectors[sec].floordata = nullptr;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//==========================================================================
|
||||
//
|
||||
// BUILD A STAIRCASE!
|
||||
|
|
|
@ -563,6 +563,13 @@ FUNC(LS_Generic_Floor)
|
|||
|
||||
}
|
||||
|
||||
FUNC(LS_Floor_Stop)
|
||||
// Floor_Stop (tag)
|
||||
{
|
||||
return EV_StopFloor(arg0);
|
||||
}
|
||||
|
||||
|
||||
FUNC(LS_Stairs_BuildDown)
|
||||
// Stair_BuildDown (tag, speed, height, delay, reset)
|
||||
{
|
||||
|
@ -860,6 +867,13 @@ FUNC(LS_Ceiling_LowerByTexture)
|
|||
return EV_DoCeiling (DCeiling::ceilLowerByTexture, ln, arg0, SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_Stop)
|
||||
// Ceiling_Stop (tag)
|
||||
{
|
||||
return EV_StopCeiling(arg0);
|
||||
}
|
||||
|
||||
|
||||
FUNC(LS_Generic_Ceiling)
|
||||
// Generic_Ceiling (tag, speed, height, target, change/model/direct/crush)
|
||||
{
|
||||
|
@ -3614,6 +3628,8 @@ static lnSpecFunc LineSpecials[] =
|
|||
/* 272 */ LS_Stairs_BuildDownDoomSync,
|
||||
/* 273 */ LS_Stairs_BuildUpDoomCrush,
|
||||
/* 274 */ LS_Door_AnimatedClose,
|
||||
/* 275 */ LS_Floor_Stop,
|
||||
/* 276 */ LS_Ceiling_Stop,
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -451,6 +451,7 @@ bool P_CreateCeiling(sector_t *sec, DCeiling::ECeiling type, line_t *line, int t
|
|||
bool EV_DoCeiling (DCeiling::ECeiling type, line_t *line, int tag, double speed, double speed2, double height, int crush, int silent, int change, DCeiling::ECrushMode hexencrush = DCeiling::ECrushMode::crushDoom);
|
||||
|
||||
bool EV_CeilingCrushStop (int tag, bool remove);
|
||||
bool EV_StopCeiling(int tag);
|
||||
void P_ActivateInStasisCeiling (int tag);
|
||||
|
||||
|
||||
|
@ -564,6 +565,7 @@ bool EV_DoFloor(DFloor::EFloor floortype, line_t *line, int tag,
|
|||
double speed, double height, int crush, int change, bool hexencrush, bool hereticlower = false);
|
||||
|
||||
bool EV_FloorCrushStop (int tag);
|
||||
bool EV_StopFloor(int tag);
|
||||
bool EV_DoDonut (int tag, line_t *line, double pillarspeed, double slimespeed);
|
||||
|
||||
class DElevator : public DMover
|
||||
|
|
Loading…
Reference in a new issue