mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Initial Mapbase commit (squashed from mapbase-beta)
This commit is contained in:
@@ -86,6 +86,10 @@ void TE_ConcussiveExplosion( IRecipientFilter& filter, float delay,
|
||||
|
||||
//Temp ent for the blast
|
||||
|
||||
#ifdef MAPBASE
|
||||
#define SF_CONCUSSIVEBLAST_REPEATABLE 0x00000001
|
||||
#endif
|
||||
|
||||
class CConcussiveBlast : public CBaseEntity
|
||||
{
|
||||
DECLARE_DATADESC();
|
||||
@@ -94,6 +98,13 @@ public:
|
||||
|
||||
int m_spriteTexture;
|
||||
|
||||
#ifdef MAPBASE
|
||||
float m_flDamage = 200;
|
||||
float m_flRadius = 256;
|
||||
float m_flMagnitude = 1.0;
|
||||
string_t m_iszSoundName;
|
||||
#endif
|
||||
|
||||
CConcussiveBlast( void ) {}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -104,6 +115,11 @@ public:
|
||||
{
|
||||
m_spriteTexture = PrecacheModel( "sprites/lgtning.vmt" );
|
||||
|
||||
#ifdef MAPBASE
|
||||
if (m_iszSoundName != NULL_STRING)
|
||||
PrecacheScriptSound(STRING(m_iszSoundName));
|
||||
#endif
|
||||
|
||||
BaseClass::Precache();
|
||||
}
|
||||
|
||||
@@ -150,10 +166,32 @@ public:
|
||||
);
|
||||
|
||||
//Do the radius damage
|
||||
#ifdef MAPBASE
|
||||
RadiusDamage( CTakeDamageInfo( this, GetOwnerEntity(), m_flDamage, DMG_BLAST|DMG_DISSOLVE ), GetAbsOrigin(), m_flRadius, CLASS_NONE, NULL );
|
||||
#else
|
||||
RadiusDamage( CTakeDamageInfo( this, GetOwnerEntity(), 200, DMG_BLAST|DMG_DISSOLVE ), GetAbsOrigin(), 256, CLASS_NONE, NULL );
|
||||
#endif
|
||||
|
||||
#ifdef MAPBASE
|
||||
if (m_iszSoundName != NULL_STRING)
|
||||
EmitSound(STRING(m_iszSoundName));
|
||||
|
||||
if (!HasSpawnFlags(SF_CONCUSSIVEBLAST_REPEATABLE))
|
||||
#endif
|
||||
UTIL_Remove( this );
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
void InputExplode( inputdata_t &inputdata )
|
||||
{
|
||||
Explode(m_flMagnitude);
|
||||
}
|
||||
|
||||
void InputExplodeWithMagnitude( inputdata_t &inputdata )
|
||||
{
|
||||
Explode(inputdata.value.Int());
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( concussiveblast, CConcussiveBlast );
|
||||
@@ -165,6 +203,16 @@ BEGIN_DATADESC( CConcussiveBlast )
|
||||
|
||||
// DEFINE_FIELD( m_spriteTexture, FIELD_INTEGER ),
|
||||
|
||||
#ifdef MAPBASE
|
||||
DEFINE_KEYFIELD( m_flDamage, FIELD_FLOAT, "damage" ),
|
||||
DEFINE_KEYFIELD( m_flRadius, FIELD_FLOAT, "radius" ),
|
||||
DEFINE_KEYFIELD( m_flMagnitude, FIELD_FLOAT, "magnitude" ),
|
||||
DEFINE_KEYFIELD( m_iszSoundName, FIELD_SOUNDNAME, "soundname" ),
|
||||
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "Explode", InputExplode ),
|
||||
DEFINE_INPUTFUNC( FIELD_INTEGER, "ExplodeWithMagnitude", InputExplodeWithMagnitude ),
|
||||
#endif
|
||||
|
||||
END_DATADESC()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user