|
|
|
@ -99,7 +99,7 @@ void CTripSnarkGrenade :: Spawn( void )
@@ -99,7 +99,7 @@ void CTripSnarkGrenade :: Spawn( void )
|
|
|
|
|
m_flPowerUp = gpGlobals->time + 2.5; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SetThink( PowerupThink ); |
|
|
|
|
SetThink( &CTripSnarkGrenade::PowerupThink ); |
|
|
|
|
pev->nextthink = gpGlobals->time + 0.2; |
|
|
|
|
|
|
|
|
|
pev->takedamage = DAMAGE_YES; |
|
|
|
@ -140,7 +140,7 @@ void CTripSnarkGrenade :: WarningThink( void )
@@ -140,7 +140,7 @@ void CTripSnarkGrenade :: WarningThink( void )
|
|
|
|
|
// EMIT_SOUND( ENT(pev), CHAN_VOICE, "buttons/Blip2.wav", 1.0, ATTN_NORM );
|
|
|
|
|
|
|
|
|
|
// set to power up
|
|
|
|
|
SetThink( PowerupThink ); |
|
|
|
|
SetThink( &CTripSnarkGrenade::PowerupThink ); |
|
|
|
|
pev->nextthink = gpGlobals->time + 1.0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -173,7 +173,7 @@ void CTripSnarkGrenade :: PowerupThink( void )
@@ -173,7 +173,7 @@ void CTripSnarkGrenade :: PowerupThink( void )
|
|
|
|
|
{ |
|
|
|
|
STOP_SOUND( ENT(pev), CHAN_VOICE, "weapons/mine_deploy.wav" ); |
|
|
|
|
STOP_SOUND( ENT(pev), CHAN_BODY, "weapons/mine_charge.wav" ); |
|
|
|
|
SetThink( SUB_Remove ); |
|
|
|
|
SetThink( &CBaseEntity::SUB_Remove ); |
|
|
|
|
pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
|
ALERT( at_console, "WARNING:Tripmine at %.0f, %.0f, %.0f removed\n", pev->origin.x, pev->origin.y, pev->origin.z ); |
|
|
|
|
KillBeam(); |
|
|
|
@ -187,7 +187,7 @@ void CTripSnarkGrenade :: PowerupThink( void )
@@ -187,7 +187,7 @@ void CTripSnarkGrenade :: PowerupThink( void )
|
|
|
|
|
STOP_SOUND( ENT(pev), CHAN_BODY, "weapons/mine_charge.wav" ); |
|
|
|
|
CBaseEntity *pMine = Create( "weapon_snark", pev->origin + m_vecDir * 24, pev->angles ); |
|
|
|
|
pMine->pev->spawnflags |= SF_NORESPAWN; |
|
|
|
|
SetThink( SUB_Remove ); |
|
|
|
|
SetThink( &CBaseEntity::SUB_Remove ); |
|
|
|
|
KillBeam(); |
|
|
|
|
pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
|
return; |
|
|
|
@ -238,7 +238,7 @@ void CTripSnarkGrenade :: MakeBeam( void )
@@ -238,7 +238,7 @@ void CTripSnarkGrenade :: MakeBeam( void )
|
|
|
|
|
m_flBeamLength = tr.flFraction; |
|
|
|
|
|
|
|
|
|
// set to follow laser spot
|
|
|
|
|
SetThink( BeamBreakThink ); |
|
|
|
|
SetThink( &CTripSnarkGrenade::BeamBreakThink ); |
|
|
|
|
pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
|
|
|
|
|
|
Vector vecTmpEnd = pev->origin + m_vecDir * 2048 * m_flBeamLength; |
|
|
|
@ -318,7 +318,7 @@ int CTripSnarkGrenade :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAtta
@@ -318,7 +318,7 @@ int CTripSnarkGrenade :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAtta
|
|
|
|
|
{ |
|
|
|
|
// disable
|
|
|
|
|
// Create( "weapon_tripsnark", pev->origin + m_vecDir * 24, pev->angles );
|
|
|
|
|
SetThink( SUB_Remove ); |
|
|
|
|
SetThink( &CBaseEntity::SUB_Remove ); |
|
|
|
|
pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
|
KillBeam(); |
|
|
|
|
return FALSE; |
|
|
|
@ -336,7 +336,7 @@ void CTripSnarkGrenade::Killed( entvars_t *pevAttacker, int iGib )
@@ -336,7 +336,7 @@ void CTripSnarkGrenade::Killed( entvars_t *pevAttacker, int iGib )
|
|
|
|
|
pev->owner = ENT( pevAttacker ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SetThink( DelayDeathThink ); |
|
|
|
|
SetThink( &CTripSnarkGrenade::DelayDeathThink ); |
|
|
|
|
pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1, 0.3 ); |
|
|
|
|
|
|
|
|
|
EMIT_SOUND( ENT(pev), CHAN_BODY, "common/null.wav", 0.5, ATTN_NORM ); // shut off chargeup
|
|
|
|
@ -380,7 +380,7 @@ void CTripSnarkGrenade::Explode( TraceResult *pTrace )
@@ -380,7 +380,7 @@ void CTripSnarkGrenade::Explode( TraceResult *pTrace )
|
|
|
|
|
pSqueak->pev->velocity = m_vecDir * 200; |
|
|
|
|
|
|
|
|
|
// Tell the mine what do do for the next little while.
|
|
|
|
|
SetThink( RiftThink ); |
|
|
|
|
SetThink( &CTripSnarkGrenade::RiftThink ); |
|
|
|
|
pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
|
m_RiftTime = gpGlobals->time + 3; |
|
|
|
|
} |
|
|
|
@ -521,4 +521,4 @@ void DeactivateSnarkTrips( CBasePlayer *pOwner )
@@ -521,4 +521,4 @@ void DeactivateSnarkTrips( CBasePlayer *pOwner )
|
|
|
|
|
|
|
|
|
|
pFind = FIND_ENTITY_BY_CLASSNAME( pFind, "monster_tripsnark" ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|