forked from valve/halflife-sdk
Fix usage of SetThink/Touch/Use/Blocked/MoveDone macros
This commit is contained in:
parent
c7e0cc3906
commit
584d1a597e
26 changed files with 238 additions and 238 deletions
|
@ -419,7 +419,7 @@ void CFuncRotating :: Spawn( )
|
|||
UTIL_SetOrigin(pev, pev->origin);
|
||||
SET_MODEL( ENT(pev), STRING(pev->model) );
|
||||
|
||||
SetUse( RotatingUse );
|
||||
SetUse( &CFuncRotating::RotatingUse );
|
||||
// did level designer forget to assign speed?
|
||||
if (pev->speed <= 0)
|
||||
pev->speed = 0;
|
||||
|
@ -431,13 +431,13 @@ void CFuncRotating :: Spawn( )
|
|||
// instant-use brush?
|
||||
if ( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_INSTANT) )
|
||||
{
|
||||
SetThink( SUB_CallUseToggle );
|
||||
SetThink( &CBaseEntity::SUB_CallUseToggle );
|
||||
pev->nextthink = pev->ltime + 1.5; // leave a magic delay for client to start up
|
||||
}
|
||||
// can this brush inflict pain?
|
||||
if ( FBitSet (pev->spawnflags, SF_BRUSH_HURT) )
|
||||
{
|
||||
SetTouch( HurtTouch );
|
||||
SetTouch( &CFuncRotating::HurtTouch );
|
||||
}
|
||||
|
||||
Precache( );
|
||||
|
@ -504,7 +504,7 @@ void CFuncRotating :: Precache( void )
|
|||
// if fan was spinning, and we went through transition or save/restore,
|
||||
// make sure we restart the sound. 1.5 sec delay is magic number. KDB
|
||||
|
||||
SetThink ( SpinUp );
|
||||
SetThink ( &CFuncRotating::SpinUp );
|
||||
pev->nextthink = pev->ltime + 1.5;
|
||||
}
|
||||
}
|
||||
|
@ -600,7 +600,7 @@ void CFuncRotating :: SpinUp( void )
|
|||
EMIT_SOUND_DYN(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseRunning),
|
||||
m_flVolume, m_flAttenuation, SND_CHANGE_PITCH | SND_CHANGE_VOL, FANPITCHMAX);
|
||||
|
||||
SetThink( Rotate );
|
||||
SetThink( &CFuncRotating::Rotate );
|
||||
Rotate();
|
||||
}
|
||||
else
|
||||
|
@ -641,7 +641,7 @@ void CFuncRotating :: SpinDown( void )
|
|||
EMIT_SOUND_DYN(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseRunning /* Stop */),
|
||||
0, 0, SND_STOP, m_pitch);
|
||||
|
||||
SetThink( Rotate );
|
||||
SetThink( &CFuncRotating::Rotate );
|
||||
Rotate();
|
||||
}
|
||||
else
|
||||
|
@ -666,7 +666,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
|
|||
// fan is spinning, so stop it.
|
||||
if ( pev->avelocity != g_vecZero )
|
||||
{
|
||||
SetThink ( SpinDown );
|
||||
SetThink ( &CFuncRotating::SpinDown );
|
||||
//EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, (char *)STRING(pev->noiseStop),
|
||||
// m_flVolume, m_flAttenuation, 0, m_pitch);
|
||||
|
||||
|
@ -674,7 +674,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
|
|||
}
|
||||
else// fan is not moving, so start it
|
||||
{
|
||||
SetThink ( SpinUp );
|
||||
SetThink ( &CFuncRotating::SpinUp );
|
||||
EMIT_SOUND_DYN(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseRunning),
|
||||
0.01, m_flAttenuation, 0, FANPITCHMIN);
|
||||
|
||||
|
@ -686,7 +686,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
|
|||
if ( pev->avelocity != g_vecZero )
|
||||
{
|
||||
// play stopping sound here
|
||||
SetThink ( SpinDown );
|
||||
SetThink ( &CFuncRotating::SpinDown );
|
||||
|
||||
// EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, (char *)STRING(pev->noiseStop),
|
||||
// m_flVolume, m_flAttenuation, 0, m_pitch);
|
||||
|
@ -700,7 +700,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
|
|||
m_flVolume, m_flAttenuation, 0, FANPITCHMAX);
|
||||
pev->avelocity = pev->movedir * pev->speed;
|
||||
|
||||
SetThink( Rotate );
|
||||
SetThink( &CFuncRotating::Rotate );
|
||||
Rotate();
|
||||
}
|
||||
}
|
||||
|
@ -812,15 +812,15 @@ void CPendulum :: Spawn( void )
|
|||
|
||||
if ( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_INSTANT) )
|
||||
{
|
||||
SetThink( SUB_CallUseToggle );
|
||||
SetThink( &CBaseEntity::SUB_CallUseToggle );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
pev->speed = 0;
|
||||
SetUse( PendulumUse );
|
||||
SetUse( &CPendulum::PendulumUse );
|
||||
|
||||
if ( FBitSet( pev->spawnflags, SF_PENDULUM_SWING ) )
|
||||
{
|
||||
SetTouch ( RopeTouch );
|
||||
SetTouch ( &CPendulum::RopeTouch );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -837,7 +837,7 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US
|
|||
|
||||
pev->avelocity = m_maxSpeed * pev->movedir;
|
||||
pev->nextthink = pev->ltime + (delta / m_maxSpeed);
|
||||
SetThink( Stop );
|
||||
SetThink( &CPendulum::Stop );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -850,7 +850,7 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US
|
|||
{
|
||||
pev->nextthink = pev->ltime + 0.1; // Start the pendulum moving
|
||||
m_time = gpGlobals->time; // Save time to calculate dt
|
||||
SetThink( Swing );
|
||||
SetThink( &CPendulum::Swing );
|
||||
m_dampSpeed = m_maxSpeed;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ void CMultiSource::Spawn()
|
|||
pev->movetype = MOVETYPE_NONE;
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
pev->spawnflags |= SF_MULTI_INIT; // Until it's initialized
|
||||
SetThink(Register);
|
||||
SetThink(&CMultiSource::Register);
|
||||
}
|
||||
|
||||
void CMultiSource::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
|
@ -240,7 +240,7 @@ void CMultiSource::Register(void)
|
|||
m_iTotal = 0;
|
||||
memset( m_rgEntities, 0, MS_MAX_TARGETS * sizeof(EHANDLE) );
|
||||
|
||||
SetThink(SUB_DoNothing);
|
||||
SetThink(&CBaseEntity::SUB_DoNothing);
|
||||
|
||||
// search for all entities which target this multisource (pev->targetname)
|
||||
|
||||
|
@ -455,7 +455,7 @@ void CBaseButton::Spawn( )
|
|||
|
||||
if ( FBitSet ( pev->spawnflags, SF_BUTTON_SPARK_IF_OFF ) )// this button should spark in OFF state
|
||||
{
|
||||
SetThink ( ButtonSpark );
|
||||
SetThink ( &CBaseButton::ButtonSpark );
|
||||
pev->nextthink = gpGlobals->time + 0.5;// no hurry, make sure everything else spawns
|
||||
}
|
||||
|
||||
|
@ -495,12 +495,12 @@ void CBaseButton::Spawn( )
|
|||
|
||||
if ( FBitSet ( pev->spawnflags, SF_BUTTON_TOUCH_ONLY ) ) // touchable button
|
||||
{
|
||||
SetTouch( ButtonTouch );
|
||||
SetTouch( &CBaseButton::ButtonTouch );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTouch ( NULL );
|
||||
SetUse ( ButtonUse );
|
||||
SetUse ( &CBaseButton::ButtonUse );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,7 +567,7 @@ void DoSpark(entvars_t *pev, const Vector &location )
|
|||
|
||||
void CBaseButton::ButtonSpark ( void )
|
||||
{
|
||||
SetThink ( ButtonSpark );
|
||||
SetThink ( &CBaseButton::ButtonSpark );
|
||||
pev->nextthink = gpGlobals->time + ( 0.1 + RANDOM_FLOAT ( 0, 1.5 ) );// spark again at random interval
|
||||
|
||||
DoSpark( pev, pev->mins );
|
||||
|
@ -680,7 +680,7 @@ void CBaseButton::ButtonActivate( )
|
|||
ASSERT(m_toggle_state == TS_AT_BOTTOM);
|
||||
m_toggle_state = TS_GOING_UP;
|
||||
|
||||
SetMoveDone( TriggerAndWait );
|
||||
SetMoveDone( &CBaseButton::TriggerAndWait );
|
||||
if (!m_fRotating)
|
||||
LinearMove( m_vecPosition2, pev->speed);
|
||||
else
|
||||
|
@ -709,12 +709,12 @@ void CBaseButton::TriggerAndWait( void )
|
|||
SetTouch ( NULL );
|
||||
}
|
||||
else
|
||||
SetTouch( ButtonTouch );
|
||||
SetTouch( &CBaseButton::ButtonTouch );
|
||||
}
|
||||
else
|
||||
{
|
||||
pev->nextthink = pev->ltime + m_flWait;
|
||||
SetThink( ButtonReturn );
|
||||
SetThink( &CBaseButton::ButtonReturn );
|
||||
}
|
||||
|
||||
pev->frame = 1; // use alternate textures
|
||||
|
@ -732,7 +732,7 @@ void CBaseButton::ButtonReturn( void )
|
|||
ASSERT(m_toggle_state == TS_AT_TOP);
|
||||
m_toggle_state = TS_GOING_DOWN;
|
||||
|
||||
SetMoveDone( ButtonBackHome );
|
||||
SetMoveDone( &CBaseButton::ButtonBackHome );
|
||||
if (!m_fRotating)
|
||||
LinearMove( m_vecPosition1, pev->speed);
|
||||
else
|
||||
|
@ -784,12 +784,12 @@ void CBaseButton::ButtonBackHome( void )
|
|||
SetTouch ( NULL );
|
||||
}
|
||||
else
|
||||
SetTouch( ButtonTouch );
|
||||
SetTouch( &CBaseButton::ButtonTouch );
|
||||
|
||||
// reset think for a sparking button
|
||||
if ( FBitSet ( pev->spawnflags, SF_BUTTON_SPARK_IF_OFF ) )
|
||||
{
|
||||
SetThink ( ButtonSpark );
|
||||
SetThink ( &CBaseButton::ButtonSpark );
|
||||
pev->nextthink = gpGlobals->time + 0.5;// no hurry.
|
||||
}
|
||||
}
|
||||
|
@ -857,10 +857,10 @@ void CRotButton::Spawn( void )
|
|||
if ( !FBitSet ( pev->spawnflags, SF_BUTTON_TOUCH_ONLY ) )
|
||||
{
|
||||
SetTouch ( NULL );
|
||||
SetUse ( ButtonUse );
|
||||
SetUse ( &CBaseButton::ButtonUse );
|
||||
}
|
||||
else // touchable button
|
||||
SetTouch( ButtonTouch );
|
||||
SetTouch( &CBaseButton::ButtonTouch );
|
||||
|
||||
//SetTouch( ButtonTouch );
|
||||
}
|
||||
|
@ -1049,7 +1049,7 @@ void CMomentaryRotButton::UpdateSelf( float value )
|
|||
pev->nextthink += 0.1;
|
||||
|
||||
pev->avelocity = (m_direction * pev->speed) * pev->movedir;
|
||||
SetThink( Off );
|
||||
SetThink( &CMomentaryRotButton::Off );
|
||||
}
|
||||
|
||||
void CMomentaryRotButton::UpdateTarget( float value )
|
||||
|
@ -1077,7 +1077,7 @@ void CMomentaryRotButton::Off( void )
|
|||
m_lastUsed = 0;
|
||||
if ( FBitSet( pev->spawnflags, SF_PENDULUM_AUTO_RETURN ) && m_returnSpeed > 0 )
|
||||
{
|
||||
SetThink( Return );
|
||||
SetThink( &CMomentaryRotButton::Return );
|
||||
pev->nextthink = pev->ltime + 0.1;
|
||||
m_direction = -1;
|
||||
}
|
||||
|
@ -1154,14 +1154,14 @@ void CEnvSpark::Spawn(void)
|
|||
{
|
||||
if (FBitSet(pev->spawnflags, 64)) // Start on
|
||||
{
|
||||
SetThink(SparkThink); // start sparking
|
||||
SetUse(SparkStop); // set up +USE to stop sparking
|
||||
SetThink(&CEnvSpark::SparkThink); // start sparking
|
||||
SetUse(&CEnvSpark::SparkStop); // set up +USE to stop sparking
|
||||
}
|
||||
else
|
||||
SetUse(SparkStart);
|
||||
SetUse(&CEnvSpark::SparkStart);
|
||||
}
|
||||
else
|
||||
SetThink(SparkThink);
|
||||
SetThink(&CEnvSpark::SparkThink);
|
||||
|
||||
pev->nextthink = gpGlobals->time + ( 0.1 + RANDOM_FLOAT ( 0, 1.5 ) );
|
||||
|
||||
|
@ -1208,14 +1208,14 @@ void EXPORT CEnvSpark::SparkThink(void)
|
|||
|
||||
void EXPORT CEnvSpark::SparkStart(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
{
|
||||
SetUse(SparkStop);
|
||||
SetThink(SparkThink);
|
||||
SetUse(&CEnvSpark::SparkStop);
|
||||
SetThink(&CEnvSpark::SparkThink);
|
||||
pev->nextthink = gpGlobals->time + (0.1 + RANDOM_FLOAT ( 0, m_flDelay));
|
||||
}
|
||||
|
||||
void EXPORT CEnvSpark::SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
{
|
||||
SetUse(SparkStart);
|
||||
SetUse(&CEnvSpark::SparkStart);
|
||||
SetThink(NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ void CGib :: SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs
|
|||
pGib->pev->movetype = MOVETYPE_TOSS;
|
||||
pGib->pev->solid = SOLID_BBOX;
|
||||
UTIL_SetSize ( pGib->pev, Vector ( 0, 0 ,0 ), Vector ( 0, 0, 0 ) );
|
||||
pGib->SetTouch ( StickyGibTouch );
|
||||
pGib->SetTouch ( &CGib::StickyGibTouch );
|
||||
pGib->SetThink (NULL);
|
||||
}
|
||||
pGib->LimitVelocity();
|
||||
|
@ -334,7 +334,7 @@ void CBaseMonster :: GibMonster( void )
|
|||
if ( gibbed )
|
||||
{
|
||||
// don't remove players!
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
else
|
||||
|
@ -657,7 +657,7 @@ void CBaseEntity :: SUB_StartFadeOut ( void )
|
|||
pev->avelocity = g_vecZero;
|
||||
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
SetThink ( SUB_FadeOut );
|
||||
SetThink ( &CBaseEntity::SUB_FadeOut );
|
||||
}
|
||||
|
||||
void CBaseEntity :: SUB_FadeOut ( void )
|
||||
|
@ -671,7 +671,7 @@ void CBaseEntity :: SUB_FadeOut ( void )
|
|||
{
|
||||
pev->renderamt = 0;
|
||||
pev->nextthink = gpGlobals->time + 0.2;
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -691,7 +691,7 @@ void CGib :: WaitTillLand ( void )
|
|||
|
||||
if ( pev->velocity == g_vecZero )
|
||||
{
|
||||
SetThink (SUB_StartFadeOut);
|
||||
SetThink (&CBaseEntity::SUB_StartFadeOut);
|
||||
pev->nextthink = gpGlobals->time + m_lifeTime;
|
||||
|
||||
// If you bleed, you stink!
|
||||
|
@ -759,7 +759,7 @@ void CGib :: StickyGibTouch ( CBaseEntity *pOther )
|
|||
Vector vecSpot;
|
||||
TraceResult tr;
|
||||
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time + 10;
|
||||
|
||||
if ( !FClassnameIs( pOther->pev, "worldspawn" ) )
|
||||
|
@ -800,8 +800,8 @@ void CGib :: Spawn( const char *szGibModel )
|
|||
|
||||
pev->nextthink = gpGlobals->time + 4;
|
||||
m_lifeTime = 25;
|
||||
SetThink ( WaitTillLand );
|
||||
SetTouch ( BounceGibTouch );
|
||||
SetThink ( &CGib::WaitTillLand );
|
||||
SetTouch ( &CGib::BounceGibTouch );
|
||||
|
||||
m_material = matNone;
|
||||
m_cBloodDecals = 5;// how many blood decals this gib can place (1 per bounce until none remain).
|
||||
|
|
|
@ -320,7 +320,7 @@ void CBaseDoor::Spawn( )
|
|||
SetTouch ( NULL );
|
||||
}
|
||||
else // touchable button
|
||||
SetTouch( DoorTouch );
|
||||
SetTouch( &CBaseDoor::DoorTouch );
|
||||
}
|
||||
|
||||
|
||||
|
@ -575,7 +575,7 @@ void CBaseDoor::DoorGoUp( void )
|
|||
|
||||
m_toggle_state = TS_GOING_UP;
|
||||
|
||||
SetMoveDone( DoorHitTop );
|
||||
SetMoveDone( &CBaseDoor::DoorHitTop );
|
||||
if ( FClassnameIs(pev, "func_door_rotating")) // !!! BUGBUG Triggered doors don't work with this yet
|
||||
{
|
||||
float sign = 1.0;
|
||||
|
@ -624,13 +624,13 @@ void CBaseDoor::DoorHitTop( void )
|
|||
{
|
||||
// Re-instate touch method, movement is complete
|
||||
if ( !FBitSet ( pev->spawnflags, SF_DOOR_USE_ONLY ) )
|
||||
SetTouch( DoorTouch );
|
||||
SetTouch( &CBaseDoor::DoorTouch );
|
||||
}
|
||||
else
|
||||
{
|
||||
// In flWait seconds, DoorGoDown will fire, unless wait is -1, then door stays open
|
||||
pev->nextthink = pev->ltime + m_flWait;
|
||||
SetThink( DoorGoDown );
|
||||
SetThink( &CBaseDoor::DoorGoDown );
|
||||
|
||||
if ( m_flWait == -1 )
|
||||
{
|
||||
|
@ -659,7 +659,7 @@ void CBaseDoor::DoorGoDown( void )
|
|||
#endif // DOOR_ASSERT
|
||||
m_toggle_state = TS_GOING_DOWN;
|
||||
|
||||
SetMoveDone( DoorHitBottom );
|
||||
SetMoveDone( &CBaseDoor::DoorHitBottom );
|
||||
if ( FClassnameIs(pev, "func_door_rotating"))//rotating door
|
||||
AngularMove( m_vecAngle1, pev->speed);
|
||||
else
|
||||
|
@ -686,7 +686,7 @@ void CBaseDoor::DoorHitBottom( void )
|
|||
SetTouch ( NULL );
|
||||
}
|
||||
else // touchable door
|
||||
SetTouch( DoorTouch );
|
||||
SetTouch( &CBaseDoor::DoorTouch );
|
||||
|
||||
SUB_UseTargets( m_hActivator, USE_TOGGLE, 0 ); // this isn't finished
|
||||
|
||||
|
@ -860,7 +860,7 @@ void CRotDoor::Spawn( void )
|
|||
SetTouch ( NULL );
|
||||
}
|
||||
else // touchable button
|
||||
SetTouch( DoorTouch );
|
||||
SetTouch( &CBaseDoor::DoorTouch );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ void CBubbling::Spawn( void )
|
|||
|
||||
if ( !(pev->spawnflags & SF_BUBBLES_STARTOFF) )
|
||||
{
|
||||
SetThink( FizzThink );
|
||||
SetThink( &CBubbling::FizzThink );
|
||||
pev->nextthink = gpGlobals->time + 2.0;
|
||||
m_state = 1;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ void CBubbling::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
|
|||
|
||||
if ( m_state )
|
||||
{
|
||||
SetThink( FizzThink );
|
||||
SetThink( &CBubbling::FizzThink );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
else
|
||||
|
@ -459,7 +459,7 @@ void CLightning::Spawn( void )
|
|||
{
|
||||
if ( FStringNull( m_iszSpriteName ) )
|
||||
{
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
return;
|
||||
}
|
||||
pev->solid = SOLID_NOT; // Remove model & collisions
|
||||
|
@ -472,7 +472,7 @@ void CLightning::Spawn( void )
|
|||
SetThink( NULL );
|
||||
if ( pev->dmg > 0 )
|
||||
{
|
||||
SetThink( DamageThink );
|
||||
SetThink( &CLightning::DamageThink );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
if ( pev->targetname )
|
||||
|
@ -486,7 +486,7 @@ void CLightning::Spawn( void )
|
|||
else
|
||||
m_active = 1;
|
||||
|
||||
SetUse( ToggleUse );
|
||||
SetUse( &CLightning::ToggleUse );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -494,11 +494,11 @@ void CLightning::Spawn( void )
|
|||
m_active = 0;
|
||||
if ( !FStringNull(pev->targetname) )
|
||||
{
|
||||
SetUse( StrikeUse );
|
||||
SetUse( &CLightning::StrikeUse );
|
||||
}
|
||||
if ( FStringNull(pev->targetname) || FBitSet(pev->spawnflags, SF_BEAM_STARTON) )
|
||||
{
|
||||
SetThink( StrikeThink );
|
||||
SetThink( &CLightning::StrikeThink );
|
||||
pev->nextthink = gpGlobals->time + 1.0;
|
||||
}
|
||||
}
|
||||
|
@ -616,7 +616,7 @@ void CLightning::StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
|
|||
}
|
||||
else
|
||||
{
|
||||
SetThink( StrikeThink );
|
||||
SetThink( &CLightning::StrikeThink );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -961,13 +961,13 @@ void CLaser::Spawn( void )
|
|||
{
|
||||
if ( FStringNull( pev->model ) )
|
||||
{
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
return;
|
||||
}
|
||||
pev->solid = SOLID_NOT; // Remove model & collisions
|
||||
Precache( );
|
||||
|
||||
SetThink( StrikeThink );
|
||||
SetThink( &CLaser::StrikeThink );
|
||||
pev->flags |= FL_CUSTOMENTITY;
|
||||
|
||||
PointsInit( pev->origin, pev->origin );
|
||||
|
@ -1264,7 +1264,7 @@ void CSprite::Expand( float scaleSpeed, float fadeSpeed )
|
|||
{
|
||||
pev->speed = scaleSpeed;
|
||||
pev->health = fadeSpeed;
|
||||
SetThink( ExpandThink );
|
||||
SetThink( &CSprite::ExpandThink );
|
||||
|
||||
pev->nextthink = gpGlobals->time;
|
||||
m_lastTime = gpGlobals->time;
|
||||
|
@ -1319,7 +1319,7 @@ void CSprite::TurnOn( void )
|
|||
pev->effects = 0;
|
||||
if ( (pev->framerate && m_maxFrame > 1.0) || (pev->spawnflags & SF_SPRITE_ONCE) )
|
||||
{
|
||||
SetThink( AnimateThink );
|
||||
SetThink( &CSprite::AnimateThink );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
m_lastTime = gpGlobals->time;
|
||||
}
|
||||
|
@ -1426,7 +1426,7 @@ void CGibShooter::KeyValue( KeyValueData *pkvd )
|
|||
|
||||
void CGibShooter::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
{
|
||||
SetThink( ShootThink );
|
||||
SetThink( &CGibShooter::ShootThink );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
@ -1516,7 +1516,7 @@ void CGibShooter :: ShootThink ( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
}
|
||||
|
@ -1708,7 +1708,7 @@ void CTestEffect::TestThink( void )
|
|||
|
||||
void CTestEffect::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
{
|
||||
SetThink( TestThink );
|
||||
SetThink( &CTestEffect::TestThink );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
m_flStartTime = gpGlobals->time;
|
||||
}
|
||||
|
@ -2129,7 +2129,7 @@ void CEnvFunnel::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
|
|||
|
||||
MESSAGE_END();
|
||||
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
@ -2184,7 +2184,7 @@ void CEnvBeverage::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE
|
|||
pev->frags = 1;
|
||||
pev->health--;
|
||||
|
||||
//SetThink (SUB_Remove);
|
||||
//SetThink (&CBaseEntity::SUB_Remove);
|
||||
//pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
@ -2228,7 +2228,7 @@ void CItemSoda::Spawn( void )
|
|||
SET_MODEL ( ENT(pev), "models/can.mdl" );
|
||||
UTIL_SetSize ( pev, Vector ( 0, 0, 0 ), Vector ( 0, 0, 0 ) );
|
||||
|
||||
SetThink (CanThink);
|
||||
SetThink (&CItemSoda::CanThink);
|
||||
pev->nextthink = gpGlobals->time + 0.5;
|
||||
}
|
||||
|
||||
|
@ -2239,7 +2239,7 @@ void CItemSoda::CanThink ( void )
|
|||
pev->solid = SOLID_TRIGGER;
|
||||
UTIL_SetSize ( pev, Vector ( -8, -8, 0 ), Vector ( 8, 8, 8 ) );
|
||||
SetThink ( NULL );
|
||||
SetTouch ( CanTouch );
|
||||
SetTouch ( &CItemSoda::CanTouch );
|
||||
}
|
||||
|
||||
void CItemSoda::CanTouch ( CBaseEntity *pOther )
|
||||
|
@ -2263,6 +2263,6 @@ void CItemSoda::CanTouch ( CBaseEntity *pOther )
|
|||
pev->movetype = MOVETYPE_NONE;
|
||||
pev->effects = EF_NODRAW;
|
||||
SetTouch ( NULL );
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
inline void AnimateAndDie( float framerate )
|
||||
{
|
||||
SetThink(AnimateUntilDead);
|
||||
SetThink(&CSprite::AnimateUntilDead);
|
||||
pev->framerate = framerate;
|
||||
pev->dmgtime = gpGlobals->time + (m_maxFrame / framerate);
|
||||
pev->nextthink = gpGlobals->time;
|
||||
|
@ -168,7 +168,7 @@ public:
|
|||
|
||||
static CBeam *BeamCreate( const char *pSpriteName, int width );
|
||||
|
||||
inline void LiveForTime( float time ) { SetThink(SUB_Remove); pev->nextthink = gpGlobals->time + time; }
|
||||
inline void LiveForTime( float time ) { SetThink(&CBaseEntity::SUB_Remove); pev->nextthink = gpGlobals->time + time; }
|
||||
inline void BeamDamageInstant( TraceResult *ptr, float damage )
|
||||
{
|
||||
pev->dmg = damage;
|
||||
|
|
|
@ -217,7 +217,7 @@ void CEnvExplosion::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE
|
|||
RadiusDamage ( pev, pev, m_iMagnitude, CLASS_NONE, DMG_BLAST );
|
||||
}
|
||||
|
||||
SetThink( Smoke );
|
||||
SetThink( &CEnvExplosion::Smoke );
|
||||
pev->nextthink = gpGlobals->time + 0.3;
|
||||
|
||||
// draw sparks
|
||||
|
|
|
@ -165,7 +165,7 @@ void CBreakable::Spawn( void )
|
|||
|
||||
SET_MODEL(ENT(pev), STRING(pev->model) );//set size and link into world.
|
||||
|
||||
SetTouch( BreakTouch );
|
||||
SetTouch( &CBreakable::BreakTouch );
|
||||
if ( FBitSet( pev->spawnflags, SF_BREAK_TRIGGER_ONLY ) ) // Only break on trigger
|
||||
SetTouch( NULL );
|
||||
|
||||
|
@ -461,7 +461,7 @@ void CBreakable::BreakTouch( CBaseEntity *pOther )
|
|||
// play creaking sound here.
|
||||
DamageSound();
|
||||
|
||||
SetThink ( Die );
|
||||
SetThink ( &CBreakable::Die );
|
||||
SetTouch( NULL );
|
||||
|
||||
if ( m_flDelay == 0 )
|
||||
|
@ -747,7 +747,7 @@ void CBreakable::Die( void )
|
|||
// Fire targets on break
|
||||
SUB_UseTargets( NULL, USE_TOGGLE, 0 );
|
||||
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = pev->ltime + 0.1;
|
||||
if ( m_iszSpawnObject )
|
||||
CBaseEntity::Create( (char *)STRING(m_iszSpawnObject), VecBModelOrigin(pev), pev->angles, edict() );
|
||||
|
|
|
@ -113,7 +113,7 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType )
|
|||
}
|
||||
|
||||
pev->effects |= EF_NODRAW;
|
||||
SetThink( Smoke );
|
||||
SetThink( &CGrenade::Smoke );
|
||||
pev->velocity = g_vecZero;
|
||||
pev->nextthink = gpGlobals->time + 0.3;
|
||||
|
||||
|
@ -156,7 +156,7 @@ void CGrenade::Killed( entvars_t *pevAttacker, int iGib )
|
|||
// Timed grenade, this think is called when time runs out.
|
||||
void CGrenade::DetonateUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
{
|
||||
SetThink( Detonate );
|
||||
SetThink( &CGrenade::Detonate );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ void CGrenade::PreDetonate( void )
|
|||
{
|
||||
CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin, 400, 0.3 );
|
||||
|
||||
SetThink( Detonate );
|
||||
SetThink( &CGrenade::Detonate );
|
||||
pev->nextthink = gpGlobals->time + 1;
|
||||
}
|
||||
|
||||
|
@ -331,7 +331,7 @@ void CGrenade :: TumbleThink( void )
|
|||
|
||||
if (pev->dmgtime <= gpGlobals->time)
|
||||
{
|
||||
SetThink( Detonate );
|
||||
SetThink( &CGrenade::Detonate );
|
||||
}
|
||||
if (pev->waterlevel != 0)
|
||||
{
|
||||
|
@ -366,14 +366,14 @@ CGrenade *CGrenade::ShootContact( entvars_t *pevOwner, Vector vecStart, Vector v
|
|||
pGrenade->pev->owner = ENT(pevOwner);
|
||||
|
||||
// make monsters afaid of it while in the air
|
||||
pGrenade->SetThink( DangerSoundThink );
|
||||
pGrenade->SetThink( &CGrenade::DangerSoundThink );
|
||||
pGrenade->pev->nextthink = gpGlobals->time;
|
||||
|
||||
// Tumble in air
|
||||
pGrenade->pev->avelocity.x = RANDOM_FLOAT ( -100, -500 );
|
||||
|
||||
// Explode on contact
|
||||
pGrenade->SetTouch( ExplodeTouch );
|
||||
pGrenade->SetTouch( &CGrenade::ExplodeTouch );
|
||||
|
||||
pGrenade->pev->dmg = 50;
|
||||
|
||||
|
@ -390,14 +390,14 @@ CGrenade * CGrenade:: ShootTimed( entvars_t *pevOwner, Vector vecStart, Vector v
|
|||
pGrenade->pev->angles = UTIL_VecToAngles(pGrenade->pev->velocity);
|
||||
pGrenade->pev->owner = ENT(pevOwner);
|
||||
|
||||
pGrenade->SetTouch( BounceTouch ); // Bounce if touched
|
||||
pGrenade->SetTouch( &CGrenade::BounceTouch ); // Bounce if touched
|
||||
|
||||
// Take one second off of the desired detonation time and set the think to PreDetonate. PreDetonate
|
||||
// will insert a DANGER sound into the world sound list and delay detonation for one second so that
|
||||
// the grenade explodes after the exact amount of time specified in the call to ShootTimed().
|
||||
|
||||
pGrenade->pev->dmgtime = gpGlobals->time + time;
|
||||
pGrenade->SetThink( TumbleThink );
|
||||
pGrenade->SetThink( &CGrenade::TumbleThink );
|
||||
pGrenade->pev->nextthink = gpGlobals->time + 0.1;
|
||||
if (time < 0.1)
|
||||
{
|
||||
|
@ -440,9 +440,9 @@ CGrenade * CGrenade :: ShootSatchelCharge( entvars_t *pevOwner, Vector vecStart,
|
|||
pGrenade->pev->owner = ENT(pevOwner);
|
||||
|
||||
// Detonate in "time" seconds
|
||||
pGrenade->SetThink( SUB_DoNothing );
|
||||
pGrenade->SetUse( DetonateUse );
|
||||
pGrenade->SetTouch( SlideTouch );
|
||||
pGrenade->SetThink( &CBaseEntity::SUB_DoNothing );
|
||||
pGrenade->SetUse( &CGrenade::DetonateUse );
|
||||
pGrenade->SetTouch( &CGrenade::SlideTouch );
|
||||
pGrenade->pev->spawnflags = SF_DETONATE;
|
||||
|
||||
pGrenade->pev->friction = 0.9;
|
||||
|
|
|
@ -337,7 +337,7 @@ void CWeaponCycler::Spawn( )
|
|||
|
||||
UTIL_SetOrigin( pev, pev->origin );
|
||||
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
|
||||
SetTouch( DefaultTouch );
|
||||
SetTouch( &CBasePlayerItem::DefaultTouch );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ void CItem::Spawn( void )
|
|||
pev->solid = SOLID_TRIGGER;
|
||||
UTIL_SetOrigin( pev, pev->origin );
|
||||
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
|
||||
SetTouch(ItemTouch);
|
||||
SetTouch(&CItem::ItemTouch);
|
||||
|
||||
if (DROP_TO_FLOOR(ENT(pev)) == 0)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ CBaseEntity* CItem::Respawn( void )
|
|||
|
||||
UTIL_SetOrigin( pev, g_pGameRules->VecItemRespawnSpot( this ) );// blip to whereever you should respawn.
|
||||
|
||||
SetThink ( Materialize );
|
||||
SetThink ( &CItem::Materialize );
|
||||
pev->nextthink = g_pGameRules->FlItemRespawnTime( this );
|
||||
return this;
|
||||
}
|
||||
|
@ -157,6 +157,6 @@ void CItem::Materialize( void )
|
|||
pev->effects |= EF_MUZZLEFLASH;
|
||||
}
|
||||
|
||||
SetTouch( ItemTouch );
|
||||
SetTouch( &CItem::ItemTouch );
|
||||
}
|
||||
|
||||
|
|
|
@ -2011,9 +2011,9 @@ void CBaseMonster :: MonsterInit ( void )
|
|||
// set eye position
|
||||
SetEyePosition();
|
||||
|
||||
SetThink( MonsterInitThink );
|
||||
SetThink( &CBaseMonster::MonsterInitThink );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
SetUse ( MonsterUse );
|
||||
SetUse ( &CBaseMonster::MonsterUse );
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
|
@ -2110,7 +2110,7 @@ void CBaseMonster :: StartMonster ( void )
|
|||
|
||||
// Delay drop to floor to make sure each door in the level has had its chance to spawn
|
||||
// Spread think times so that they don't all happen at the same time (Carmack)
|
||||
SetThink ( CallMonsterThink );
|
||||
SetThink ( &CBaseMonster::CallMonsterThink );
|
||||
pev->nextthink += RANDOM_FLOAT(0.1, 0.4); // spread think times.
|
||||
|
||||
if ( !FStringNull(pev->targetname) )// wait until triggered
|
||||
|
@ -3232,7 +3232,7 @@ void CBaseMonster :: MonsterInitDead( void )
|
|||
|
||||
// Setup health counters, etc.
|
||||
BecomeDead();
|
||||
SetThink( CorpseFallThink );
|
||||
SetThink( &CBaseMonster::CorpseFallThink );
|
||||
pev->nextthink = gpGlobals->time + 0.5;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void CFuncMortarField :: Spawn( void )
|
|||
SET_MODEL(ENT(pev), STRING(pev->model)); // set size and link into world
|
||||
pev->movetype = MOVETYPE_NONE;
|
||||
SetBits( pev->effects, EF_NODRAW );
|
||||
SetUse( FieldUse );
|
||||
SetUse( &CFuncMortarField::FieldUse );
|
||||
Precache();
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ void CMortar::Spawn( )
|
|||
|
||||
pev->dmg = 200;
|
||||
|
||||
SetThink( MortarExplode );
|
||||
SetThink( &CMortar::MortarExplode );
|
||||
pev->nextthink = 0;
|
||||
|
||||
Precache( );
|
||||
|
@ -299,7 +299,7 @@ void CMortar::MortarExplode( void )
|
|||
}
|
||||
*/
|
||||
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1458,12 +1458,12 @@ void CTestHull :: Spawn( entvars_t *pevMasterNode )
|
|||
|
||||
if ( WorldGraph.m_fGraphPresent )
|
||||
{// graph loaded from disk, so we don't need the test hull
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetThink ( DropDelay );
|
||||
SetThink ( &CTestHull::DropDelay );
|
||||
pev->nextthink = gpGlobals->time + 1;
|
||||
}
|
||||
|
||||
|
@ -1483,7 +1483,7 @@ void CTestHull::DropDelay ( void )
|
|||
|
||||
UTIL_SetOrigin ( VARS(pev), WorldGraph.m_pNodes[ 0 ].m_vecOrigin );
|
||||
|
||||
SetThink ( CallBuildNodeGraph );
|
||||
SetThink ( &CTestHull::CallBuildNodeGraph );
|
||||
|
||||
pev->nextthink = gpGlobals->time + 1;
|
||||
}
|
||||
|
@ -1631,7 +1631,7 @@ void CTestHull :: BuildNodeGraph( void )
|
|||
float flDist;
|
||||
int step;
|
||||
|
||||
SetThink ( SUB_Remove );// no matter what happens, the hull gets rid of itself.
|
||||
SetThink ( &CBaseEntity::SUB_Remove );// no matter what happens, the hull gets rid of itself.
|
||||
pev->nextthink = gpGlobals->time;
|
||||
|
||||
// malloc a swollen temporary connection pool that we trim down after we know exactly how many connections there are.
|
||||
|
@ -1743,7 +1743,7 @@ void CTestHull :: BuildNodeGraph( void )
|
|||
{
|
||||
ALERT ( at_aiconsole, "**ConnectVisibleNodes FAILED!\n" );
|
||||
|
||||
SetThink ( ShowBadNode );// send the hull off to show the offending node.
|
||||
SetThink ( &CTestHull::ShowBadNode );// send the hull off to show the offending node.
|
||||
//pev->solid = SOLID_NOT;
|
||||
pev->origin = WorldGraph.m_pNodes[ iBadNode ].m_vecOrigin;
|
||||
|
||||
|
@ -3558,7 +3558,7 @@ void CNodeViewer::Spawn( )
|
|||
ALERT( at_aiconsole, "%d nodes\n", m_nVisited );
|
||||
|
||||
m_iDraw = 0;
|
||||
SetThink( DrawThink );
|
||||
SetThink( &CNodeViewer::DrawThink );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ void CFuncPlat :: Spawn( )
|
|||
{
|
||||
UTIL_SetOrigin (pev, m_vecPosition1);
|
||||
m_toggle_state = TS_AT_TOP;
|
||||
SetUse( PlatUse );
|
||||
SetUse( &CFuncPlat::PlatUse );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -435,7 +435,7 @@ void CFuncPlat :: GoDown( void )
|
|||
|
||||
ASSERT(m_toggle_state == TS_AT_TOP || m_toggle_state == TS_GOING_UP);
|
||||
m_toggle_state = TS_GOING_DOWN;
|
||||
SetMoveDone(CallHitBottom);
|
||||
SetMoveDone(&CFuncPlat::CallHitBottom);
|
||||
LinearMove(m_vecPosition2, pev->speed);
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,7 @@ void CFuncPlat :: GoUp( void )
|
|||
|
||||
ASSERT(m_toggle_state == TS_AT_BOTTOM || m_toggle_state == TS_GOING_DOWN);
|
||||
m_toggle_state = TS_GOING_UP;
|
||||
SetMoveDone(CallHitTop);
|
||||
SetMoveDone(&CFuncPlat::CallHitTop);
|
||||
LinearMove(m_vecPosition1, pev->speed);
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ void CFuncPlat :: HitTop( void )
|
|||
if ( !IsTogglePlat() )
|
||||
{
|
||||
// After a delay, the platform will automatically start going down again.
|
||||
SetThink( CallGoDown );
|
||||
SetThink( &CFuncPlat::CallGoDown );
|
||||
pev->nextthink = pev->ltime + 3;
|
||||
}
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ void CFuncTrain :: Wait( void )
|
|||
STOP_SOUND( edict(), CHAN_STATIC, (char*)STRING(pev->noiseMovement) );
|
||||
if ( pev->noiseStopMoving )
|
||||
EMIT_SOUND (ENT(pev), CHAN_VOICE, (char*)STRING(pev->noiseStopMoving), m_volume, ATTN_NORM);
|
||||
SetThink( Next );
|
||||
SetThink( &CFuncTrain::Next );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -802,7 +802,7 @@ void CFuncTrain :: Next( void )
|
|||
if ( pev->noiseMovement )
|
||||
EMIT_SOUND (ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMovement), m_volume, ATTN_NORM);
|
||||
ClearBits(pev->effects, EF_NOINTERP);
|
||||
SetMoveDone( Wait );
|
||||
SetMoveDone( &CFuncTrain::Wait );
|
||||
LinearMove (pTarg->pev->origin - (pev->mins + pev->maxs)* 0.5, pev->speed);
|
||||
}
|
||||
}
|
||||
|
@ -824,7 +824,7 @@ void CFuncTrain :: Activate( void )
|
|||
if ( FStringNull(pev->targetname) )
|
||||
{ // not triggered, so start immediately
|
||||
pev->nextthink = pev->ltime + 0.1;
|
||||
SetThink( Next );
|
||||
SetThink( &CFuncTrain::Next );
|
||||
}
|
||||
else
|
||||
pev->spawnflags |= SF_TRAIN_WAIT_RETRIGGER;
|
||||
|
@ -920,7 +920,7 @@ void CFuncTrain::OverrideReset( void )
|
|||
}
|
||||
else // Keep moving for 0.1 secs, then find path_corner again and restart
|
||||
{
|
||||
SetThink( Next );
|
||||
SetThink( &CFuncTrain::Next );
|
||||
pev->nextthink = pev->ltime + 0.1;
|
||||
}
|
||||
}
|
||||
|
@ -1262,7 +1262,7 @@ void CFuncTrackTrain :: Next( void )
|
|||
}
|
||||
|
||||
}
|
||||
SetThink( Next );
|
||||
SetThink( &CFuncTrackTrain::Next );
|
||||
NextThink( pev->ltime + time, TRUE );
|
||||
}
|
||||
else // end of path, stop
|
||||
|
@ -1284,7 +1284,7 @@ void CFuncTrackTrain :: Next( void )
|
|||
// no, how long to get there?
|
||||
time = distance / m_oldSpeed;
|
||||
pev->velocity = pev->velocity * (m_oldSpeed / distance);
|
||||
SetThink( DeadEnd );
|
||||
SetThink( &CFuncTrackTrain::DeadEnd );
|
||||
NextThink( pev->ltime + time, FALSE );
|
||||
}
|
||||
else
|
||||
|
@ -1402,7 +1402,7 @@ void CFuncTrackTrain :: Find( void )
|
|||
pev->angles.x = 0;
|
||||
UTIL_SetOrigin( pev, nextPos );
|
||||
NextThink( pev->ltime + 0.1, FALSE );
|
||||
SetThink( Next );
|
||||
SetThink( &CFuncTrackTrain::Next );
|
||||
pev->speed = m_startSpeed;
|
||||
|
||||
UpdateSound();
|
||||
|
@ -1452,7 +1452,7 @@ void CFuncTrackTrain :: NearestPath( void )
|
|||
if ( pev->speed != 0 )
|
||||
{
|
||||
NextThink( pev->ltime + 0.1, FALSE );
|
||||
SetThink( Next );
|
||||
SetThink( &CFuncTrackTrain::Next );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1460,7 +1460,7 @@ void CFuncTrackTrain :: NearestPath( void )
|
|||
void CFuncTrackTrain::OverrideReset( void )
|
||||
{
|
||||
NextThink( pev->ltime + 0.1, FALSE );
|
||||
SetThink( NearestPath );
|
||||
SetThink( &CFuncTrackTrain::NearestPath );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1519,7 +1519,7 @@ void CFuncTrackTrain :: Spawn( void )
|
|||
// start trains on the next frame, to make sure their targets have had
|
||||
// a chance to spawn/activate
|
||||
NextThink( pev->ltime + 0.1, FALSE );
|
||||
SetThink( Find );
|
||||
SetThink( &CFuncTrackTrain::Find );
|
||||
Precache();
|
||||
}
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ void CFuncTrainControls :: Spawn( void )
|
|||
UTIL_SetSize( pev, pev->mins, pev->maxs );
|
||||
UTIL_SetOrigin( pev, pev->origin );
|
||||
|
||||
SetThink( Find );
|
||||
SetThink(&CFuncTrainControls::Find );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
@ -1701,7 +1701,7 @@ void CFuncTrackChange :: Spawn( void )
|
|||
|
||||
EnableUse();
|
||||
pev->nextthink = pev->ltime + 2.0;
|
||||
SetThink( Find );
|
||||
SetThink( &CFuncTrackChange::Find );
|
||||
Precache();
|
||||
}
|
||||
|
||||
|
@ -1752,7 +1752,7 @@ void CFuncTrackChange :: KeyValue( KeyValueData *pkvd )
|
|||
void CFuncTrackChange::OverrideReset( void )
|
||||
{
|
||||
pev->nextthink = pev->ltime + 1.0;
|
||||
SetThink( Find );
|
||||
SetThink( &CFuncTrackChange::Find );
|
||||
}
|
||||
|
||||
void CFuncTrackChange :: Find( void )
|
||||
|
@ -1862,14 +1862,14 @@ void CFuncTrackChange :: GoDown( void )
|
|||
// If ROTMOVE, move & rotate
|
||||
if ( FBitSet( pev->spawnflags, SF_TRACK_DONT_MOVE ) )
|
||||
{
|
||||
SetMoveDone( CallHitBottom );
|
||||
SetMoveDone( &CFuncTrackChange::CallHitBottom );
|
||||
m_toggle_state = TS_GOING_DOWN;
|
||||
AngularMove( m_start, pev->speed );
|
||||
}
|
||||
else
|
||||
{
|
||||
CFuncPlat :: GoDown();
|
||||
SetMoveDone( CallHitBottom );
|
||||
SetMoveDone( &CFuncTrackChange::CallHitBottom );
|
||||
RotMove( m_start, pev->nextthink - pev->ltime );
|
||||
}
|
||||
// Otherwise, rotate first, move second
|
||||
|
@ -1898,14 +1898,14 @@ void CFuncTrackChange :: GoUp( void )
|
|||
if ( FBitSet( pev->spawnflags, SF_TRACK_DONT_MOVE ) )
|
||||
{
|
||||
m_toggle_state = TS_GOING_UP;
|
||||
SetMoveDone( CallHitTop );
|
||||
SetMoveDone( &CFuncTrackChange::CallHitTop );
|
||||
AngularMove( m_end, pev->speed );
|
||||
}
|
||||
else
|
||||
{
|
||||
// If ROTMOVE, move & rotate
|
||||
CFuncPlat :: GoUp();
|
||||
SetMoveDone( CallHitTop );
|
||||
SetMoveDone( &CFuncTrackChange::CallHitTop );
|
||||
RotMove( m_end, pev->nextthink - pev->ltime );
|
||||
}
|
||||
|
||||
|
@ -2160,7 +2160,7 @@ void CGunTarget::Spawn( void )
|
|||
|
||||
if ( pev->spawnflags & FGUNTARGET_START_ON )
|
||||
{
|
||||
SetThink( Start );
|
||||
SetThink( &CGunTarget::Start );
|
||||
pev->nextthink = pev->ltime + 0.3;
|
||||
}
|
||||
}
|
||||
|
@ -2198,7 +2198,7 @@ void CGunTarget::Next( void )
|
|||
Stop();
|
||||
return;
|
||||
}
|
||||
SetMoveDone( Wait );
|
||||
SetMoveDone( &CGunTarget::Wait );
|
||||
LinearMove( pTarget->pev->origin - (pev->mins + pev->maxs) * 0.5, pev->speed );
|
||||
}
|
||||
|
||||
|
@ -2224,7 +2224,7 @@ void CGunTarget::Wait( void )
|
|||
m_flWait = pTarget->GetDelay();
|
||||
|
||||
pev->target = pTarget->pev->target;
|
||||
SetThink( Next );
|
||||
SetThink( &CGunTarget::Next );
|
||||
if (m_flWait != 0)
|
||||
{// -1 wait will wait forever!
|
||||
pev->nextthink = pev->ltime + m_flWait;
|
||||
|
|
|
@ -1049,7 +1049,7 @@ void CBasePlayer::PackDeadPlayerItems( void )
|
|||
pWeaponBox->pev->angles.x = 0 ;// don't let weaponbox tilt.
|
||||
pWeaponBox->pev->angles.z = 0;
|
||||
|
||||
pWeaponBox->SetThink( CWeaponBox::Kill );
|
||||
pWeaponBox->SetThink( &CWeaponBox::Kill );
|
||||
pWeaponBox->pev->nextthink = gpGlobals->time + 120;
|
||||
|
||||
// pWeaponBox->pev->velocity = pev->velocity * 1.2;// weaponbox has player's velocity, then some.
|
||||
|
@ -1187,7 +1187,7 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib )
|
|||
pev->angles.x = 0;
|
||||
pev->angles.z = 0;
|
||||
|
||||
SetThink(PlayerDeathThink);
|
||||
SetThink(&CBasePlayer::PlayerDeathThink);
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -3240,7 +3240,7 @@ void CBloodSplat::Spawn ( entvars_t *pevOwner )
|
|||
pev->angles = pevOwner->v_angle;
|
||||
pev->owner = ENT(pevOwner);
|
||||
|
||||
SetThink ( Spray );
|
||||
SetThink ( &CBloodSplat::Spray );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -3255,7 +3255,7 @@ void CBloodSplat::Spray ( void )
|
|||
|
||||
UTIL_BloodDecalTrace( &tr, BLOOD_COLOR_RED );
|
||||
// }
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -3581,7 +3581,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse )
|
|||
if ( pEntity )
|
||||
{
|
||||
if ( pEntity->pev->takedamage )
|
||||
pEntity->SetThink(SUB_Remove);
|
||||
pEntity->SetThink(&CBaseEntity::SUB_Remove);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -4551,7 +4551,7 @@ void CRevertSaved :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
|
|||
{
|
||||
UTIL_ScreenFadeAll( pev->rendercolor, Duration(), HoldTime(), pev->renderamt, FFADE_OUT );
|
||||
pev->nextthink = gpGlobals->time + MessageTime();
|
||||
SetThink( MessageThink );
|
||||
SetThink( &CRevertSaved::MessageThink );
|
||||
}
|
||||
|
||||
|
||||
|
@ -4562,7 +4562,7 @@ void CRevertSaved :: MessageThink( void )
|
|||
if ( nextThink > 0 )
|
||||
{
|
||||
pev->nextthink = gpGlobals->time + nextThink;
|
||||
SetThink( LoadThink );
|
||||
SetThink( &CRevertSaved::LoadThink );
|
||||
}
|
||||
else
|
||||
LoadThink();
|
||||
|
|
|
@ -339,7 +339,7 @@ public:
|
|||
void SetCustomDecalFrames( int nFrames );
|
||||
int GetCustomDecalFrames( void );
|
||||
|
||||
void CBasePlayer::TabulateAmmo( void );
|
||||
void TabulateAmmo( void );
|
||||
};
|
||||
|
||||
#define AUTOAIM_2DEGREES 0.0348994967025
|
||||
|
|
|
@ -139,7 +139,7 @@ void CCineMonster :: Spawn( void )
|
|||
// if no targetname, start now
|
||||
if ( FStringNull(pev->targetname) || !FStringNull( m_iszIdle ) )
|
||||
{
|
||||
SetThink( CineThink );
|
||||
SetThink( &CCineMonster::CineThink );
|
||||
pev->nextthink = gpGlobals->time + 1.0;
|
||||
// Wait to be used?
|
||||
if ( pev->targetname )
|
||||
|
@ -195,7 +195,7 @@ void CCineMonster :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
|
|||
else
|
||||
{
|
||||
// if not, try finding them
|
||||
SetThink( CineThink );
|
||||
SetThink( &CCineMonster::CineThink );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ void CCineMonster :: Touch( CBaseEntity *pOther )
|
|||
//
|
||||
void CCineMonster :: Die( void )
|
||||
{
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -553,7 +553,7 @@ void CCineMonster :: SequenceDone ( CBaseMonster *pMonster )
|
|||
|
||||
if ( !( pev->spawnflags & SF_SCRIPT_REPEATABLE ) )
|
||||
{
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -819,7 +819,7 @@ BOOL CBaseMonster :: CineCleanup( )
|
|||
SetTouch( NULL );
|
||||
}
|
||||
else
|
||||
SUB_StartFadeOut(); // SetThink( SUB_DoNothing );
|
||||
SUB_StartFadeOut(); // SetThink( &CBaseEntity::SUB_DoNothing );
|
||||
// This turns off animation & physics in case their origin ends up stuck in the world or something
|
||||
StopAnimation();
|
||||
pev->movetype = MOVETYPE_NONE;
|
||||
|
@ -1013,7 +1013,7 @@ void CScriptedSentence :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, US
|
|||
if ( !m_active )
|
||||
return;
|
||||
// ALERT( at_console, "Firing sentence: %s\n", STRING(m_iszSentence) );
|
||||
SetThink( FindThink );
|
||||
SetThink( &CScriptedSentence::FindThink );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ void CScriptedSentence :: Spawn( void )
|
|||
// if no targetname, start now
|
||||
if ( !pev->targetname )
|
||||
{
|
||||
SetThink( FindThink );
|
||||
SetThink( &CScriptedSentence::FindThink );
|
||||
pev->nextthink = gpGlobals->time + 1.0;
|
||||
}
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ void CScriptedSentence :: FindThink( void )
|
|||
StartSentence( pMonster );
|
||||
if ( pev->spawnflags & SF_SENTENCE_ONCE )
|
||||
UTIL_Remove( this );
|
||||
SetThink( DelayThink );
|
||||
SetThink( &CScriptedSentence::DelayThink );
|
||||
pev->nextthink = gpGlobals->time + m_flDuration + m_flRepeat;
|
||||
m_active = FALSE;
|
||||
// ALERT( at_console, "%s: found monster %s\n", STRING(m_iszSentence), STRING(m_iszEntity) );
|
||||
|
@ -1083,7 +1083,7 @@ void CScriptedSentence :: DelayThink( void )
|
|||
m_active = TRUE;
|
||||
if ( !pev->targetname )
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
SetThink( FindThink );
|
||||
SetThink( &CScriptedSentence::FindThink );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1206,7 +1206,7 @@ LINK_ENTITY_TO_CLASS( monster_furniture, CFurniture );
|
|||
//=========================================================
|
||||
void CFurniture :: Die ( void )
|
||||
{
|
||||
SetThink ( SUB_Remove );
|
||||
SetThink ( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ void CAmbientGeneric :: Spawn( void )
|
|||
{
|
||||
ALERT( at_error, "EMPTY AMBIENT AT: %f, %f, %f\n", pev->origin.x, pev->origin.y, pev->origin.z );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
return;
|
||||
}
|
||||
pev->solid = SOLID_NOT;
|
||||
|
@ -202,12 +202,12 @@ void CAmbientGeneric :: Spawn( void )
|
|||
// of ambient sound's pitch or volume. Don't
|
||||
// start thinking yet.
|
||||
|
||||
SetThink(RampThink);
|
||||
SetThink(&CAmbientGeneric::RampThink);
|
||||
pev->nextthink = 0;
|
||||
|
||||
// allow on/off switching via 'use' function.
|
||||
|
||||
SetUse ( ToggleUse );
|
||||
SetUse ( &CAmbientGeneric::ToggleUse );
|
||||
|
||||
m_fActive = FALSE;
|
||||
|
||||
|
@ -1810,19 +1810,19 @@ void CSpeaker :: Spawn( void )
|
|||
{
|
||||
ALERT( at_error, "SPEAKER with no Level/Sentence! at: %f, %f, %f\n", pev->origin.x, pev->origin.y, pev->origin.z );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
return;
|
||||
}
|
||||
pev->solid = SOLID_NOT;
|
||||
pev->movetype = MOVETYPE_NONE;
|
||||
|
||||
|
||||
SetThink(SpeakerThink);
|
||||
SetThink(&CSpeaker::SpeakerThink);
|
||||
pev->nextthink = 0.0;
|
||||
|
||||
// allow on/off switching via 'use' function.
|
||||
|
||||
SetUse ( ToggleUse );
|
||||
SetUse ( &CSpeaker::ToggleUse );
|
||||
|
||||
Precache( );
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ void CBaseDelay :: SUB_UseTargets( CBaseEntity *pActivator, USE_TYPE useType, fl
|
|||
|
||||
pTemp->pev->nextthink = gpGlobals->time + m_flDelay;
|
||||
|
||||
pTemp->SetThink( DelayThink );
|
||||
pTemp->SetThink( &CBaseDelay::DelayThink );
|
||||
|
||||
// Save the useType
|
||||
pTemp->pev->button = (int)useType;
|
||||
|
@ -413,7 +413,7 @@ void CBaseToggle :: LinearMove( Vector vecDest, float flSpeed )
|
|||
|
||||
// set nextthink to trigger a call to LinearMoveDone when dest is reached
|
||||
pev->nextthink = pev->ltime + flTravelTime;
|
||||
SetThink( LinearMoveDone );
|
||||
SetThink( &CBaseToggle::LinearMoveDone );
|
||||
|
||||
// scale the destdelta vector by the time spent traveling to get velocity
|
||||
pev->velocity = vecDestDelta / flTravelTime;
|
||||
|
@ -473,7 +473,7 @@ void CBaseToggle :: AngularMove( Vector vecDestAngle, float flSpeed )
|
|||
|
||||
// set nextthink to trigger a call to AngularMoveDone when dest is reached
|
||||
pev->nextthink = pev->ltime + flTravelTime;
|
||||
SetThink( AngularMoveDone );
|
||||
SetThink( &CBaseToggle::AngularMoveDone );
|
||||
|
||||
// scale the destdelta vector by the time spent traveling to get velocity
|
||||
pev->avelocity = vecDestDelta / flTravelTime;
|
||||
|
|
|
@ -73,7 +73,7 @@ void CFrictionModifier :: Spawn( void )
|
|||
pev->solid = SOLID_TRIGGER;
|
||||
SET_MODEL(ENT(pev), STRING(pev->model)); // set size and link into world
|
||||
pev->movetype = MOVETYPE_NONE;
|
||||
SetTouch( ChangeFriction );
|
||||
SetTouch( &CFrictionModifier::ChangeFriction );
|
||||
}
|
||||
|
||||
|
||||
|
@ -344,8 +344,8 @@ void CMultiManager :: KeyValue( KeyValueData *pkvd )
|
|||
void CMultiManager :: Spawn( void )
|
||||
{
|
||||
pev->solid = SOLID_NOT;
|
||||
SetUse ( ManagerUse );
|
||||
SetThink ( ManagerThink);
|
||||
SetUse ( &CMultiManager::ManagerUse );
|
||||
SetThink ( &CMultiManager::ManagerThink);
|
||||
|
||||
// Sort targets
|
||||
// Quick and dirty bubble sort
|
||||
|
@ -403,7 +403,7 @@ void CMultiManager :: ManagerThink ( void )
|
|||
UTIL_Remove( this );
|
||||
return;
|
||||
}
|
||||
SetUse ( ManagerUse );// allow manager re-use
|
||||
SetUse ( &CMultiManager::ManagerUse );// allow manager re-use
|
||||
}
|
||||
else
|
||||
pev->nextthink = m_startTime + m_flTargetDelay[ m_index ];
|
||||
|
@ -444,7 +444,7 @@ void CMultiManager :: ManagerUse ( CBaseEntity *pActivator, CBaseEntity *pCaller
|
|||
|
||||
SetUse( NULL );// disable use until all targets have fired
|
||||
|
||||
SetThink ( ManagerThink );
|
||||
SetThink ( &CMultiManager::ManagerThink );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
|
||||
|
@ -618,7 +618,7 @@ void CTriggerMonsterJump :: Spawn ( void )
|
|||
{// if targetted, spawn turned off
|
||||
pev->solid = SOLID_NOT;
|
||||
UTIL_SetOrigin( pev, pev->origin ); // Unlink from trigger list
|
||||
SetUse( ToggleUse );
|
||||
SetUse( &CTriggerMonsterJump::ToggleUse );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -808,11 +808,11 @@ void CTargetCDAudio::Play( void )
|
|||
void CTriggerHurt :: Spawn( void )
|
||||
{
|
||||
InitTrigger();
|
||||
SetTouch ( HurtTouch );
|
||||
SetTouch ( &CTriggerHurt::HurtTouch );
|
||||
|
||||
if ( !FStringNull ( pev->targetname ) )
|
||||
{
|
||||
SetUse ( ToggleUse );
|
||||
SetUse ( &CTriggerHurt::ToggleUse );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -821,7 +821,7 @@ void CTriggerHurt :: Spawn( void )
|
|||
|
||||
if (m_bitsDamageInflict & DMG_RADIATION)
|
||||
{
|
||||
SetThink ( RadiationThink );
|
||||
SetThink ( &CTriggerHurt::RadiationThink );
|
||||
pev->nextthink = gpGlobals->time + RANDOM_FLOAT(0.0, 0.5);
|
||||
}
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ void CTriggerMultiple :: Spawn( void )
|
|||
// }
|
||||
// else
|
||||
{
|
||||
SetTouch( MultiTouch );
|
||||
SetTouch( &CTriggerMultiple::MultiTouch );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1168,7 +1168,7 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator )
|
|||
|
||||
if (m_flWait > 0)
|
||||
{
|
||||
SetThink( MultiWaitOver );
|
||||
SetThink( &CBaseTrigger::MultiWaitOver );
|
||||
pev->nextthink = gpGlobals->time + m_flWait;
|
||||
}
|
||||
else
|
||||
|
@ -1177,7 +1177,7 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator )
|
|||
// called while C code is looping through area links...
|
||||
SetTouch( NULL );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseTrigger::SUB_Remove );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1256,7 +1256,7 @@ void CTriggerCounter :: Spawn( void )
|
|||
|
||||
if (m_cTriggersLeft == 0)
|
||||
m_cTriggersLeft = 2;
|
||||
SetUse( CounterUse );
|
||||
SetUse( &CTriggerCounter::CounterUse );
|
||||
}
|
||||
|
||||
// ====================== TRIGGER_CHANGELEVEL ================================
|
||||
|
@ -1401,11 +1401,11 @@ void CChangeLevel :: Spawn( void )
|
|||
|
||||
if (!FStringNull ( pev->targetname ) )
|
||||
{
|
||||
SetUse ( UseChangeLevel );
|
||||
SetUse ( &CChangeLevel::UseChangeLevel );
|
||||
}
|
||||
InitTrigger();
|
||||
if ( !(pev->spawnflags & SF_CHANGELEVEL_USEONLY) )
|
||||
SetTouch( TouchChangeLevel );
|
||||
SetTouch( &CChangeLevel::TouchChangeLevel );
|
||||
// ALERT( at_console, "TRANSITION: %s (%s)\n", m_szMapName, m_szLandmarkName );
|
||||
}
|
||||
|
||||
|
@ -1722,7 +1722,7 @@ void NextLevel( void )
|
|||
|
||||
if (pChange->pev->nextthink < gpGlobals->time)
|
||||
{
|
||||
pChange->SetThink( CChangeLevel::ExecuteChangeLevel );
|
||||
pChange->SetThink( &CChangeLevel::ExecuteChangeLevel );
|
||||
pChange->pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
}
|
||||
|
@ -1806,7 +1806,7 @@ void CTriggerPush :: Spawn( )
|
|||
if ( FBitSet (pev->spawnflags, SF_TRIGGER_PUSH_START_OFF) )// if flagged to Start Turned Off, make trigger nonsolid.
|
||||
pev->solid = SOLID_NOT;
|
||||
|
||||
SetUse( ToggleUse );
|
||||
SetUse( &CTriggerPush::ToggleUse );
|
||||
|
||||
UTIL_SetOrigin( pev, pev->origin ); // Link into the list
|
||||
}
|
||||
|
@ -1924,7 +1924,7 @@ void CTriggerTeleport :: Spawn( void )
|
|||
{
|
||||
InitTrigger();
|
||||
|
||||
SetTouch( TeleportTouch );
|
||||
SetTouch( &CTriggerTeleport::TeleportTouch );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1949,7 +1949,7 @@ void CTriggerSave::Spawn( void )
|
|||
}
|
||||
|
||||
InitTrigger();
|
||||
SetTouch( SaveTouch );
|
||||
SetTouch( &CTriggerSave::SaveTouch );
|
||||
}
|
||||
|
||||
void CTriggerSave::SaveTouch( CBaseEntity *pOther )
|
||||
|
@ -2004,10 +2004,10 @@ void CTriggerEndSection::Spawn( void )
|
|||
|
||||
InitTrigger();
|
||||
|
||||
SetUse ( EndSectionUse );
|
||||
SetUse ( &CTriggerEndSection::EndSectionUse );
|
||||
// If it is a "use only" trigger, then don't set the touch function.
|
||||
if ( ! (pev->spawnflags & SF_ENDSECTION_USEONLY) )
|
||||
SetTouch( EndSectionTouch );
|
||||
SetTouch( &CTriggerEndSection::EndSectionTouch );
|
||||
}
|
||||
|
||||
void CTriggerEndSection::EndSectionTouch( CBaseEntity *pOther )
|
||||
|
@ -2050,7 +2050,7 @@ LINK_ENTITY_TO_CLASS( trigger_gravity, CTriggerGravity );
|
|||
void CTriggerGravity::Spawn( void )
|
||||
{
|
||||
InitTrigger();
|
||||
SetTouch( GravityTouch );
|
||||
SetTouch( &CTriggerGravity::GravityTouch );
|
||||
}
|
||||
|
||||
void CTriggerGravity::GravityTouch( CBaseEntity *pOther )
|
||||
|
@ -2307,7 +2307,7 @@ void CTriggerCamera::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
|
|||
SET_MODEL(ENT(pev), STRING(pActivator->pev->model) );
|
||||
|
||||
// follow the player down
|
||||
SetThink( FollowTarget );
|
||||
SetThink( &CTriggerCamera::FollowTarget );
|
||||
pev->nextthink = gpGlobals->time;
|
||||
|
||||
m_moveDistance = 0;
|
||||
|
|
|
@ -257,7 +257,7 @@ void CBaseTurret::Spawn()
|
|||
pev->takedamage = DAMAGE_AIM;
|
||||
|
||||
SetBits (pev->flags, FL_MONSTER);
|
||||
SetUse( TurretUse );
|
||||
SetUse( &CBaseTurret::TurretUse );
|
||||
|
||||
if (( pev->spawnflags & SF_MONSTER_TURRET_AUTOACTIVATE )
|
||||
&& !( pev->spawnflags & SF_MONSTER_TURRET_STARTINACTIVE ))
|
||||
|
@ -307,7 +307,7 @@ void CTurret::Spawn()
|
|||
m_iMinPitch = -15;
|
||||
UTIL_SetSize(pev, Vector(-32, -32, -m_iRetractHeight), Vector(32, 32, m_iRetractHeight));
|
||||
|
||||
SetThink(Initialize);
|
||||
SetThink(&CBaseTurret::Initialize);
|
||||
|
||||
m_pEyeGlow = CSprite::SpriteCreate( TURRET_GLOW_SPRITE, pev->origin, FALSE );
|
||||
m_pEyeGlow->SetTransparency( kRenderGlow, 255, 0, 0, 0, kRenderFxNoDissipation );
|
||||
|
@ -339,7 +339,7 @@ void CMiniTurret::Spawn()
|
|||
m_iMinPitch = -15;
|
||||
UTIL_SetSize(pev, Vector(-16, -16, -m_iRetractHeight), Vector(16, 16, m_iRetractHeight));
|
||||
|
||||
SetThink(Initialize);
|
||||
SetThink(&CBaseTurret::Initialize);
|
||||
pev->nextthink = gpGlobals->time + 0.3;
|
||||
}
|
||||
|
||||
|
@ -381,11 +381,11 @@ void CBaseTurret::Initialize(void)
|
|||
if (m_iAutoStart)
|
||||
{
|
||||
m_flLastSight = gpGlobals->time + m_flMaxWait;
|
||||
SetThink(AutoSearchThink);
|
||||
SetThink(&CBaseTurret::AutoSearchThink);
|
||||
pev->nextthink = gpGlobals->time + .1;
|
||||
}
|
||||
else
|
||||
SetThink(SUB_DoNothing);
|
||||
SetThink(&CBaseEntity::SUB_DoNothing);
|
||||
}
|
||||
|
||||
void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
|
@ -399,7 +399,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
|
|||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
m_iAutoStart = FALSE;// switching off a turret disables autostart
|
||||
//!!!! this should spin down first!!BUGBUG
|
||||
SetThink(Retire);
|
||||
SetThink(&CBaseTurret::Retire);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -411,7 +411,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
|
|||
m_iAutoStart = TRUE;
|
||||
}
|
||||
|
||||
SetThink(Deploy);
|
||||
SetThink(&CBaseTurret::Deploy);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -472,7 +472,7 @@ void CBaseTurret::ActiveThink(void)
|
|||
{
|
||||
m_hEnemy = NULL;
|
||||
m_flLastSight = gpGlobals->time + m_flMaxWait;
|
||||
SetThink(SearchThink);
|
||||
SetThink(&CBaseTurret::SearchThink);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -489,7 +489,7 @@ void CBaseTurret::ActiveThink(void)
|
|||
{
|
||||
m_hEnemy = NULL;
|
||||
m_flLastSight = gpGlobals->time + m_flMaxWait;
|
||||
SetThink(SearchThink);
|
||||
SetThink(&CBaseTurret::SearchThink);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -518,7 +518,7 @@ void CBaseTurret::ActiveThink(void)
|
|||
{
|
||||
m_hEnemy = NULL;
|
||||
m_flLastSight = gpGlobals->time + m_flMaxWait;
|
||||
SetThink(SearchThink);
|
||||
SetThink(&CBaseTurret::SearchThink);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -683,7 +683,7 @@ void CBaseTurret::Deploy(void)
|
|||
|
||||
SetTurretAnim(TURRET_ANIM_SPIN);
|
||||
pev->framerate = 0;
|
||||
SetThink(SearchThink);
|
||||
SetThink(&CBaseTurret::SearchThink);
|
||||
}
|
||||
|
||||
m_flLastSight = gpGlobals->time + m_flMaxWait;
|
||||
|
@ -723,11 +723,11 @@ void CBaseTurret::Retire(void)
|
|||
UTIL_SetSize(pev, pev->mins, pev->maxs);
|
||||
if (m_iAutoStart)
|
||||
{
|
||||
SetThink(AutoSearchThink);
|
||||
SetThink(&CBaseTurret::AutoSearchThink);
|
||||
pev->nextthink = gpGlobals->time + .1;
|
||||
}
|
||||
else
|
||||
SetThink(SUB_DoNothing);
|
||||
SetThink(&CBaseEntity::SUB_DoNothing);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -759,7 +759,7 @@ void CTurret::SpinUpCall(void)
|
|||
{
|
||||
pev->nextthink = gpGlobals->time + 0.1; // retarget delay
|
||||
EMIT_SOUND(ENT(pev), CHAN_STATIC, "turret/tu_active2.wav", TURRET_MACHINE_VOLUME, ATTN_NORM);
|
||||
SetThink(ActiveThink);
|
||||
SetThink(&CBaseTurret::ActiveThink);
|
||||
m_iStartSpin = 0;
|
||||
m_iSpin = 1;
|
||||
}
|
||||
|
@ -771,7 +771,7 @@ void CTurret::SpinUpCall(void)
|
|||
|
||||
if (m_iSpin)
|
||||
{
|
||||
SetThink(ActiveThink);
|
||||
SetThink(&CBaseTurret::ActiveThink);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -869,7 +869,7 @@ void CBaseTurret::SearchThink(void)
|
|||
{
|
||||
m_flLastSight = 0;
|
||||
m_flSpinUpTime = 0;
|
||||
SetThink(ActiveThink);
|
||||
SetThink(&CBaseTurret::ActiveThink);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -879,7 +879,7 @@ void CBaseTurret::SearchThink(void)
|
|||
//Before we retrace, make sure that we are spun down.
|
||||
m_flLastSight = 0;
|
||||
m_flSpinUpTime = 0;
|
||||
SetThink(Retire);
|
||||
SetThink(&CBaseTurret::Retire);
|
||||
}
|
||||
// should we stop the spin?
|
||||
else if ((m_flSpinUpTime) && (gpGlobals->time > m_flSpinUpTime))
|
||||
|
@ -924,7 +924,7 @@ void CBaseTurret::AutoSearchThink(void)
|
|||
|
||||
if (m_hEnemy != NULL)
|
||||
{
|
||||
SetThink(Deploy);
|
||||
SetThink(&CBaseTurret::Deploy);
|
||||
EMIT_SOUND(ENT(pev), CHAN_BODY, "turret/tu_alert.wav", TURRET_MACHINE_VOLUME, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
@ -1038,7 +1038,7 @@ int CBaseTurret::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, flo
|
|||
ClearBits (pev->flags, FL_MONSTER); // why are they set in the first place???
|
||||
|
||||
SetUse(NULL);
|
||||
SetThink(TurretDeath);
|
||||
SetThink(&CBaseTurret::TurretDeath);
|
||||
SUB_UseTargets( this, USE_ON, 0 ); // wake up others
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
|
||||
|
@ -1050,7 +1050,7 @@ int CBaseTurret::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, flo
|
|||
if (m_iOn && (1 || RANDOM_LONG(0, 0x7FFF) > 800))
|
||||
{
|
||||
m_fBeserk = 1;
|
||||
SetThink(SearchThink);
|
||||
SetThink(&CBaseTurret::SearchThink);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1192,8 +1192,8 @@ void CSentry::Spawn()
|
|||
m_iMinPitch = -60;
|
||||
UTIL_SetSize(pev, Vector(-16, -16, -m_iRetractHeight), Vector(16, 16, m_iRetractHeight));
|
||||
|
||||
SetTouch(SentryTouch);
|
||||
SetThink(Initialize);
|
||||
SetTouch(&CSentry::SentryTouch);
|
||||
SetThink(&CBaseTurret::Initialize);
|
||||
pev->nextthink = gpGlobals->time + 0.3;
|
||||
}
|
||||
|
||||
|
@ -1217,7 +1217,7 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f
|
|||
|
||||
if (!m_iOn)
|
||||
{
|
||||
SetThink( Deploy );
|
||||
SetThink( &CBaseTurret::Deploy );
|
||||
SetUse( NULL );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
@ -1232,7 +1232,7 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f
|
|||
ClearBits (pev->flags, FL_MONSTER); // why are they set in the first place???
|
||||
|
||||
SetUse(NULL);
|
||||
SetThink(SentryDeath);
|
||||
SetThink(&CSentry::SentryDeath);
|
||||
SUB_UseTargets( this, USE_ON, 0 ); // wake up others
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
|
||||
|
|
|
@ -433,8 +433,8 @@ void CBasePlayerItem :: FallInit( void )
|
|||
UTIL_SetOrigin( pev, pev->origin );
|
||||
UTIL_SetSize(pev, Vector( 0, 0, 0), Vector(0, 0, 0) );//pointsize until it lands on the ground.
|
||||
|
||||
SetTouch( DefaultTouch );
|
||||
SetThink( FallThink );
|
||||
SetTouch( &CBasePlayerItem::DefaultTouch );
|
||||
SetThink( &CBasePlayerItem::FallThink );
|
||||
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ void CBasePlayerItem::Materialize( void )
|
|||
pev->solid = SOLID_TRIGGER;
|
||||
|
||||
UTIL_SetOrigin( pev, pev->origin );// link into world.
|
||||
SetTouch (DefaultTouch);
|
||||
SetTouch (&CBasePlayerItem::DefaultTouch);
|
||||
SetThink (NULL);
|
||||
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ CBaseEntity* CBasePlayerItem::Respawn( void )
|
|||
{
|
||||
pNewWeapon->pev->effects |= EF_NODRAW;// invisible for now
|
||||
pNewWeapon->SetTouch( NULL );// no touch
|
||||
pNewWeapon->SetThink( AttemptToMaterialize );
|
||||
pNewWeapon->SetThink( &CBasePlayerItem::AttemptToMaterialize );
|
||||
|
||||
DROP_TO_FLOOR ( ENT(pev) );
|
||||
|
||||
|
@ -675,14 +675,14 @@ int CBasePlayerItem::AddToPlayer( CBasePlayer *pPlayer )
|
|||
void CBasePlayerItem::Drop( void )
|
||||
{
|
||||
SetTouch( NULL );
|
||||
SetThink(SUB_Remove);
|
||||
SetThink(&CBaseEntity::SUB_Remove);
|
||||
pev->nextthink = gpGlobals->time + .1;
|
||||
}
|
||||
|
||||
void CBasePlayerItem::Kill( void )
|
||||
{
|
||||
SetTouch( NULL );
|
||||
SetThink(SUB_Remove);
|
||||
SetThink(&CBaseEntity::SUB_Remove);
|
||||
pev->nextthink = gpGlobals->time + .1;
|
||||
}
|
||||
|
||||
|
@ -977,7 +977,7 @@ void CBasePlayerAmmo::Spawn( void )
|
|||
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
|
||||
UTIL_SetOrigin( pev, pev->origin );
|
||||
|
||||
SetTouch( DefaultTouch );
|
||||
SetTouch( &CBasePlayerAmmo::DefaultTouch );
|
||||
}
|
||||
|
||||
CBaseEntity* CBasePlayerAmmo::Respawn( void )
|
||||
|
@ -987,7 +987,7 @@ CBaseEntity* CBasePlayerAmmo::Respawn( void )
|
|||
|
||||
UTIL_SetOrigin( pev, g_pGameRules->VecAmmoRespawnSpot( this ) );// move to wherever I'm supposed to repawn.
|
||||
|
||||
SetThink( Materialize );
|
||||
SetThink( &CBasePlayerAmmo::Materialize );
|
||||
pev->nextthink = g_pGameRules->FlAmmoRespawnTime( this );
|
||||
|
||||
return this;
|
||||
|
@ -1002,7 +1002,7 @@ void CBasePlayerAmmo::Materialize( void )
|
|||
pev->effects |= EF_MUZZLEFLASH;
|
||||
}
|
||||
|
||||
SetTouch( DefaultTouch );
|
||||
SetTouch( &CBasePlayerAmmo::DefaultTouch );
|
||||
}
|
||||
|
||||
void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
|
||||
|
@ -1021,7 +1021,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
|
|||
else
|
||||
{
|
||||
SetTouch( NULL );
|
||||
SetThink(SUB_Remove);
|
||||
SetThink(&CBaseEntity::SUB_Remove);
|
||||
pev->nextthink = gpGlobals->time + .1;
|
||||
}
|
||||
}
|
||||
|
@ -1029,7 +1029,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
|
|||
{
|
||||
// evil impulse 101 hack, kill always
|
||||
SetTouch( NULL );
|
||||
SetThink(SUB_Remove);
|
||||
SetThink(&CBaseEntity::SUB_Remove);
|
||||
pev->nextthink = gpGlobals->time + .1;
|
||||
}
|
||||
}
|
||||
|
@ -1173,7 +1173,7 @@ void CWeaponBox::Kill( void )
|
|||
|
||||
while ( pWeapon )
|
||||
{
|
||||
pWeapon->SetThink(SUB_Remove);
|
||||
pWeapon->SetThink(&CBaseEntity::SUB_Remove);
|
||||
pWeapon->pev->nextthink = gpGlobals->time + 0.1;
|
||||
pWeapon = pWeapon->m_pNext;
|
||||
}
|
||||
|
|
|
@ -128,15 +128,15 @@ void CDecal :: Spawn( void )
|
|||
|
||||
if ( FStringNull ( pev->targetname ) )
|
||||
{
|
||||
SetThink( StaticDecal );
|
||||
SetThink( &CDecal::StaticDecal );
|
||||
// if there's no targetname, the decal will spray itself on as soon as the world is done spawning.
|
||||
pev->nextthink = gpGlobals->time;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if there IS a targetname, the decal sprays itself on when it is triggered.
|
||||
SetThink ( SUB_DoNothing );
|
||||
SetUse(TriggerDecal);
|
||||
SetThink ( &CBaseEntity::SUB_DoNothing );
|
||||
SetUse(&CDecal::TriggerDecal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ void CDecal :: TriggerDecal ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE
|
|||
WRITE_SHORT( (int)VARS(trace.pHit)->modelindex );
|
||||
MESSAGE_END();
|
||||
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -647,7 +647,7 @@ void CWorld :: Precache( void )
|
|||
CBaseEntity *pEntity = CBaseEntity::Create( "env_message", g_vecZero, g_vecZero, NULL );
|
||||
if ( pEntity )
|
||||
{
|
||||
pEntity->SetThink( SUB_CallUseToggle );
|
||||
pEntity->SetThink( &CBaseEntity::SUB_CallUseToggle );
|
||||
pEntity->pev->message = pev->netname;
|
||||
pev->netname = 0;
|
||||
pEntity->pev->nextthink = gpGlobals->time + 0.3;
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
if( pEnt != NULL && pEnt->IsPlayer() )
|
||||
{
|
||||
if( flDamage > 20 && m_pfnThink == ExpThink )
|
||||
if( flDamage > 20 && m_pfnThink == &CThrownFrag::ExpThink )
|
||||
{
|
||||
SetThink( NULL );
|
||||
ExpDetonate();
|
||||
|
@ -175,7 +175,7 @@ void CMolotov::MolotovTouch(CBaseEntity *pOther)
|
|||
::RadiusDamage(pev->origin,pev,m_pPlayer->pev,110,MOLOTOV_RADIUS*1.25f,CLASS_NONE,DMG_BURN);
|
||||
|
||||
// Radius Damage
|
||||
SetThink(DamageThink);
|
||||
SetThink(&CMolotov::DamageThink);
|
||||
pev->nextthink = gpGlobals->time + 0.25f;
|
||||
|
||||
PLAYBACK_EVENT_FULL(FEV_GLOBAL,
|
||||
|
@ -250,11 +250,11 @@ CMolotov *CMolotov::ShootMolotov(unsigned int usFireEvent,CBasePlayer *pPlayer,V
|
|||
pRetMolotov->pev->avelocity.x = RANDOM_FLOAT(-100,-500);
|
||||
|
||||
// Explode on contact
|
||||
pRetMolotov->SetTouch(MolotovTouch);
|
||||
pRetMolotov->SetTouch(&CMolotov::MolotovTouch);
|
||||
pRetMolotov->pev->dmg = 50;
|
||||
|
||||
// Smoke for us
|
||||
pRetMolotov->SetThink(SmokeThink);
|
||||
pRetMolotov->SetThink(&CMolotov::SmokeThink);
|
||||
pRetMolotov->pev->nextthink = gpGlobals->time + MOLOTOV_SMOKETIME;
|
||||
|
||||
SET_MODEL(ENT(pRetMolotov->pev),"models/w_molotov.mdl");
|
||||
|
@ -416,7 +416,7 @@ void CMolotovCocktail::Holster(int skiplocal)
|
|||
{
|
||||
// Remove this item
|
||||
m_pPlayer->pev->weapons &= ~(1<<WEAPON_MOLOTOVCOCKTAIL);
|
||||
SetThink(DestroyItem);
|
||||
SetThink(&CBasePlayerItem::DestroyItem);
|
||||
pev->nextthink = gpGlobals->time + 0.1f;
|
||||
}
|
||||
|
||||
|
@ -592,7 +592,7 @@ void CTimedExplosiveWeapon::Holster( int skiplocal )
|
|||
{
|
||||
// Remove this item
|
||||
m_pPlayer->pev->weapons &= ~(1<<m_iId);
|
||||
SetThink(DestroyItem);
|
||||
SetThink(&CBasePlayerItem::DestroyItem);
|
||||
pev->nextthink = gpGlobals->time + 0.1f;
|
||||
}
|
||||
|
||||
|
@ -851,8 +851,8 @@ CThrownFrag *CThrownFrag::ThrowExplosive(CThrownFrag *PtrFrag, unsigned int usEv
|
|||
pRetExplosive->pev->angles = UTIL_VecToAngles(pRetExplosive->pev->velocity);
|
||||
pRetExplosive->pev->owner = ENT(pevOwner);
|
||||
|
||||
pRetExplosive->SetTouch(BounceTouch); // Bounce if touched
|
||||
pRetExplosive->SetUse(ExpUse);
|
||||
pRetExplosive->SetTouch(&CThrownFrag::BounceTouch); // Bounce if touched
|
||||
pRetExplosive->SetUse(&CThrownFrag::ExpUse);
|
||||
|
||||
// Take one second off of the desired detonation time and set the think to PreDetonate. PreDetonate
|
||||
// will insert a DANGER sound into the world sound list and delay detonation for one second so that
|
||||
|
@ -860,7 +860,7 @@ CThrownFrag *CThrownFrag::ThrowExplosive(CThrownFrag *PtrFrag, unsigned int usEv
|
|||
|
||||
pRetExplosive->pev->dmgtime = gpGlobals->time + time;
|
||||
|
||||
pRetExplosive->SetThink(ExpThink);
|
||||
pRetExplosive->SetThink(&CThrownFrag::ExpThink);
|
||||
pRetExplosive->pev->nextthink = gpGlobals->time + 0.1;
|
||||
|
||||
if(time < 0.1)
|
||||
|
@ -897,7 +897,7 @@ void CThrownFrag::ExpThink()
|
|||
|
||||
if (pev->dmgtime <= gpGlobals->time)
|
||||
{
|
||||
SetThink( ExpDetonate );
|
||||
SetThink( &CThrownFrag::ExpDetonate );
|
||||
}
|
||||
if (pev->waterlevel != 0)
|
||||
{
|
||||
|
@ -941,7 +941,7 @@ void CThrownFrag::ExpDetonate()
|
|||
RadiusDamage ( pev, pevOwner, pev->dmg, CLASS_NONE, DMG_BLAST );
|
||||
|
||||
pev->effects |= EF_NODRAW;
|
||||
SetThink( SUB_Remove );
|
||||
SetThink( &CBaseEntity::SUB_Remove );
|
||||
pev->velocity = g_vecZero;
|
||||
pev->nextthink = gpGlobals->time + 0.3;
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ void CThrowingWeapon::Holster( int skiplocal )
|
|||
{
|
||||
// Remove this item
|
||||
m_pPlayer->pev->weapons &= ~(1<<m_iId);
|
||||
SetThink(DestroyItem);
|
||||
SetThink(&CBasePlayerItem::DestroyItem);
|
||||
pev->nextthink = gpGlobals->time + 0.1f;
|
||||
}
|
||||
}
|
||||
|
@ -1193,7 +1193,7 @@ CThrownMelee *CThrownMelee::ThrowObject(CBasePlayer *pPlayer,Vector vecOrigin,Ve
|
|||
// Tumble - OMG IM GETTING DIZZY
|
||||
pRetObject->pev->avelocity.x = RANDOM_FLOAT(-1800,-2000);
|
||||
|
||||
pRetObject->SetTouch(ThrownTouch);
|
||||
pRetObject->SetTouch(&CThrownMelee::ThrownTouch);
|
||||
pRetObject->pev->dmg = flDmg;
|
||||
|
||||
SET_MODEL(ENT(pRetObject->pev),pszModel);
|
||||
|
@ -1211,7 +1211,7 @@ void CThrownMelee::ThrownTouch(CBaseEntity *pOther)
|
|||
if(FClassnameIs(pOther->pev,STRING(pev->classname)))
|
||||
{
|
||||
SetTouch(NULL);
|
||||
SetThink(ThrownThink);
|
||||
SetThink(&CThrownMelee::ThrownThink);
|
||||
|
||||
pev->gravity = 1.0f;
|
||||
pev->avelocity.x = 0.0f;
|
||||
|
@ -1258,7 +1258,7 @@ void CThrownMelee::ThrownTouch(CBaseEntity *pOther)
|
|||
else
|
||||
{
|
||||
SetTouch(NULL);
|
||||
SetThink(ThrownThink);
|
||||
SetThink(&CThrownMelee::ThrownThink);
|
||||
|
||||
pev->gravity = 1.0f;
|
||||
pev->nextthink = gpGlobals->time + 0.15f;
|
||||
|
|
Loading…
Reference in a new issue