Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion reactivedrop/fgd/swarm.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -3210,7 +3210,7 @@
soundopenoverride(sound) : "Fully Open Sound" : : "Sound played when the door has finished opening."
soundcloseoverride(sound) : "Fully Closed Sound" : "ASW_Door.Door2StopClose" : "Sound played when the door has finished closing."
soundmoveoverride(sound) : "Moving Sound" : "ASW_Door.Door2Open" : "Sound played when the door starts to move."
returndelay(integer) : "Delay Before close (-1 stay open)" : 5 : "Amount of time, in seconds, after the door has opened before it closes. If the value is set to -1, the door never closes itself."
returndelay(integer) : "Delay Before Close (-1 stay open)" : 5 : "Amount of time, in seconds, after the door has opened before it closes. If the value is set to -1, the door never closes itself."
dmg(integer) : "Damage Inflicted When Blocked" : 0 : "Amount of damage done to entities that block the movement of this door, per frame."

//soundlockedoverride(sound) : "Locked Sound" : : "Sound played when the player tries to open the door, and fails because it's locked."
Expand Down Expand Up @@ -3304,6 +3304,7 @@
output OnDestroyed(void) : "Fired when the door is knocked down."

// Inputs
input DelayBeforeClose(float) : "Amount of time, in seconds, after the door has opened before it closes. If the value is set to -1, the door never closes itself."
input Open(void) : "Open the door, if it is not fully open."
input OpenAwayFrom(string) : "Open the door away from the specified entity."
input Close(void) : "Close the door, if it is not fully closed."
Expand Down
1 change: 1 addition & 0 deletions src/game/server/BasePropDoor.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ abstract_class CBasePropDoor : public CDynamicProp
void OnEndBlocked( void );

// Input handlers
void InputDelayBeforeClose(inputdata_t &inputdata);
void InputClose(inputdata_t &inputdata);
void InputLock(inputdata_t &inputdata);
void InputOpen(inputdata_t &inputdata);
Expand Down
13 changes: 10 additions & 3 deletions src/game/server/props.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4008,6 +4008,7 @@ BEGIN_DATADESC(CBasePropDoor)
DEFINE_FIELD( m_bFirstBlocked, FIELD_BOOLEAN ),
//DEFINE_FIELD(m_hDoorList, FIELD_CLASSPTR), // Reconstructed

DEFINE_INPUTFUNC(FIELD_FLOAT, "DelayBeforeClose", InputDelayBeforeClose),
DEFINE_INPUTFUNC(FIELD_VOID, "Open", InputOpen),
DEFINE_INPUTFUNC(FIELD_STRING, "OpenAwayFrom", InputOpenAwayFrom),
DEFINE_INPUTFUNC(FIELD_VOID, "Close", InputClose),
Expand Down Expand Up @@ -4449,6 +4450,15 @@ void CBasePropDoor::OnUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY
}
}


//-----------------------------------------------------------------------------
// Purpose: Sets the door auto-return(auto-close) delay.
//-----------------------------------------------------------------------------
void CBasePropDoor::InputDelayBeforeClose( inputdata_t& inputdata )
{
m_flAutoReturnDelay = inputdata.value.Float();
}

//-----------------------------------------------------------------------------
// Purpose: Closes the door if it is not already closed.
//-----------------------------------------------------------------------------
Expand All @@ -4461,7 +4471,6 @@ void CBasePropDoor::InputClose(inputdata_t &inputdata)
}
}


//-----------------------------------------------------------------------------
// Purpose: Input handler that locks the door.
//-----------------------------------------------------------------------------
Expand All @@ -4470,7 +4479,6 @@ void CBasePropDoor::InputLock(inputdata_t &inputdata)
Lock();
}


//-----------------------------------------------------------------------------
// Purpose: Opens the door if it is not already open.
//-----------------------------------------------------------------------------
Expand All @@ -4479,7 +4487,6 @@ void CBasePropDoor::InputOpen(inputdata_t &inputdata)
OpenIfUnlocked(inputdata.pActivator, NULL);
}


//-----------------------------------------------------------------------------
// Purpose: Opens the door away from a specified entity if it is not already open.
//-----------------------------------------------------------------------------
Expand Down