- added various action specials and parameter extensions defined by Eternity Engine.
The reason for defining them is to be able to fill out the Eternity translation table for GZDoom's Extradata parser. Most of the new specials are mere specializations of ZDoom's Generic_* functions and occupy positions above 255 to avoid filling up the last remaining free slots available for Hexen format maps. Allowing action specials greater than 255 required a few changes: * all access to action specials is now through a small set of access functions. * Two new PCodes were added to ACC to handle these new specials from scripts. * a minor change to the network protocol, so netgame and demo version numbers were bumped. * FS_Execute is now properly defined in p_lnspec.cpp. Two of the newly added specials - generalizations of the special 'close Door in 30 seconds' and 'raise door in 5 minutes' sector types, will also be available to Hexen format maps. The rest are limited to use in ACS, UDMF and DECORATE. This also adds 'change' and 'crush' parameters to most Floor_* and Ceiling_* specials, again to match Eternity's feature set.
This commit is contained in:
parent
be3b84e751
commit
7b5a77a8d8
18 changed files with 406 additions and 180 deletions
|
|
@ -121,7 +121,7 @@ void DDoor::Tick ()
|
|||
{
|
||||
switch (m_Type)
|
||||
{
|
||||
case doorRaiseIn5Mins:
|
||||
case doorWaitRaise:
|
||||
m_Direction = 1;
|
||||
m_Type = doorRaise;
|
||||
DoorSound (true);
|
||||
|
|
@ -215,7 +215,7 @@ void DDoor::Tick ()
|
|||
switch (m_Type)
|
||||
{
|
||||
case doorRaise:
|
||||
case doorRaiseIn5Mins:
|
||||
case doorWaitRaise:
|
||||
m_Direction = -1;
|
||||
DoorSound(false);
|
||||
break;
|
||||
|
|
@ -348,9 +348,9 @@ DDoor::DDoor (sector_t *sector)
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
DDoor::DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int lightTag)
|
||||
DDoor::DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int lightTag, int topcountdown)
|
||||
: DMovingCeiling (sec),
|
||||
m_Type (type), m_Speed (speed), m_TopWait (delay), m_LightTag (lightTag)
|
||||
m_Type (type), m_Speed (speed), m_TopWait (delay), m_TopCountdown(topcountdown), m_LightTag (lightTag)
|
||||
{
|
||||
vertex_t *spot;
|
||||
fixed_t height;
|
||||
|
|
@ -384,12 +384,21 @@ DDoor::DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int lightTa
|
|||
DoorSound (false);
|
||||
break;
|
||||
|
||||
case doorRaiseIn5Mins:
|
||||
case doorWaitRaise:
|
||||
m_Direction = 2;
|
||||
height = sec->FindLowestCeilingSurrounding (&spot);
|
||||
m_TopDist = sec->ceilingplane.PointToDist (spot, height - 4*FRACUNIT);
|
||||
m_TopCountdown = 5 * 60 * TICRATE;
|
||||
break;
|
||||
|
||||
case doorWaitClose:
|
||||
m_Direction = 0;
|
||||
m_Type = DDoor::doorRaise;
|
||||
height = sec->FindHighestFloorPoint (&m_BotSpot);
|
||||
m_BotDist = sec->ceilingplane.PointToDist (m_BotSpot, height);
|
||||
m_OldFloorDist = sec->floorplane.d;
|
||||
m_TopDist = sec->ceilingplane.d;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (!m_Sector->floordata || !m_Sector->floordata->IsKindOf(RUNTIME_CLASS(DPlat)) ||
|
||||
|
|
@ -414,7 +423,7 @@ DDoor::DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int lightTa
|
|||
//============================================================================
|
||||
|
||||
bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
|
||||
int tag, int speed, int delay, int lock, int lightTag, bool boomgen)
|
||||
int tag, int speed, int delay, int lock, int lightTag, bool boomgen, int topcountdown)
|
||||
{
|
||||
bool rtn = false;
|
||||
int secnum;
|
||||
|
|
@ -480,7 +489,7 @@ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
|
|||
}
|
||||
return false;
|
||||
}
|
||||
if (new DDoor (sec, type, speed, delay, lightTag))
|
||||
if (new DDoor (sec, type, speed, delay, lightTag, topcountdown))
|
||||
rtn = true;
|
||||
}
|
||||
else
|
||||
|
|
@ -494,7 +503,7 @@ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
|
|||
if (sec->PlaneMoving(sector_t::ceiling))
|
||||
continue;
|
||||
|
||||
if (new DDoor (sec, type, speed, delay, lightTag))
|
||||
if (new DDoor (sec, type, speed, delay, lightTag, topcountdown))
|
||||
rtn = true;
|
||||
}
|
||||
|
||||
|
|
@ -508,35 +517,11 @@ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
void P_SpawnDoorCloseIn30 (sector_t *sec)
|
||||
void P_SpawnDoorClose (sector_t *sec)
|
||||
{
|
||||
fixed_t height;
|
||||
DDoor *door = new DDoor (sec);
|
||||
|
||||
door->m_Sector = sec;
|
||||
door->m_Direction = 0;
|
||||
door->m_Type = DDoor::doorRaise;
|
||||
door->m_Speed = FRACUNIT*2;
|
||||
door->m_TopCountdown = 30 * TICRATE;
|
||||
height = sec->FindHighestFloorPoint (&door->m_BotSpot);
|
||||
door->m_BotDist = sec->ceilingplane.PointToDist (door->m_BotSpot, height);
|
||||
door->m_OldFloorDist = sec->floorplane.d;
|
||||
door->m_TopDist = sec->ceilingplane.d;
|
||||
door->m_LightTag = 0;
|
||||
DDoor *door = new DDoor(sec, DDoor::doorWaitClose, FRACUNIT * 2, 0, 0, 30 * TICRATE);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// Spawn a door that opens after 5 minutes
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void P_SpawnDoorRaiseIn5Mins (sector_t *sec)
|
||||
{
|
||||
new DDoor (sec, DDoor::doorRaiseIn5Mins, 2*FRACUNIT, TICRATE*30/7, 0);
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// animated doors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue