Added keyvalues for controlling func_rotating min/max sound pitch

This commit is contained in:
Blixibon 2021-03-14 16:33:18 -05:00
parent a1332a442d
commit c66e9c78a0

View File

@ -450,6 +450,11 @@ protected:
bool m_bSolidBsp; // Brush is SOLID_BSP
#ifdef MAPBASE
int m_iMinPitch = 30; // FANPITCHMIN
int m_iMaxPitch = 100; // FANPITCHMAX
#endif
public:
Vector m_vecClientOrigin;
QAngle m_vecClientAngles;
@ -472,6 +477,10 @@ BEGIN_DATADESC( CFuncRotating )
DEFINE_FIELD( m_angStart, FIELD_VECTOR ),
DEFINE_FIELD( m_bStopAtStartPos, FIELD_BOOLEAN ),
DEFINE_KEYFIELD( m_bSolidBsp, FIELD_BOOLEAN, "solidbsp" ),
#ifdef MAPBASE
DEFINE_KEYFIELD( m_iMinPitch, FIELD_INTEGER, "minpitch" ),
DEFINE_KEYFIELD( m_iMaxPitch, FIELD_INTEGER, "maxpitch" ),
#endif
// Function Pointers
DEFINE_FUNCTION( SpinUpMove ),
@ -823,8 +832,14 @@ void CFuncRotating::HurtTouch ( CBaseEntity *pOther )
}
#ifdef MAPBASE
// In Mapbase, use the keyvalues instead
#define FANPITCHMIN m_iMinPitch
#define FANPITCHMAX m_iMaxPitch
#else
#define FANPITCHMIN 30
#define FANPITCHMAX 100
#endif
//-----------------------------------------------------------------------------