Skip to content

Commit 656ec3c

Browse files
authored
Merge branch 'ReactiveDrop:reactivedrop_beta' into maps
2 parents a09e311 + b4362fb commit 656ec3c

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

reactivedrop/fgd/swarm.fgd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3210,7 +3210,7 @@
32103210
soundopenoverride(sound) : "Fully Open Sound" : : "Sound played when the door has finished opening."
32113211
soundcloseoverride(sound) : "Fully Closed Sound" : "ASW_Door.Door2StopClose" : "Sound played when the door has finished closing."
32123212
soundmoveoverride(sound) : "Moving Sound" : "ASW_Door.Door2Open" : "Sound played when the door starts to move."
3213-
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."
3213+
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."
32143214
dmg(integer) : "Damage Inflicted When Blocked" : 0 : "Amount of damage done to entities that block the movement of this door, per frame."
32153215

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

33063306
// Inputs
3307+
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."
33073308
input Open(void) : "Open the door, if it is not fully open."
33083309
input OpenAwayFrom(string) : "Open the door away from the specified entity."
33093310
input Close(void) : "Close the door, if it is not fully closed."

src/game/server/BasePropDoor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ abstract_class CBasePropDoor : public CDynamicProp
173173
void OnEndBlocked( void );
174174

175175
// Input handlers
176+
void InputDelayBeforeClose(inputdata_t &inputdata);
176177
void InputClose(inputdata_t &inputdata);
177178
void InputLock(inputdata_t &inputdata);
178179
void InputOpen(inputdata_t &inputdata);

src/game/server/props.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4008,6 +4008,7 @@ BEGIN_DATADESC(CBasePropDoor)
40084008
DEFINE_FIELD( m_bFirstBlocked, FIELD_BOOLEAN ),
40094009
//DEFINE_FIELD(m_hDoorList, FIELD_CLASSPTR), // Reconstructed
40104010

4011+
DEFINE_INPUTFUNC(FIELD_FLOAT, "DelayBeforeClose", InputDelayBeforeClose),
40114012
DEFINE_INPUTFUNC(FIELD_VOID, "Open", InputOpen),
40124013
DEFINE_INPUTFUNC(FIELD_STRING, "OpenAwayFrom", InputOpenAwayFrom),
40134014
DEFINE_INPUTFUNC(FIELD_VOID, "Close", InputClose),
@@ -4449,6 +4450,15 @@ void CBasePropDoor::OnUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY
44494450
}
44504451
}
44514452

4453+
4454+
//-----------------------------------------------------------------------------
4455+
// Purpose: Sets the door auto-return(auto-close) delay.
4456+
//-----------------------------------------------------------------------------
4457+
void CBasePropDoor::InputDelayBeforeClose( inputdata_t& inputdata )
4458+
{
4459+
m_flAutoReturnDelay = inputdata.value.Float();
4460+
}
4461+
44524462
//-----------------------------------------------------------------------------
44534463
// Purpose: Closes the door if it is not already closed.
44544464
//-----------------------------------------------------------------------------
@@ -4461,7 +4471,6 @@ void CBasePropDoor::InputClose(inputdata_t &inputdata)
44614471
}
44624472
}
44634473

4464-
44654474
//-----------------------------------------------------------------------------
44664475
// Purpose: Input handler that locks the door.
44674476
//-----------------------------------------------------------------------------
@@ -4470,7 +4479,6 @@ void CBasePropDoor::InputLock(inputdata_t &inputdata)
44704479
Lock();
44714480
}
44724481

4473-
44744482
//-----------------------------------------------------------------------------
44754483
// Purpose: Opens the door if it is not already open.
44764484
//-----------------------------------------------------------------------------
@@ -4479,7 +4487,6 @@ void CBasePropDoor::InputOpen(inputdata_t &inputdata)
44794487
OpenIfUnlocked(inputdata.pActivator, NULL);
44804488
}
44814489

4482-
44834490
//-----------------------------------------------------------------------------
44844491
// Purpose: Opens the door away from a specified entity if it is not already open.
44854492
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)