mirror of
https://github.com/Pinsplash/halflife2chaos.git
synced 2024-10-29 23:32:38 +01:00
CBeam logex
This commit is contained in:
parent
4009854389
commit
2ac016513f
@ -33,7 +33,7 @@ public:
|
||||
void Spawn( void );
|
||||
void Precache( void );
|
||||
void Activate( void );
|
||||
|
||||
virtual void LogicExplode();
|
||||
void StrikeThink( void );
|
||||
void UpdateThink( void );
|
||||
void RandomArea( void );
|
||||
@ -760,3 +760,18 @@ void CEnvBeam::BeamUpdateVars( void )
|
||||
SetBeamFlags( FBEAM_SHADEOUT );
|
||||
}
|
||||
}
|
||||
void CEnvBeam::LogicExplode()
|
||||
{
|
||||
int nRandom = RandomInt(0, 2);
|
||||
variant_t variant;
|
||||
switch (nRandom)
|
||||
{
|
||||
//skipped turnon and turnoff
|
||||
case 0:
|
||||
AcceptInput("Toggle", this, this, variant, 0);
|
||||
case 1:
|
||||
AcceptInput("StrikeOnce", this, this, variant, 0);
|
||||
case 2:
|
||||
BaseClass::LogicExplode();
|
||||
}
|
||||
}
|
@ -246,5 +246,16 @@ void CEnvLaser::StrikeThink( void )
|
||||
FireAtPoint( tr );
|
||||
SetNextThink( gpGlobals->curtime );
|
||||
}
|
||||
|
||||
|
||||
void CEnvLaser::LogicExplode()
|
||||
{
|
||||
int nRandom = RandomInt(0, 1);
|
||||
variant_t variant;
|
||||
switch (nRandom)
|
||||
{
|
||||
//skipped turnon and turnoff
|
||||
case 0:
|
||||
AcceptInput("Toggle", this, this, variant, 0);
|
||||
case 1:
|
||||
BaseClass::LogicExplode();
|
||||
}
|
||||
}
|
@ -26,7 +26,7 @@ public:
|
||||
void Spawn( void );
|
||||
void Precache( void );
|
||||
bool KeyValue( const char *szKeyName, const char *szValue );
|
||||
|
||||
virtual void LogicExplode();
|
||||
void TurnOn( void );
|
||||
void TurnOff( void );
|
||||
int IsOn( void );
|
||||
|
@ -1199,3 +1199,30 @@ void CBeam::ComputeBounds( Vector& mins, Vector& maxs )
|
||||
maxs -= vecAbsOrigin;
|
||||
}
|
||||
#endif
|
||||
|
||||
void CBeam::LogicExplode()
|
||||
{
|
||||
int nRandom = RandomInt(0, 6);
|
||||
variant_t variant;
|
||||
switch (nRandom)
|
||||
{
|
||||
case 0:
|
||||
SetWidth(RandomFloat(GetWidth() / 2, GetWidth() * 2));
|
||||
case 1:
|
||||
SetNoise(RandomFloat(GetNoise() / 2, GetNoise() * 2));
|
||||
case 2:
|
||||
variant.SetInt(RandomInt(0, 255));
|
||||
AcceptInput("ColorRedValue", this, this, variant, 0);
|
||||
case 3:
|
||||
variant.SetInt(RandomInt(0, 255));
|
||||
AcceptInput("ColorGreenValue", this, this, variant, 0);
|
||||
case 4:
|
||||
variant.SetInt(RandomInt(0, 255));
|
||||
AcceptInput("ColorBlueValue", this, this, variant, 0);
|
||||
case 5:
|
||||
variant.SetInt(RandomInt(m_fSpeed / 2, m_fSpeed * 2));
|
||||
AcceptInput("ScrollSpeed", this, this, variant, 0);
|
||||
case 6:
|
||||
BaseClass::LogicExplode();
|
||||
}
|
||||
}
|
@ -56,7 +56,7 @@ public:
|
||||
CBeam();
|
||||
|
||||
virtual void SetModel( const char *szModelName );
|
||||
|
||||
virtual void LogicExplode();
|
||||
void Spawn( void );
|
||||
void Precache( void );
|
||||
#if !defined( CLIENT_DLL )
|
||||
|
Loading…
Reference in New Issue
Block a user