Browse Source

Add sed script and convert all SetXXX macros

foolsday
mittorn 9 years ago
parent
commit
81207e3815
  1. 4
      .gitigonre
  2. 2
      dlls/AI_BaseNPC_Schedule.cpp
  3. 18
      dlls/aflock.cpp
  4. 4
      dlls/airtank.cpp
  5. 26
      dlls/apache.cpp
  6. 6
      dlls/barnacle.cpp
  7. 4
      dlls/barney.cpp
  8. 2
      dlls/bigmomma.cpp
  9. 36
      dlls/bmodels.cpp
  10. 4
      dlls/bullsquid.cpp
  11. 70
      dlls/buttons.cpp
  12. 10
      dlls/cbase.h
  13. 20
      dlls/combat.cpp
  14. 14
      dlls/controller.cpp
  15. 12
      dlls/crossbow.cpp
  16. 4
      dlls/crowbar.cpp
  17. 26
      dlls/doors.cpp
  18. 58
      dlls/effects.cpp
  19. 4
      dlls/effects.h
  20. 2
      dlls/explode.cpp
  21. 14
      dlls/func_break.cpp
  22. 8
      dlls/gargantua.cpp
  23. 22
      dlls/ggrenade.cpp
  24. 8
      dlls/h_battery.cpp
  25. 10
      dlls/h_cine.cpp
  26. 2
      dlls/h_cycler.cpp
  27. 2
      dlls/handgrenade.cpp
  28. 6
      dlls/headcrab.cpp
  29. 8
      dlls/healthkit.cpp
  30. 4
      dlls/hgrunt.cpp
  31. 18
      dlls/hornet.cpp
  32. 2
      dlls/hornetgun.cpp
  33. 4
      dlls/ichthyosaur.cpp
  34. 10
      dlls/items.cpp
  35. 10
      dlls/leech.cpp
  36. 18
      dlls/monstermaker.cpp
  37. 10
      dlls/monsters.cpp
  38. 6
      dlls/mortar.cpp
  39. 4
      dlls/mpstubb.cpp
  40. 38
      dlls/nihilanth.cpp
  41. 12
      dlls/nodes.cpp
  42. 20
      dlls/osprey.cpp
  43. 2
      dlls/pathcorner.cpp
  44. 62
      dlls/plats.cpp
  45. 16
      dlls/player.cpp
  46. 24
      dlls/prop.cpp
  47. 5
      dlls/replace.sh
  48. 12
      dlls/rpg.cpp
  49. 8
      dlls/satchel.cpp
  50. 2
      dlls/schedule.cpp
  51. 6
      dlls/scientist.cpp
  52. 28
      dlls/scripted.cpp
  53. 12
      dlls/sound.cpp
  54. 12
      dlls/squeakgrenade.cpp
  55. 6
      dlls/subs.cpp
  56. 2
      dlls/talkmonster.cpp
  57. 14
      dlls/tentacle.cpp
  58. 66
      dlls/triggers.cpp
  59. 16
      dlls/tripmine.cpp
  60. 58
      dlls/turret.cpp
  61. 48
      dlls/weapons.cpp
  62. 10
      dlls/world.cpp

4
.gitigonre

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
# Binaries
*.o
*.so
*/*.o
*/*/*.o
*.a
*.framework
*.exe

2
dlls/AI_BaseNPC_Schedule.cpp

@ -454,7 +454,7 @@ void CBaseMonster :: RunTask ( Task_t *pTask ) @@ -454,7 +454,7 @@ void CBaseMonster :: RunTask ( Task_t *pTask )
{
pev->deadflag = DEAD_DEAD;
ResetThink();
SetThink( NULL );
StopAnimation();
if ( !BBoxFlat() )

18
dlls/aflock.cpp

@ -211,7 +211,7 @@ void CFlockingFlyerFlock :: SpawnFlock( void ) @@ -211,7 +211,7 @@ void CFlockingFlyerFlock :: SpawnFlock( void )
pBoid->pev->frame = 0;
pBoid->pev->nextthink = gpGlobals->time + 0.2;
pBoid->SetThink( CFlockingFlyer :: IdleThink );
pBoid->SetThink( &CFlockingFlyer :: IdleThink );
if ( pBoid != pLeader )
{
@ -229,7 +229,7 @@ void CFlockingFlyer :: Spawn( ) @@ -229,7 +229,7 @@ void CFlockingFlyer :: Spawn( )
pev->frame = 0;
pev->nextthink = gpGlobals->time + 0.1;
SetThink( IdleThink );
SetThink( &IdleThink );
}
//=========================================================
@ -292,7 +292,7 @@ void CFlockingFlyer :: Killed( entvars_t *pevAttacker, int iGib ) @@ -292,7 +292,7 @@ void CFlockingFlyer :: Killed( entvars_t *pevAttacker, int iGib )
UTIL_SetSize( pev, Vector(0,0,0), Vector(0,0,0) );
pev->movetype = MOVETYPE_TOSS;
SetThink ( FallHack );
SetThink( &FallHack );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -308,7 +308,7 @@ void CFlockingFlyer :: FallHack( void ) @@ -308,7 +308,7 @@ void CFlockingFlyer :: FallHack( void )
else
{
pev->velocity = g_vecZero;
ResetThink();
SetThink( NULL );
}
}
}
@ -366,7 +366,7 @@ void CFlockingFlyer :: IdleThink( void ) @@ -366,7 +366,7 @@ void CFlockingFlyer :: IdleThink( void )
// see if there's a client in the same pvs as the monster
if ( !FNullEnt( FIND_CLIENT_IN_PVS( edict() ) ) )
{
SetThink( Start );
SetThink( &Start );
pev->nextthink = gpGlobals->time + 0.1;
}
}
@ -380,11 +380,11 @@ void CFlockingFlyer :: Start( void ) @@ -380,11 +380,11 @@ void CFlockingFlyer :: Start( void )
if ( IsLeader() )
{
SetThink( FlockLeaderThink );
SetThink( &FlockLeaderThink );
}
else
{
SetThink( FlockFollowerThink );
SetThink( &FlockFollowerThink );
}
/*
@ -438,7 +438,7 @@ void CFlockingFlyer :: FormFlock( void ) @@ -438,7 +438,7 @@ void CFlockingFlyer :: FormFlock( void )
}
}
SetThink( IdleThink );// now that flock is formed, go to idle and wait for a player to come along.
SetThink( &IdleThink );// now that flock is formed, go to idle and wait for a player to come along.
pev->nextthink = gpGlobals->time;
}
@ -673,7 +673,7 @@ void CFlockingFlyer :: FlockFollowerThink( void ) @@ -673,7 +673,7 @@ void CFlockingFlyer :: FlockFollowerThink( void )
if ( IsLeader() || !InSquad() )
{
// the leader has been killed and this flyer suddenly finds himself the leader.
SetThink ( FlockLeaderThink );
SetThink( &FlockLeaderThink );
return;
}

4
dlls/airtank.cpp

@ -58,8 +58,8 @@ void CAirtank :: Spawn( void ) @@ -58,8 +58,8 @@ void CAirtank :: Spawn( void )
UTIL_SetSize(pev, Vector( -16, -16, 0), Vector(16, 16, 36));
UTIL_SetOrigin( pev, pev->origin );
SetTouch( TankTouch );
SetThink( TankThink );
SetTouch( &TankTouch );
SetThink( &TankThink );
pev->flags |= FL_MONSTER;
pev->takedamage = DAMAGE_YES;

26
dlls/apache.cpp

@ -139,12 +139,12 @@ void CApache :: Spawn( void ) @@ -139,12 +139,12 @@ void CApache :: Spawn( void )
if (pev->spawnflags & SF_WAITFORTRIGGER)
{
SetUse( StartupUse );
SetUse( &StartupUse );
}
else
{
SetThink( HuntThink );
SetTouch( FlyTouch );
SetThink( &HuntThink );
SetTouch( &FlyTouch );
pev->nextthink = gpGlobals->time + 1.0;
}
@ -186,10 +186,10 @@ void CApache::NullThink( void ) @@ -186,10 +186,10 @@ void CApache::NullThink( void )
void CApache::StartupUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetThink( HuntThink );
SetTouch( FlyTouch );
SetThink( &HuntThink );
SetTouch( &FlyTouch );
pev->nextthink = gpGlobals->time + 0.1;
ResetUse();
SetUse( NULL );
}
void CApache :: Killed( entvars_t *pevAttacker, int iGib )
@ -200,8 +200,8 @@ void CApache :: Killed( entvars_t *pevAttacker, int iGib ) @@ -200,8 +200,8 @@ void CApache :: Killed( entvars_t *pevAttacker, int iGib )
STOP_SOUND( ENT(pev), CHAN_STATIC, "apache/ap_rotor2.wav" );
UTIL_SetSize( pev, Vector( -32, -32, -64), Vector( 32, 32, 0) );
SetThink( DyingThink );
SetTouch( CrashTouch );
SetThink( &DyingThink );
SetTouch( &CrashTouch );
pev->nextthink = gpGlobals->time + 0.1;
pev->health = 0;
pev->takedamage = DAMAGE_NO;
@ -402,7 +402,7 @@ void CApache :: DyingThink( void ) @@ -402,7 +402,7 @@ void CApache :: DyingThink( void )
WRITE_BYTE( BREAK_METAL );
MESSAGE_END();
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
}
}
@ -426,7 +426,7 @@ void CApache::CrashTouch( CBaseEntity *pOther ) @@ -426,7 +426,7 @@ void CApache::CrashTouch( CBaseEntity *pOther )
// only crash if we hit something solid
if ( pOther->pev->solid == SOLID_BSP)
{
ResetTouch();
SetTouch( NULL );
m_flNextRocket = gpGlobals->time;
pev->nextthink = gpGlobals->time;
}
@ -972,8 +972,8 @@ void CApacheHVR :: Spawn( void ) @@ -972,8 +972,8 @@ void CApacheHVR :: Spawn( void )
UTIL_SetSize(pev, Vector( 0, 0, 0), Vector(0, 0, 0));
UTIL_SetOrigin( pev, pev->origin );
SetThink( IgniteThink );
SetTouch( ExplodeTouch );
SetThink( &IgniteThink );
SetTouch( &ExplodeTouch );
UTIL_MakeAimVectors( pev->angles );
m_vecForward = gpGlobals->v_forward;
@ -1019,7 +1019,7 @@ void CApacheHVR :: IgniteThink( void ) @@ -1019,7 +1019,7 @@ void CApacheHVR :: IgniteThink( void )
MESSAGE_END(); // move PHS/PVS data sending into here (SEND_ALL, SEND_PVS, SEND_PHS)
// set to accelerate
SetThink( AccelerateThink );
SetThink( &AccelerateThink );
pev->nextthink = gpGlobals->time + 0.1;
}

6
dlls/barnacle.cpp

@ -137,7 +137,7 @@ void CBarnacle :: Spawn() @@ -137,7 +137,7 @@ void CBarnacle :: Spawn()
SetActivity ( ACT_IDLE );
SetThink ( BarnacleThink );
SetThink( &BarnacleThink );
pev->nextthink = gpGlobals->time + 0.5;
UTIL_SetOrigin ( pev, pev->origin );
@ -370,7 +370,7 @@ void CBarnacle :: Killed( entvars_t *pevAttacker, int iGib ) @@ -370,7 +370,7 @@ void CBarnacle :: Killed( entvars_t *pevAttacker, int iGib )
StudioFrameAdvance( 0.1 );
pev->nextthink = gpGlobals->time + 0.1;
SetThink ( WaitTillDead );
SetThink( &WaitTillDead );
}
//=========================================================
@ -386,7 +386,7 @@ void CBarnacle :: WaitTillDead ( void ) @@ -386,7 +386,7 @@ void CBarnacle :: WaitTillDead ( void )
{
// death anim finished.
StopAnimation();
ResetThink();
SetThink( NULL );
}
}

4
dlls/barney.cpp

@ -424,7 +424,7 @@ void CBarney :: Spawn() @@ -424,7 +424,7 @@ void CBarney :: Spawn()
m_afCapability = bits_CAP_HEAR | bits_CAP_TURN_HEAD | bits_CAP_DOORS_GROUP;
MonsterInit();
SetUse( FollowerUse );
SetUse( &FollowerUse );
}
//=========================================================
@ -623,7 +623,7 @@ void CBarney::Killed( entvars_t *pevAttacker, int iGib ) @@ -623,7 +623,7 @@ void CBarney::Killed( entvars_t *pevAttacker, int iGib )
CBaseEntity *pGun = DropItem( "weapon_9mmhandgun", vecGunPos, vecGunAngles );
}
ResetUse();
SetUse( NULL );
CTalkMonster::Killed( pevAttacker, iGib );
}

2
dlls/bigmomma.cpp

@ -1198,7 +1198,7 @@ CBMortar *CBMortar::Shoot( edict_t *pOwner, Vector vecStart, Vector vecVelocity @@ -1198,7 +1198,7 @@ CBMortar *CBMortar::Shoot( edict_t *pOwner, Vector vecStart, Vector vecVelocity
pSpit->pev->velocity = vecVelocity;
pSpit->pev->owner = pOwner;
pSpit->pev->scale = 2.5;
pSpit->SetThink ( Animate );
pSpit->SetThink( &Animate );
pSpit->pev->nextthink = gpGlobals->time + 0.1;
return pSpit;

36
dlls/bmodels.cpp

@ -419,7 +419,7 @@ void CFuncRotating :: Spawn( ) @@ -419,7 +419,7 @@ void CFuncRotating :: Spawn( )
UTIL_SetOrigin(pev, pev->origin);
SET_MODEL( ENT(pev), STRING(pev->model) );
SetUse( RotatingUse );
SetUse( &RotatingUse );
// did level designer forget to assign speed?
if (pev->speed <= 0)
pev->speed = 0;
@ -431,13 +431,13 @@ void CFuncRotating :: Spawn( ) @@ -431,13 +431,13 @@ void CFuncRotating :: Spawn( )
// instant-use brush?
if ( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_INSTANT) )
{
SetThink( SUB_CallUseToggle );
SetThink( &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( &HurtTouch );
}
Precache( );
@ -504,7 +504,7 @@ void CFuncRotating :: Precache( void ) @@ -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( &SpinUp );
pev->nextthink = pev->ltime + 1.5;
}
}
@ -600,7 +600,7 @@ void CFuncRotating :: SpinUp( void ) @@ -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( &Rotate );
Rotate();
}
else
@ -641,7 +641,7 @@ void CFuncRotating :: SpinDown( void ) @@ -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( &Rotate );
Rotate();
}
else
@ -666,7 +666,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller @@ -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( &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 @@ -674,7 +674,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
}
else// fan is not moving, so start it
{
SetThink ( SpinUp );
SetThink( &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 @@ -686,7 +686,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
if ( pev->avelocity != g_vecZero )
{
// play stopping sound here
SetThink ( SpinDown );
SetThink( &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 @@ -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( &Rotate );
Rotate();
}
}
@ -812,15 +812,15 @@ void CPendulum :: Spawn( void ) @@ -812,15 +812,15 @@ void CPendulum :: Spawn( void )
if ( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_INSTANT) )
{
SetThink( SUB_CallUseToggle );
SetThink( &SUB_CallUseToggle );
pev->nextthink = gpGlobals->time + 0.1;
}
pev->speed = 0;
SetUse( PendulumUse );
SetUse( &PendulumUse );
if ( FBitSet( pev->spawnflags, SF_PENDULUM_SWING ) )
{
SetTouch ( RopeTouch );
SetTouch( &RopeTouch );
}
}
@ -837,12 +837,12 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US @@ -837,12 +837,12 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US
pev->avelocity = m_maxSpeed * pev->movedir;
pev->nextthink = pev->ltime + (delta / m_maxSpeed);
SetThink( Stop );
SetThink( &Stop );
}
else
{
pev->speed = 0; // Dead stop
ResetThink();
SetThink( NULL );
pev->avelocity = g_vecZero;
}
}
@ -850,7 +850,7 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US @@ -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( &Swing );
m_dampSpeed = m_maxSpeed;
}
}
@ -860,7 +860,7 @@ void CPendulum :: Stop( void ) @@ -860,7 +860,7 @@ void CPendulum :: Stop( void )
{
pev->angles = m_start;
pev->speed = 0;
ResetThink();
SetThink( NULL );
pev->avelocity = g_vecZero;
}
@ -901,7 +901,7 @@ void CPendulum :: Swing( void ) @@ -901,7 +901,7 @@ void CPendulum :: Swing( void )
{
pev->angles = m_center;
pev->speed = 0;
ResetThink();
SetThink( NULL );
pev->avelocity = g_vecZero;
}
else if ( pev->speed > m_dampSpeed )

4
dlls/bullsquid.cpp

@ -121,7 +121,7 @@ void CSquidSpit::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity @@ -121,7 +121,7 @@ void CSquidSpit::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity
pSpit->pev->velocity = vecVelocity;
pSpit->pev->owner = ENT(pevOwner);
pSpit->SetThink ( Animate );
pSpit->SetThink( &Animate );
pSpit->pev->nextthink = gpGlobals->time + 0.1;
}
@ -172,7 +172,7 @@ void CSquidSpit :: Touch ( CBaseEntity *pOther ) @@ -172,7 +172,7 @@ void CSquidSpit :: Touch ( CBaseEntity *pOther )
pOther->TakeDamage ( pev, pev, gSkillData.bullsquidDmgSpit, DMG_GENERIC );
}
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time;
}

70
dlls/buttons.cpp

@ -173,7 +173,7 @@ void CMultiSource::Spawn() @@ -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( &Register);
}
void CMultiSource::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
@ -240,7 +240,7 @@ void CMultiSource::Register(void) @@ -240,7 +240,7 @@ void CMultiSource::Register(void)
m_iTotal = 0;
memset( m_rgEntities, 0, MS_MAX_TARGETS * sizeof(EHANDLE) );
SetThink(SUB_DoNothing);
SetThink( &SUB_DoNothing);
// search for all entities which target this multisource (pev->targetname)
@ -398,7 +398,7 @@ int CBaseButton::TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, fl @@ -398,7 +398,7 @@ int CBaseButton::TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, fl
if ( code == BUTTON_NOTHING )
return 0;
// Temporarily disable the touch function, until movement is finished.
ResetTouch();
SetTouch( NULL );
m_hActivator = CBaseEntity::Instance( pevAttacker );
if ( m_hActivator == NULL )
@ -455,7 +455,7 @@ void CBaseButton::Spawn( ) @@ -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( &ButtonSpark );
pev->nextthink = gpGlobals->time + 0.5;// no hurry, make sure everything else spawns
}
@ -495,12 +495,12 @@ void CBaseButton::Spawn( ) @@ -495,12 +495,12 @@ void CBaseButton::Spawn( )
if ( FBitSet ( pev->spawnflags, SF_BUTTON_TOUCH_ONLY ) ) // touchable button
{
SetTouch( ButtonTouch );
SetTouch( &ButtonTouch );
}
else
{
ResetTouch();
SetUse ( ButtonUse );
SetTouch( NULL );
SetUse( &ButtonUse );
}
}
@ -567,7 +567,7 @@ void DoSpark(entvars_t *pev, const Vector &location ) @@ -567,7 +567,7 @@ void DoSpark(entvars_t *pev, const Vector &location )
void CBaseButton::ButtonSpark ( void )
{
SetThink ( ButtonSpark );
SetThink( &ButtonSpark );
pev->nextthink = gpGlobals->time + ( 0.1 + RANDOM_FLOAT ( 0, 1.5 ) );// spark again at random interval
DoSpark( pev, pev->mins );
@ -646,7 +646,7 @@ void CBaseButton:: ButtonTouch( CBaseEntity *pOther ) @@ -646,7 +646,7 @@ void CBaseButton:: ButtonTouch( CBaseEntity *pOther )
}
// Temporarily disable the touch function, until movement is finished.
ResetTouch();
SetTouch( NULL );
if ( code == BUTTON_RETURN )
{
@ -680,7 +680,7 @@ void CBaseButton::ButtonActivate( ) @@ -680,7 +680,7 @@ void CBaseButton::ButtonActivate( )
ASSERT(m_toggle_state == TS_AT_BOTTOM);
m_toggle_state = TS_GOING_UP;
SetMoveDone( TriggerAndWait );
SetMoveDone( &TriggerAndWait );
if (!m_fRotating)
LinearMove( m_vecPosition2, pev->speed);
else
@ -706,15 +706,15 @@ void CBaseButton::TriggerAndWait( void ) @@ -706,15 +706,15 @@ void CBaseButton::TriggerAndWait( void )
if ( !FBitSet ( pev->spawnflags, SF_BUTTON_TOUCH_ONLY ) ) // this button only works if USED, not touched!
{
// ALL buttons are now use only
ResetTouch();
SetTouch( NULL );
}
else
SetTouch( ButtonTouch );
SetTouch( &ButtonTouch );
}
else
{
pev->nextthink = pev->ltime + m_flWait;
SetThink( ButtonReturn );
SetThink( &ButtonReturn );
}
pev->frame = 1; // use alternate textures
@ -732,7 +732,7 @@ void CBaseButton::ButtonReturn( void ) @@ -732,7 +732,7 @@ void CBaseButton::ButtonReturn( void )
ASSERT(m_toggle_state == TS_AT_TOP);
m_toggle_state = TS_GOING_DOWN;
SetMoveDone( ButtonBackHome );
SetMoveDone( &ButtonBackHome );
if (!m_fRotating)
LinearMove( m_vecPosition1, pev->speed);
else
@ -781,15 +781,15 @@ void CBaseButton::ButtonBackHome( void ) @@ -781,15 +781,15 @@ void CBaseButton::ButtonBackHome( void )
if ( !FBitSet ( pev->spawnflags, SF_BUTTON_TOUCH_ONLY ) ) // this button only works if USED, not touched!
{
// All buttons are now use only
ResetTouch();
SetTouch( NULL );
}
else
SetTouch( ButtonTouch );
SetTouch( &ButtonTouch );
// reset think for a sparking button
if ( FBitSet ( pev->spawnflags, SF_BUTTON_SPARK_IF_OFF ) )
{
SetThink ( ButtonSpark );
SetThink( &ButtonSpark );
pev->nextthink = gpGlobals->time + 0.5;// no hurry.
}
}
@ -856,13 +856,13 @@ void CRotButton::Spawn( void ) @@ -856,13 +856,13 @@ void CRotButton::Spawn( void )
// if the button is flagged for USE button activation only, take away it's touch function and add a use function
if ( !FBitSet ( pev->spawnflags, SF_BUTTON_TOUCH_ONLY ) )
{
ResetTouch();
SetUse ( ButtonUse );
SetTouch( NULL );
SetUse( &ButtonUse );
}
else // touchable button
SetTouch( ButtonTouch );
SetTouch( &ButtonTouch );
//SetTouch( ButtonTouch );
//SetTouch( &ButtonTouch );
}
@ -1049,7 +1049,7 @@ void CMomentaryRotButton::UpdateSelf( float value ) @@ -1049,7 +1049,7 @@ void CMomentaryRotButton::UpdateSelf( float value )
pev->nextthink += 0.1;
pev->avelocity = (m_direction * pev->speed) * pev->movedir;
SetThink( Off );
SetThink( &Off );
}
void CMomentaryRotButton::UpdateTarget( float value )
@ -1077,12 +1077,12 @@ void CMomentaryRotButton::Off( void ) @@ -1077,12 +1077,12 @@ void CMomentaryRotButton::Off( void )
m_lastUsed = 0;
if ( FBitSet( pev->spawnflags, SF_PENDULUM_AUTO_RETURN ) && m_returnSpeed > 0 )
{
SetThink( Return );
SetThink( &Return );
pev->nextthink = pev->ltime + 0.1;
m_direction = -1;
}
else
ResetThink();
SetThink( NULL );
}
void CMomentaryRotButton::Return( void )
@ -1102,7 +1102,7 @@ void CMomentaryRotButton::UpdateSelfReturn( float value ) @@ -1102,7 +1102,7 @@ void CMomentaryRotButton::UpdateSelfReturn( float value )
pev->avelocity = g_vecZero;
pev->angles = m_start;
pev->nextthink = -1;
ResetThink();
SetThink( NULL );
}
else
{
@ -1147,21 +1147,21 @@ LINK_ENTITY_TO_CLASS(env_debris, CEnvSpark); @@ -1147,21 +1147,21 @@ LINK_ENTITY_TO_CLASS(env_debris, CEnvSpark);
void CEnvSpark::Spawn(void)
{
ResetThink();
ResetUse();
SetThink( NULL );
SetUse( NULL );
if (FBitSet(pev->spawnflags, 32)) // Use for on/off
{
if (FBitSet(pev->spawnflags, 64)) // Start on
{
SetThink(SparkThink); // start sparking
SetUse(SparkStop); // set up +USE to stop sparking
SetThink( &SparkThink); // start sparking
SetUse( &SparkStop); // set up +USE to stop sparking
}
else
SetUse(SparkStart);
SetUse( &SparkStart);
}
else
SetThink(SparkThink);
SetThink( &SparkThink);
pev->nextthink = gpGlobals->time + ( 0.1 + RANDOM_FLOAT ( 0, 1.5 ) );
@ -1208,15 +1208,15 @@ void EXPORT CEnvSpark::SparkThink(void) @@ -1208,15 +1208,15 @@ void EXPORT CEnvSpark::SparkThink(void)
void EXPORT CEnvSpark::SparkStart(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetUse(SparkStop);
SetThink(SparkThink);
SetUse( &SparkStop);
SetThink( &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);
ResetThink();
SetUse( &SparkStart);
SetThink( NULL );
}
#define SF_BTARGET_USE 0x0001

10
dlls/cbase.h

@ -373,10 +373,10 @@ public: @@ -373,10 +373,10 @@ public:
#else
#define SetThink( a ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (&a)
#define SetTouch( a ) m_pfnTouch = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (&a)
#define SetUse( a ) m_pfnUse = static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (&a)
#define SetBlocked( a ) m_pfnBlocked = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (&a)
#define SetThink( a ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (a)
#define SetTouch( a ) m_pfnTouch = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (a)
#define SetUse( a ) m_pfnUse = static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (a)
#define SetBlocked( a ) m_pfnBlocked = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (a)
#define ResetThink( ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (NULL)
#define ResetTouch( ) m_pfnTouch = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (NULL)
#define ResetUse( ) m_pfnUse = static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (NULL)
@ -557,7 +557,7 @@ public: @@ -557,7 +557,7 @@ public:
// the button will be allowed to operate. Otherwise, it will be
// deactivated.
};
#define SetMoveDone( a ) m_pfnCallWhenMoveDone = static_cast <void (CBaseToggle::*)(void)> (&a)
#define SetMoveDone( a ) m_pfnCallWhenMoveDone = static_cast <void (CBaseToggle::*)(void)> (a)

20
dlls/combat.cpp

@ -115,8 +115,8 @@ void CGib :: SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs @@ -115,8 +115,8 @@ 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->ResetThink();
pGib->SetTouch( &StickyGibTouch );
pGib->SetThink( NULL );
}
pGib->LimitVelocity();
}
@ -331,7 +331,7 @@ void CBaseMonster :: GibMonster( void ) @@ -331,7 +331,7 @@ void CBaseMonster :: GibMonster( void )
if ( gibbed )
{
// don't remove players!
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time;
}
else
@ -622,7 +622,7 @@ void CBaseMonster :: Killed( entvars_t *pevAttacker, int iGib ) @@ -622,7 +622,7 @@ void CBaseMonster :: Killed( entvars_t *pevAttacker, int iGib )
}
else if ( pev->flags & FL_MONSTER )
{
ResetTouch();
SetTouch( NULL );
BecomeDead();
}
@ -654,7 +654,7 @@ void CBaseEntity :: SUB_StartFadeOut ( void ) @@ -654,7 +654,7 @@ void CBaseEntity :: SUB_StartFadeOut ( void )
pev->avelocity = g_vecZero;
pev->nextthink = gpGlobals->time + 0.1;
SetThink ( SUB_FadeOut );
SetThink( &SUB_FadeOut );
}
void CBaseEntity :: SUB_FadeOut ( void )
@ -668,7 +668,7 @@ void CBaseEntity :: SUB_FadeOut ( void ) @@ -668,7 +668,7 @@ void CBaseEntity :: SUB_FadeOut ( void )
{
pev->renderamt = 0;
pev->nextthink = gpGlobals->time + 0.2;
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
}
}
@ -688,7 +688,7 @@ void CGib :: WaitTillLand ( void ) @@ -688,7 +688,7 @@ void CGib :: WaitTillLand ( void )
if ( pev->velocity == g_vecZero )
{
SetThink (SUB_StartFadeOut);
SetThink( &SUB_StartFadeOut);
pev->nextthink = gpGlobals->time + m_lifeTime;
// If you bleed, you stink!
@ -756,7 +756,7 @@ void CGib :: StickyGibTouch ( CBaseEntity *pOther ) @@ -756,7 +756,7 @@ void CGib :: StickyGibTouch ( CBaseEntity *pOther )
Vector vecSpot;
TraceResult tr;
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 10;
if ( !FClassnameIs( pOther->pev, "worldspawn" ) )
@ -797,8 +797,8 @@ void CGib :: Spawn( const char *szGibModel ) @@ -797,8 +797,8 @@ void CGib :: Spawn( const char *szGibModel )
pev->nextthink = gpGlobals->time + 4;
m_lifeTime = 25;
SetThink ( WaitTillLand );
SetTouch ( BounceGibTouch );
SetThink( &WaitTillLand );
SetTouch( &BounceGibTouch );
m_material = matNone;
m_cBloodDecals = 5;// how many blood decals this gib can place (1 per bounce until none remain).

14
dlls/controller.cpp

@ -1170,8 +1170,8 @@ void CControllerHeadBall :: Spawn( void ) @@ -1170,8 +1170,8 @@ void CControllerHeadBall :: Spawn( void )
UTIL_SetSize(pev, Vector( 0, 0, 0), Vector(0, 0, 0));
UTIL_SetOrigin( pev, pev->origin );
SetThink( HuntThink );
SetTouch( BounceTouch );
SetThink( &HuntThink );
SetTouch( &BounceTouch );
m_vecIdeal = Vector( 0, 0, 0 );
@ -1213,7 +1213,7 @@ void CControllerHeadBall :: HuntThink( void ) @@ -1213,7 +1213,7 @@ void CControllerHeadBall :: HuntThink( void )
// check world boundaries
if (gpGlobals->time - pev->dmgtime > 5 || pev->renderamt < 64 || m_hEnemy == NULL || m_hOwner == NULL || pev->origin.x < -4096 || pev->origin.x > 4096 || pev->origin.y < -4096 || pev->origin.y > 4096 || pev->origin.z < -4096 || pev->origin.z > 4096)
{
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
return;
}
@ -1257,7 +1257,7 @@ void CControllerHeadBall :: HuntThink( void ) @@ -1257,7 +1257,7 @@ void CControllerHeadBall :: HuntThink( void )
m_flNextAttack = gpGlobals->time + 3.0;
SetThink( DieThink );
SetThink( &DieThink );
pev->nextthink = gpGlobals->time + 0.3;
}
@ -1364,8 +1364,8 @@ void CControllerZapBall :: Spawn( void ) @@ -1364,8 +1364,8 @@ void CControllerZapBall :: Spawn( void )
UTIL_SetSize(pev, Vector( 0, 0, 0), Vector(0, 0, 0));
UTIL_SetOrigin( pev, pev->origin );
SetThink( AnimateThink );
SetTouch( ExplodeTouch );
SetThink( &AnimateThink );
SetTouch( &ExplodeTouch );
m_hOwner = Instance( pev->owner );
pev->dmgtime = gpGlobals->time; // keep track of when ball spawned
@ -1389,7 +1389,7 @@ void CControllerZapBall :: AnimateThink( void ) @@ -1389,7 +1389,7 @@ void CControllerZapBall :: AnimateThink( void )
if (gpGlobals->time - pev->dmgtime > 5 || pev->velocity.Length() < 10)
{
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
}
}

12
dlls/crossbow.cpp

@ -71,8 +71,8 @@ void CCrossbowBolt::Spawn( ) @@ -71,8 +71,8 @@ void CCrossbowBolt::Spawn( )
UTIL_SetOrigin( pev, pev->origin );
UTIL_SetSize(pev, Vector(0, 0, 0), Vector(0, 0, 0));
SetTouch( BoltTouch );
SetThink( BubbleThink );
SetTouch( &BoltTouch );
SetThink( &BubbleThink );
pev->nextthink = gpGlobals->time + 0.2;
}
@ -96,8 +96,8 @@ int CCrossbowBolt :: Classify ( void ) @@ -96,8 +96,8 @@ int CCrossbowBolt :: Classify ( void )
void CCrossbowBolt::BoltTouch( CBaseEntity *pOther )
{
ResetTouch();
ResetThink();
SetTouch( NULL );
SetThink( NULL );
if (pOther->pev->takedamage)
{
@ -139,7 +139,7 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther ) @@ -139,7 +139,7 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther )
{
EMIT_SOUND_DYN(ENT(pev), CHAN_BODY, "weapons/xbow_hit1.wav", RANDOM_FLOAT(0.95, 1.0), ATTN_NORM, 0, 98 + RANDOM_LONG(0,7));
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time;// this will get changed below if the bolt is allowed to stick in what it hit.
if ( FClassnameIs( pOther->pev, "worldspawn" ) )
@ -179,7 +179,7 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther ) @@ -179,7 +179,7 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther )
if ( g_pGameRules->IsMultiplayer() )
{
SetThink( ExplodeThink );
SetThink( &ExplodeThink );
pev->nextthink = gpGlobals->time + 0.1;
}
}

4
dlls/crowbar.cpp

@ -147,7 +147,7 @@ void CCrowbar::PrimaryAttack() @@ -147,7 +147,7 @@ void CCrowbar::PrimaryAttack()
{
if (! Swing( 1 ))
{
SetThink( SwingAgain );
SetThink( &SwingAgain );
pev->nextthink = gpGlobals->time + 0.1;
}
}
@ -306,7 +306,7 @@ int CCrowbar::Swing( int fFirst ) @@ -306,7 +306,7 @@ int CCrowbar::Swing( int fFirst )
#endif
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25;
SetThink( Smack );
SetThink( &Smack );
pev->nextthink = UTIL_WeaponTimeBase() + 0.2;

26
dlls/doors.cpp

@ -317,10 +317,10 @@ void CBaseDoor::Spawn( ) @@ -317,10 +317,10 @@ void CBaseDoor::Spawn( )
// if the door is flagged for USE button activation only, use NULL touch function
if ( FBitSet ( pev->spawnflags, SF_DOOR_USE_ONLY ) )
{
ResetTouch();
SetTouch( NULL );
}
else // touchable button
SetTouch( DoorTouch );
SetTouch( &DoorTouch );
}
@ -509,7 +509,7 @@ void CBaseDoor::DoorTouch( CBaseEntity *pOther ) @@ -509,7 +509,7 @@ void CBaseDoor::DoorTouch( CBaseEntity *pOther )
m_hActivator = pOther;// remember who activated the door
if (DoorActivate( ))
ResetTouch(); // Temporarily disable the touch function, until movement is finished.
SetTouch( NULL ); // Temporarily disable the touch function, until movement is finished.
}
@ -576,7 +576,7 @@ void CBaseDoor::DoorGoUp( void ) @@ -576,7 +576,7 @@ void CBaseDoor::DoorGoUp( void )
m_toggle_state = TS_GOING_UP;
SetMoveDone( DoorHitTop );
SetMoveDone( &DoorHitTop );
if ( FClassnameIs(pev, "func_door_rotating")) // !!! BUGBUG Triggered doors don't work with this yet
{
float sign = 1.0;
@ -625,13 +625,13 @@ void CBaseDoor::DoorHitTop( void ) @@ -625,13 +625,13 @@ void CBaseDoor::DoorHitTop( void )
{
// Re-instate touch method, movement is complete
if ( !FBitSet ( pev->spawnflags, SF_DOOR_USE_ONLY ) )
SetTouch( DoorTouch );
SetTouch( &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( &DoorGoDown );
if ( m_flWait == -1 )
{
@ -661,7 +661,7 @@ void CBaseDoor::DoorGoDown( void ) @@ -661,7 +661,7 @@ void CBaseDoor::DoorGoDown( void )
#endif // DOOR_ASSERT
m_toggle_state = TS_GOING_DOWN;
SetMoveDone( DoorHitBottom );
SetMoveDone( &DoorHitBottom );
if ( FClassnameIs(pev, "func_door_rotating"))//rotating door
AngularMove( m_vecAngle1, pev->speed);
else
@ -685,10 +685,10 @@ void CBaseDoor::DoorHitBottom( void ) @@ -685,10 +685,10 @@ void CBaseDoor::DoorHitBottom( void )
// Re-instate touch method, cycle is complete
if ( FBitSet ( pev->spawnflags, SF_DOOR_USE_ONLY ) )
{// use only door
ResetTouch();
SetTouch( NULL );
}
else // touchable door
SetTouch( DoorTouch );
SetTouch( &DoorTouch );
SUB_UseTargets( m_hActivator, USE_TOGGLE, 0 ); // this isn't finished
@ -862,10 +862,10 @@ void CRotDoor::Spawn( void ) @@ -862,10 +862,10 @@ void CRotDoor::Spawn( void )
if ( FBitSet ( pev->spawnflags, SF_DOOR_USE_ONLY ) )
{
ResetTouch();
SetTouch( NULL );
}
else // touchable button
SetTouch( DoorTouch );
SetTouch( &DoorTouch );
}
@ -935,7 +935,7 @@ void CMomentaryDoor::Spawn( void ) @@ -935,7 +935,7 @@ void CMomentaryDoor::Spawn( void )
m_vecPosition2 = m_vecPosition1;
m_vecPosition1 = pev->origin;
}
ResetTouch();
SetTouch( NULL );
Precache();
}
@ -1075,7 +1075,7 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP @@ -1075,7 +1075,7 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving), 1, ATTN_NORM);
LinearMove( move, speed );
SetMoveDone( MomentaryMoveDone );
SetMoveDone( &MomentaryMoveDone );
}
}

58
dlls/effects.cpp

@ -87,7 +87,7 @@ void CBubbling::Spawn( void ) @@ -87,7 +87,7 @@ void CBubbling::Spawn( void )
if ( !(pev->spawnflags & SF_BUBBLES_STARTOFF) )
{
SetThink( FizzThink );
SetThink( &FizzThink );
pev->nextthink = gpGlobals->time + 2.0;
m_state = 1;
}
@ -108,12 +108,12 @@ void CBubbling::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use @@ -108,12 +108,12 @@ void CBubbling::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
if ( m_state )
{
SetThink( FizzThink );
SetThink( &FizzThink );
pev->nextthink = gpGlobals->time + 0.1;
}
else
{
ResetThink();
SetThink( NULL );
pev->nextthink = 0;
}
}
@ -427,7 +427,7 @@ LINK_ENTITY_TO_CLASS( trip_beam, CTripBeam ); @@ -427,7 +427,7 @@ LINK_ENTITY_TO_CLASS( trip_beam, CTripBeam );
void CTripBeam::Spawn( void )
{
CLightning::Spawn();
SetTouch( TriggerTouch );
SetTouch( &TriggerTouch );
pev->solid = SOLID_TRIGGER;
RelinkBeam();
}
@ -459,7 +459,7 @@ void CLightning::Spawn( void ) @@ -459,7 +459,7 @@ void CLightning::Spawn( void )
{
if ( FStringNull( m_iszSpriteName ) )
{
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
return;
}
pev->solid = SOLID_NOT; // Remove model & collisions
@ -469,10 +469,10 @@ void CLightning::Spawn( void ) @@ -469,10 +469,10 @@ void CLightning::Spawn( void )
if ( ServerSide() )
{
ResetThink();
SetThink( NULL );
if ( pev->dmg > 0 )
{
SetThink( DamageThink );
SetThink( &DamageThink );
pev->nextthink = gpGlobals->time + 0.1;
}
if ( pev->targetname )
@ -486,7 +486,7 @@ void CLightning::Spawn( void ) @@ -486,7 +486,7 @@ void CLightning::Spawn( void )
else
m_active = 1;
SetUse( ToggleUse );
SetUse( &ToggleUse );
}
}
else
@ -494,11 +494,11 @@ void CLightning::Spawn( void ) @@ -494,11 +494,11 @@ void CLightning::Spawn( void )
m_active = 0;
if ( !FStringNull(pev->targetname) )
{
SetUse( StrikeUse );
SetUse( &StrikeUse );
}
if ( FStringNull(pev->targetname) || FBitSet(pev->spawnflags, SF_BEAM_STARTON) )
{
SetThink( StrikeThink );
SetThink( &StrikeThink );
pev->nextthink = gpGlobals->time + 1.0;
}
}
@ -612,16 +612,16 @@ void CLightning::StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T @@ -612,16 +612,16 @@ void CLightning::StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
if ( m_active )
{
m_active = 0;
ResetThink();
SetThink( NULL );
}
else
{
SetThink( StrikeThink );
SetThink( &StrikeThink );
pev->nextthink = gpGlobals->time + 0.1;
}
if ( !FBitSet( pev->spawnflags, SF_BEAM_TOGGLE ) )
ResetUse();
SetUse( NULL );
}
@ -961,13 +961,13 @@ void CLaser::Spawn( void ) @@ -961,13 +961,13 @@ void CLaser::Spawn( void )
{
if ( FStringNull( pev->model ) )
{
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
return;
}
pev->solid = SOLID_NOT; // Remove model & collisions
Precache( );
SetThink( StrikeThink );
SetThink( &StrikeThink );
pev->flags |= FL_CUSTOMENTITY;
PointsInit( pev->origin, pev->origin );
@ -1264,7 +1264,7 @@ void CSprite::Expand( float scaleSpeed, float fadeSpeed ) @@ -1264,7 +1264,7 @@ void CSprite::Expand( float scaleSpeed, float fadeSpeed )
{
pev->speed = scaleSpeed;
pev->health = fadeSpeed;
SetThink( ExpandThink );
SetThink( &ExpandThink );
pev->nextthink = gpGlobals->time;
m_lastTime = gpGlobals->time;
@ -1319,7 +1319,7 @@ void CSprite::TurnOn( void ) @@ -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( &AnimateThink );
pev->nextthink = gpGlobals->time;
m_lastTime = gpGlobals->time;
}
@ -1426,7 +1426,7 @@ void CGibShooter::KeyValue( KeyValueData *pkvd ) @@ -1426,7 +1426,7 @@ void CGibShooter::KeyValue( KeyValueData *pkvd )
void CGibShooter::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetThink( ShootThink );
SetThink( &ShootThink );
pev->nextthink = gpGlobals->time;
}
@ -1511,12 +1511,12 @@ void CGibShooter :: ShootThink ( void ) @@ -1511,12 +1511,12 @@ void CGibShooter :: ShootThink ( void )
if ( pev->spawnflags & SF_GIBSHOOTER_REPEATABLE )
{
m_iGibs = m_iGibCapacity;
ResetThink();
SetThink( NULL );
pev->nextthink = gpGlobals->time;
}
else
{
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time;
}
}
@ -1701,14 +1701,14 @@ void CTestEffect::TestThink( void ) @@ -1701,14 +1701,14 @@ void CTestEffect::TestThink( void )
m_flStartTime = gpGlobals->time;
m_iBeam = 0;
// pev->nextthink = gpGlobals->time;
ResetThink();
SetThink( NULL );
}
}
void CTestEffect::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetThink( TestThink );
SetThink( &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 @@ -2129,7 +2129,7 @@ void CEnvFunnel::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
MESSAGE_END();
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time;
}
@ -2184,7 +2184,7 @@ void CEnvBeverage::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE @@ -2184,7 +2184,7 @@ void CEnvBeverage::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE
pev->frags = 1;
pev->health--;
//SetThink (SUB_Remove);
//SetThink( &SUB_Remove);
//pev->nextthink = gpGlobals->time;
}
@ -2228,7 +2228,7 @@ void CItemSoda::Spawn( void ) @@ -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( &CanThink);
pev->nextthink = gpGlobals->time + 0.5;
}
@ -2238,8 +2238,8 @@ void CItemSoda::CanThink ( void ) @@ -2238,8 +2238,8 @@ void CItemSoda::CanThink ( void )
pev->solid = SOLID_TRIGGER;
UTIL_SetSize ( pev, Vector ( -8, -8, 0 ), Vector ( 8, 8, 8 ) );
ResetThink();
SetTouch ( CanTouch );
SetThink( NULL );
SetTouch( &CanTouch );
}
void CItemSoda::CanTouch ( CBaseEntity *pOther )
@ -2262,7 +2262,7 @@ void CItemSoda::CanTouch ( CBaseEntity *pOther ) @@ -2262,7 +2262,7 @@ void CItemSoda::CanTouch ( CBaseEntity *pOther )
pev->solid = SOLID_NOT;
pev->movetype = MOVETYPE_NONE;
pev->effects = EF_NODRAW;
ResetTouch();
SetThink ( SUB_Remove );
SetTouch( NULL );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time;
}

4
dlls/effects.h

@ -79,7 +79,7 @@ public: @@ -79,7 +79,7 @@ public:
inline void AnimateAndDie( float framerate )
{
SetThink(AnimateUntilDead);
SetThink( &AnimateUntilDead);
pev->framerate = framerate;
pev->dmgtime = gpGlobals->time + (m_maxFrame / framerate);
pev->nextthink = gpGlobals->time;
@ -168,7 +168,7 @@ public: @@ -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( &SUB_Remove); pev->nextthink = gpGlobals->time + time; }
inline void BeamDamageInstant( TraceResult *ptr, float damage )
{
pev->dmg = damage;

2
dlls/explode.cpp

@ -217,7 +217,7 @@ void CEnvExplosion::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE @@ -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( &Smoke );
pev->nextthink = gpGlobals->time + 0.3;
// draw sparks

14
dlls/func_break.cpp

@ -164,9 +164,9 @@ void CBreakable::Spawn( void ) @@ -164,9 +164,9 @@ void CBreakable::Spawn( void )
SET_MODEL(ENT(pev), STRING(pev->model) );//set size and link into world.
SetTouch( BreakTouch );
SetTouch( &BreakTouch );
if ( FBitSet( pev->spawnflags, SF_BREAK_TRIGGER_ONLY ) ) // Only break on trigger
ResetTouch();
SetTouch( NULL );
// Flag unbreakable glass as "worldbrush" so it will block ALL tracelines
if ( !IsBreakable() && pev->rendermode != kRenderNormal )
@ -445,7 +445,7 @@ void CBreakable::BreakTouch( CBaseEntity *pOther ) @@ -445,7 +445,7 @@ void CBreakable::BreakTouch( CBaseEntity *pOther )
if (flDamage >= pev->health)
{
ResetTouch();
SetTouch( NULL );
TakeDamage(pevToucher, pevToucher, flDamage, DMG_CRUSH);
// do a little damage to player if we broke glass or computer
@ -459,8 +459,8 @@ void CBreakable::BreakTouch( CBaseEntity *pOther ) @@ -459,8 +459,8 @@ void CBreakable::BreakTouch( CBaseEntity *pOther )
// play creaking sound here.
DamageSound();
SetThink ( Die );
ResetTouch();
SetThink( &Die );
SetTouch( NULL );
if ( m_flDelay == 0 )
{// !!!BUGBUG - why doesn't zero delay work?
@ -743,7 +743,7 @@ void CBreakable::Die( void ) @@ -743,7 +743,7 @@ void CBreakable::Die( void )
// Fire targets on break
SUB_UseTargets( NULL, USE_TOGGLE, 0 );
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = pev->ltime + 0.1;
if ( m_iszSpawnObject )
CBaseEntity::Create( (char *)STRING(m_iszSpawnObject), VecBModelOrigin(pev), pev->angles, edict() );
@ -977,7 +977,7 @@ void CPushable :: Move( CBaseEntity *pOther, int push ) @@ -977,7 +977,7 @@ void CPushable :: Move( CBaseEntity *pOther, int push )
{
m_lastSound = RANDOM_LONG(0,2);
EMIT_SOUND(ENT(pev), CHAN_WEAPON, m_soundNames[m_lastSound], 0.5, ATTN_NORM);
// SetThink( StopSound );
// SetThink( &StopSound );
// pev->nextthink = pev->ltime + 0.1;
}
else

8
dlls/gargantua.cpp

@ -161,7 +161,7 @@ void CStomp::Think( void ) @@ -161,7 +161,7 @@ void CStomp::Think( void )
pSprite->pev->velocity = Vector(RANDOM_FLOAT(-200,200),RANDOM_FLOAT(-200,200),175);
// pSprite->AnimateAndDie( RANDOM_FLOAT( 8.0, 12.0 ) );
pSprite->pev->nextthink = gpGlobals->time + 0.3;
pSprite->SetThink( SUB_Remove );
pSprite->SetThink( &SUB_Remove );
pSprite->SetTransparency( kRenderTransAdd, 255, 255, 255, 255, kRenderFxFadeFast );
}
}
@ -1126,7 +1126,7 @@ void CGargantua::RunTask( Task_t *pTask ) @@ -1126,7 +1126,7 @@ void CGargantua::RunTask( Task_t *pTask )
pev->rendercolor.z = 0;
StopAnimation();
pev->nextthink = gpGlobals->time + 0.15;
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
int i;
int parts = MODEL_FRAMES( gGargGibModel );
for ( i = 0; i < 10; i++ )
@ -1145,7 +1145,7 @@ void CGargantua::RunTask( Task_t *pTask ) @@ -1145,7 +1145,7 @@ void CGargantua::RunTask( Task_t *pTask )
pGib->pev->origin = pev->origin;
pGib->pev->velocity = UTIL_RandomBloodVector() * RANDOM_FLOAT( 300, 500 );
pGib->pev->nextthink = gpGlobals->time + 1.25;
pGib->SetThink( SUB_FadeOut );
pGib->SetThink( &SUB_FadeOut );
}
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, pev->origin );
WRITE_BYTE( TE_BREAKMODEL);
@ -1359,7 +1359,7 @@ void SpawnExplosion( Vector center, float randomRange, float time, int magnitude @@ -1359,7 +1359,7 @@ void SpawnExplosion( Vector center, float randomRange, float time, int magnitude
pExplosion->pev->spawnflags |= SF_ENVEXPLOSION_NODAMAGE;
pExplosion->Spawn();
pExplosion->SetThink( CBaseEntity::SUB_CallUseToggle );
pExplosion->SetThink( &CBaseEntity::SUB_CallUseToggle );
pExplosion->pev->nextthink = gpGlobals->time + time;
}

22
dlls/ggrenade.cpp

@ -113,7 +113,7 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType ) @@ -113,7 +113,7 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType )
}
pev->effects |= EF_NODRAW;
SetThink( Smoke );
SetThink( &Smoke );
pev->velocity = g_vecZero;
pev->nextthink = gpGlobals->time + 0.3;
@ -156,7 +156,7 @@ void CGrenade::Killed( entvars_t *pevAttacker, int iGib ) @@ -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( &Detonate );
pev->nextthink = gpGlobals->time;
}
@ -164,7 +164,7 @@ void CGrenade::PreDetonate( void ) @@ -164,7 +164,7 @@ void CGrenade::PreDetonate( void )
{
CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin, 400, 0.3 );
SetThink( Detonate );
SetThink( &Detonate );
pev->nextthink = gpGlobals->time + 1;
}
@ -331,7 +331,7 @@ void CGrenade :: TumbleThink( void ) @@ -331,7 +331,7 @@ void CGrenade :: TumbleThink( void )
if (pev->dmgtime <= gpGlobals->time)
{
SetThink( Detonate );
SetThink( &Detonate );
}
if (pev->waterlevel != 0)
{
@ -368,14 +368,14 @@ CGrenade *CGrenade::ShootContact( entvars_t *pevOwner, Vector vecStart, Vector v @@ -368,14 +368,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( &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( &ExplodeTouch );
pGrenade->pev->dmg = gSkillData.plrDmgM203Grenade;
@ -392,14 +392,14 @@ CGrenade * CGrenade:: ShootTimed( entvars_t *pevOwner, Vector vecStart, Vector v @@ -392,14 +392,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( &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( &TumbleThink );
pGrenade->pev->nextthink = gpGlobals->time + 0.1;
if (time < 0.1)
{
@ -442,9 +442,9 @@ CGrenade * CGrenade :: ShootSatchelCharge( entvars_t *pevOwner, Vector vecStart, @@ -442,9 +442,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( &SUB_DoNothing );
pGrenade->SetUse( &DetonateUse );
pGrenade->SetTouch( &SlideTouch );
pGrenade->pev->spawnflags = SF_DETONATE;
pGrenade->pev->friction = 0.9;

8
dlls/h_battery.cpp

@ -129,7 +129,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use @@ -129,7 +129,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
}
pev->nextthink = pev->ltime + 0.25;
SetThink(Off);
SetThink( &Off);
// Time to recharge yet?
@ -179,7 +179,7 @@ void CRecharge::Recharge(void) @@ -179,7 +179,7 @@ void CRecharge::Recharge(void)
{
m_iJuice = gSkillData.suitchargerCapacity;
pev->frame = 0;
SetThink( SUB_DoNothing );
SetThink( &SUB_DoNothing );
}
void CRecharge::Off(void)
@ -193,8 +193,8 @@ void CRecharge::Off(void) @@ -193,8 +193,8 @@ void CRecharge::Off(void)
if ((!m_iJuice) && ( ( m_iReactivate = g_pGameRules->FlHEVChargerRechargeTime() ) > 0) )
{
pev->nextthink = pev->ltime + m_iReactivate;
SetThink(Recharge);
SetThink( &Recharge);
}
else
SetThink( SUB_DoNothing );
SetThink( &SUB_DoNothing );
}

10
dlls/h_cine.cpp

@ -124,7 +124,7 @@ void CLegacyCineMonster :: CineSpawn( char *szModel ) @@ -124,7 +124,7 @@ void CLegacyCineMonster :: CineSpawn( char *szModel )
// if no targetname, start now
if ( FStringNull(pev->targetname) )
{
SetThink( CineThink );
SetThink( &CineThink );
pev->nextthink += 1.0;
}
}
@ -136,7 +136,7 @@ void CLegacyCineMonster :: CineSpawn( char *szModel ) @@ -136,7 +136,7 @@ void CLegacyCineMonster :: CineSpawn( char *szModel )
void CLegacyCineMonster :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
pev->animtime = 0; // reset the sequence
SetThink( CineThink );
SetThink( &CineThink );
pev->nextthink = gpGlobals->time;
}
@ -145,7 +145,7 @@ void CLegacyCineMonster :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, U @@ -145,7 +145,7 @@ void CLegacyCineMonster :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, U
//
void CLegacyCineMonster :: Die( void )
{
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
}
//
@ -228,14 +228,14 @@ void CCineBlood :: BloodGush ( void ) @@ -228,14 +228,14 @@ void CCineBlood :: BloodGush ( void )
void CCineBlood :: BloodStart ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetThink( BloodGush );
SetThink( &BloodGush );
pev->nextthink = gpGlobals->time;// now!
}
void CCineBlood :: Spawn ( void )
{
pev->solid = SOLID_NOT;
SetUse ( BloodStart );
SetUse( &BloodStart );
pev->health = 20;//hacked health to count iterations
}

2
dlls/h_cycler.cpp

@ -334,7 +334,7 @@ void CWeaponCycler::Spawn( ) @@ -334,7 +334,7 @@ void CWeaponCycler::Spawn( )
UTIL_SetOrigin( pev, pev->origin );
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
SetTouch( DefaultTouch );
SetTouch( &DefaultTouch );
}

2
dlls/handgrenade.cpp

@ -103,7 +103,7 @@ void CHandGrenade::Holster( int skiplocal /* = 0 */ ) @@ -103,7 +103,7 @@ void CHandGrenade::Holster( int skiplocal /* = 0 */ )
{
// no more grenades!
m_pPlayer->pev->weapons &= ~(1<<WEAPON_HANDGRENADE);
SetThink( DestroyItem );
SetThink( &DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}

6
dlls/headcrab.cpp

@ -324,7 +324,7 @@ void CHeadCrab :: RunTask ( Task_t *pTask ) @@ -324,7 +324,7 @@ void CHeadCrab :: RunTask ( Task_t *pTask )
if ( m_fSequenceFinished )
{
TaskComplete();
ResetTouch();
SetTouch( NULL );
m_IdealActivity = ACT_IDLE;
}
break;
@ -360,7 +360,7 @@ void CHeadCrab :: LeapTouch ( CBaseEntity *pOther ) @@ -360,7 +360,7 @@ void CHeadCrab :: LeapTouch ( CBaseEntity *pOther )
pOther->TakeDamage( pev, pev, GetDamageAmount(), DMG_SLASH );
}
ResetTouch();
SetTouch( NULL );
}
//=========================================================
@ -385,7 +385,7 @@ void CHeadCrab :: StartTask ( Task_t *pTask ) @@ -385,7 +385,7 @@ void CHeadCrab :: StartTask ( Task_t *pTask )
{
EMIT_SOUND_DYN( edict(), CHAN_WEAPON, pAttackSounds[0], GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
m_IdealActivity = ACT_RANGE_ATTACK1;
SetTouch ( LeapTouch );
SetTouch( &LeapTouch );
break;
}
default:

8
dlls/healthkit.cpp

@ -207,7 +207,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u @@ -207,7 +207,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u
}
pev->nextthink = pev->ltime + 0.25;
SetThink(Off);
SetThink( &Off);
// Time to recharge yet?
@ -243,7 +243,7 @@ void CWallHealth::Recharge(void) @@ -243,7 +243,7 @@ void CWallHealth::Recharge(void)
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM );
m_iJuice = gSkillData.healthchargerCapacity;
pev->frame = 0;
SetThink( SUB_DoNothing );
SetThink( &SUB_DoNothing );
}
void CWallHealth::Off(void)
@ -257,8 +257,8 @@ void CWallHealth::Off(void) @@ -257,8 +257,8 @@ void CWallHealth::Off(void)
if ((!m_iJuice) && ( ( m_iReactivate = g_pGameRules->FlHealthChargerRechargeTime() ) > 0) )
{
pev->nextthink = pev->ltime + m_iReactivate;
SetThink(Recharge);
SetThink( &Recharge);
}
else
SetThink( SUB_DoNothing );
SetThink( &SUB_DoNothing );
}

4
dlls/hgrunt.cpp

@ -2393,7 +2393,7 @@ void CHGruntRepel::Spawn( void ) @@ -2393,7 +2393,7 @@ void CHGruntRepel::Spawn( void )
Precache( );
pev->solid = SOLID_NOT;
SetUse( RepelUse );
SetUse( &RepelUse );
}
void CHGruntRepel::Precache( void )
@ -2423,7 +2423,7 @@ void CHGruntRepel::RepelUse ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE @@ -2423,7 +2423,7 @@ void CHGruntRepel::RepelUse ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE
pBeam->PointEntInit( pev->origin + Vector(0,0,112), pGrunt->entindex() );
pBeam->SetFlags( BEAM_FSOLID );
pBeam->SetColor( 255, 255, 255 );
pBeam->SetThink( SUB_Remove );
pBeam->SetThink( &SUB_Remove );
pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5;
UTIL_Remove( this );

18
dlls/hornet.cpp

@ -93,8 +93,8 @@ void CHornet :: Spawn( void ) @@ -93,8 +93,8 @@ void CHornet :: Spawn( void )
SET_MODEL(ENT( pev ), "models/hornet.mdl");
UTIL_SetSize( pev, Vector( -4, -4, -4 ), Vector( 4, 4, 4 ) );
SetTouch( DieTouch );
SetThink( StartTrack );
SetTouch( &DieTouch );
SetThink( &StartTrack );
edict_t *pSoundEnt = pev->owner;
if ( !pSoundEnt )
@ -169,8 +169,8 @@ void CHornet :: StartTrack ( void ) @@ -169,8 +169,8 @@ void CHornet :: StartTrack ( void )
{
IgniteTrail();
SetTouch( TrackTouch );
SetThink( TrackTarget );
SetTouch( &TrackTouch );
SetThink( &TrackTarget );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -182,9 +182,9 @@ void CHornet :: StartDart ( void ) @@ -182,9 +182,9 @@ void CHornet :: StartDart ( void )
{
IgniteTrail();
SetTouch( DartTouch );
SetTouch( &DartTouch );
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 4;
}
@ -256,8 +256,8 @@ void CHornet :: TrackTarget ( void ) @@ -256,8 +256,8 @@ void CHornet :: TrackTarget ( void )
if (gpGlobals->time > m_flStopAttack)
{
ResetTouch();
SetThink( SUB_Remove );
SetTouch( NULL );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
return;
}
@ -413,7 +413,7 @@ void CHornet::DieTouch ( CBaseEntity *pOther ) @@ -413,7 +413,7 @@ void CHornet::DieTouch ( CBaseEntity *pOther )
pev->modelindex = 0;// so will disappear for the 0.1 secs we wait until NEXTTHINK gets rid
pev->solid = SOLID_NOT;
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 1;// stick around long enough for the sound to finish!
}

2
dlls/hornetgun.cpp

@ -235,7 +235,7 @@ void CHgun::SecondaryAttack( void ) @@ -235,7 +235,7 @@ void CHgun::SecondaryAttack( void )
pHornet->pev->velocity = gpGlobals->v_forward * 1200;
pHornet->pev->angles = UTIL_VecToAngles( pHornet->pev->velocity );
pHornet->SetThink( CHornet::StartDart );
pHornet->SetThink( &CHornet::StartDart );
m_flRechargeTime = gpGlobals->time + 0.5;
#endif

4
dlls/ichthyosaur.cpp

@ -494,8 +494,8 @@ void CIchthyosaur :: Spawn() @@ -494,8 +494,8 @@ void CIchthyosaur :: Spawn()
MonsterInit();
SetTouch( BiteTouch );
SetUse( CombatUse );
SetTouch( &BiteTouch );
SetUse( &CombatUse );
m_idealDist = 384;
m_flMinSpeed = 80;

10
dlls/items.cpp

@ -93,7 +93,7 @@ void CItem::Spawn( void ) @@ -93,7 +93,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( &ItemTouch);
if (DROP_TO_FLOOR(ENT(pev)) == 0)
{
@ -125,7 +125,7 @@ void CItem::ItemTouch( CBaseEntity *pOther ) @@ -125,7 +125,7 @@ void CItem::ItemTouch( CBaseEntity *pOther )
if (MyTouch( pPlayer ))
{
SUB_UseTargets( pOther, USE_TOGGLE, 0 );
ResetTouch();
SetTouch( NULL );
// player grabbed the item.
g_pGameRules->PlayerGotItem( pPlayer, this );
@ -146,12 +146,12 @@ void CItem::ItemTouch( CBaseEntity *pOther ) @@ -146,12 +146,12 @@ void CItem::ItemTouch( CBaseEntity *pOther )
CBaseEntity* CItem::Respawn( void )
{
ResetTouch();
SetTouch( NULL );
pev->effects |= EF_NODRAW;
UTIL_SetOrigin( pev, g_pGameRules->VecItemRespawnSpot( this ) );// blip to whereever you should respawn.
SetThink ( Materialize );
SetThink( &Materialize );
pev->nextthink = g_pGameRules->FlItemRespawnTime( this );
return this;
}
@ -166,7 +166,7 @@ void CItem::Materialize( void ) @@ -166,7 +166,7 @@ void CItem::Materialize( void )
pev->effects |= EF_MUZZLEFLASH;
}
SetTouch( ItemTouch );
SetTouch( &ItemTouch );
}
#define SF_SUIT_SHORTLOGON 0x0001

10
dlls/leech.cpp

@ -196,9 +196,9 @@ void CLeech::Spawn( void ) @@ -196,9 +196,9 @@ void CLeech::Spawn( void )
m_flFieldOfView = -0.5; // 180 degree FOV
m_flDistLook = 750;
MonsterInit();
SetThink( SwimThink );
ResetUse();
ResetTouch();
SetThink( &SwimThink );
SetUse( NULL );
SetTouch( NULL );
pev->view_ofs = g_vecZero;
m_flTurning = 0;
@ -426,7 +426,7 @@ void CLeech::DeadThink( void ) @@ -426,7 +426,7 @@ void CLeech::DeadThink( void )
{
if ( m_Activity == ACT_DIEFORWARD )
{
ResetThink();
SetThink( NULL );
StopAnimation();
return;
}
@ -717,7 +717,7 @@ void CLeech::Killed(entvars_t *pevAttacker, int iGib) @@ -717,7 +717,7 @@ void CLeech::Killed(entvars_t *pevAttacker, int iGib)
pev->movetype = MOVETYPE_TOSS;
pev->takedamage = DAMAGE_NO;
SetThink( DeadThink );
SetThink( &DeadThink );
}

18
dlls/monstermaker.cpp

@ -111,29 +111,29 @@ void CMonsterMaker :: Spawn( ) @@ -111,29 +111,29 @@ void CMonsterMaker :: Spawn( )
{
if ( pev->spawnflags & SF_MONSTERMAKER_CYCLIC )
{
SetUse ( CyclicUse );// drop one monster each time we fire
SetUse( &CyclicUse );// drop one monster each time we fire
}
else
{
SetUse ( ToggleUse );// so can be turned on/off
SetUse( &ToggleUse );// so can be turned on/off
}
if ( FBitSet ( pev->spawnflags, SF_MONSTERMAKER_START_ON ) )
{// start making monsters as soon as monstermaker spawns
m_fActive = TRUE;
SetThink ( MakerThink );
SetThink( &MakerThink );
}
else
{// wait to be activated.
m_fActive = FALSE;
SetThink ( SUB_DoNothing );
SetThink( &SUB_DoNothing );
}
}
else
{// no targetname, just start.
pev->nextthink = gpGlobals->time + m_flDelay;
m_fActive = TRUE;
SetThink ( MakerThink );
SetThink( &MakerThink );
}
if ( m_cNumMonsters == 1 )
@ -229,8 +229,8 @@ void CMonsterMaker::MakeMonster( void ) @@ -229,8 +229,8 @@ void CMonsterMaker::MakeMonster( void )
if ( m_cNumMonsters == 0 )
{
// Disable this forever. Don't kill it because it still gets death notices
ResetThink();
ResetUse();
SetThink( NULL );
SetUse( NULL );
}
}
@ -254,12 +254,12 @@ void CMonsterMaker :: ToggleUse ( CBaseEntity *pActivator, CBaseEntity *pCaller, @@ -254,12 +254,12 @@ void CMonsterMaker :: ToggleUse ( CBaseEntity *pActivator, CBaseEntity *pCaller,
if ( m_fActive )
{
m_fActive = FALSE;
ResetThink();
SetThink( NULL );
}
else
{
m_fActive = TRUE;
SetThink ( MakerThink );
SetThink( &MakerThink );
}
pev->nextthink = gpGlobals->time;

10
dlls/monsters.cpp

@ -2044,9 +2044,9 @@ void CBaseMonster :: MonsterInit ( void ) @@ -2044,9 +2044,9 @@ void CBaseMonster :: MonsterInit ( void )
// set eye position
SetEyePosition();
SetThink( MonsterInitThink );
SetThink( &MonsterInitThink );
pev->nextthink = gpGlobals->time + 0.1;
SetUse ( MonsterUse );
SetUse( &MonsterUse );
}
//=========================================================
@ -2146,7 +2146,7 @@ void CBaseMonster :: StartMonster ( void ) @@ -2146,7 +2146,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( &CallMonsterThink );
pev->nextthink += RANDOM_FLOAT(0.1, 0.4); // spread think times.
if ( !FStringNull(pev->targetname) )// wait until triggered
@ -3259,7 +3259,7 @@ void CBaseMonster::CorpseFallThink( void ) @@ -3259,7 +3259,7 @@ void CBaseMonster::CorpseFallThink( void )
{
if ( pev->flags & FL_ONGROUND )
{
ResetThink();
SetThink( NULL );
SetSequenceBox( );
UTIL_SetOrigin( pev, pev->origin );// link into world.
@ -3289,7 +3289,7 @@ void CBaseMonster :: MonsterInitDead( void ) @@ -3289,7 +3289,7 @@ void CBaseMonster :: MonsterInitDead( void )
// Setup health counters, etc.
BecomeDead();
SetThink( CorpseFallThink );
SetThink( &CorpseFallThink );
pev->nextthink = gpGlobals->time + 0.5;
}

6
dlls/mortar.cpp

@ -105,7 +105,7 @@ void CFuncMortarField :: Spawn( void ) @@ -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( &FieldUse );
Precache();
}
@ -209,7 +209,7 @@ void CMortar::Spawn( ) @@ -209,7 +209,7 @@ void CMortar::Spawn( )
pev->dmg = 200;
SetThink( MortarExplode );
SetThink( &MortarExplode );
pev->nextthink = 0;
Precache( );
@ -300,7 +300,7 @@ void CMortar::MortarExplode( void ) @@ -300,7 +300,7 @@ void CMortar::MortarExplode( void )
}
*/
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
#endif

4
dlls/mpstubb.cpp

@ -50,7 +50,7 @@ void CBaseMonster::CorpseFallThink( void ) @@ -50,7 +50,7 @@ void CBaseMonster::CorpseFallThink( void )
{
if ( pev->flags & FL_ONGROUND )
{
ResetThink();
SetThink( NULL );
SetSequenceBox( );
UTIL_SetOrigin( pev, pev->origin );// link into world.
@ -79,7 +79,7 @@ void CBaseMonster :: MonsterInitDead( void ) @@ -79,7 +79,7 @@ void CBaseMonster :: MonsterInitDead( void )
// Setup health counters, etc.
BecomeDead();
SetThink( CorpseFallThink );
SetThink( &CorpseFallThink );
pev->nextthink = gpGlobals->time + 0.5;
}

38
dlls/nihilanth.cpp

@ -300,7 +300,7 @@ void CNihilanth :: Spawn( void ) @@ -300,7 +300,7 @@ void CNihilanth :: Spawn( void )
InitBoneControllers();
SetThink( StartupThink );
SetThink( &StartupThink );
pev->nextthink = gpGlobals->time + 0.1;
m_vecDesired = Vector( 1, 0, 0 );
@ -378,9 +378,9 @@ void CNihilanth::NullThink( void ) @@ -378,9 +378,9 @@ void CNihilanth::NullThink( void )
void CNihilanth::StartupUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetThink( HuntThink );
SetThink( &HuntThink );
pev->nextthink = gpGlobals->time + 0.1;
SetUse( CommandUse );
SetUse( &CommandUse );
}
@ -410,8 +410,8 @@ void CNihilanth::StartupThink( void ) @@ -410,8 +410,8 @@ void CNihilanth::StartupThink( void )
}
m_hRecharger = NULL;
SetThink( HuntThink);
SetUse( CommandUse );
SetThink( &HuntThink);
SetUse( &CommandUse );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -544,7 +544,7 @@ void CNihilanth::CrashTouch( CBaseEntity *pOther ) @@ -544,7 +544,7 @@ void CNihilanth::CrashTouch( CBaseEntity *pOther )
// only crash if we hit something solid
if ( pOther->pev->solid == SOLID_BSP)
{
ResetTouch();
SetTouch( NULL );
pev->nextthink = gpGlobals->time;
}
}
@ -846,7 +846,7 @@ void CNihilanth :: HuntThink( void ) @@ -846,7 +846,7 @@ void CNihilanth :: HuntThink( void )
// if dead, force cancelation of current animation
if (pev->health <= 0)
{
SetThink( DyingThink );
SetThink( &DyingThink );
m_fSequenceFinished = TRUE;
return;
}
@ -1330,8 +1330,8 @@ void CNihilanthHVR :: CircleInit( CBaseEntity *pTarget ) @@ -1330,8 +1330,8 @@ void CNihilanthHVR :: CircleInit( CBaseEntity *pTarget )
UTIL_SetSize(pev, Vector( 0, 0, 0), Vector(0, 0, 0));
UTIL_SetOrigin( pev, pev->origin );
SetThink( HoverThink );
SetTouch( BounceTouch );
SetThink( &HoverThink );
SetTouch( &BounceTouch );
pev->nextthink = gpGlobals->time + 0.1;
m_hTargetEnt = pTarget;
@ -1433,8 +1433,8 @@ void CNihilanthHVR :: ZapInit( CBaseEntity *pEnemy ) @@ -1433,8 +1433,8 @@ void CNihilanthHVR :: ZapInit( CBaseEntity *pEnemy )
pev->velocity = (pEnemy->pev->origin - pev->origin).Normalize() * 200;
m_hEnemy = pEnemy;
SetThink( ZapThink );
SetTouch( ZapTouch );
SetThink( &ZapThink );
SetTouch( &ZapTouch );
pev->nextthink = gpGlobals->time + 0.1;
EMIT_SOUND_DYN( edict(), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0, 100 );
@ -1447,7 +1447,7 @@ void CNihilanthHVR :: ZapThink( void ) @@ -1447,7 +1447,7 @@ void CNihilanthHVR :: ZapThink( void )
// check world boundaries
if (m_hEnemy == NULL || pev->origin.x < -4096 || pev->origin.x > 4096 || pev->origin.y < -4096 || pev->origin.y > 4096 || pev->origin.z < -4096 || pev->origin.z > 4096)
{
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
return;
}
@ -1495,7 +1495,7 @@ void CNihilanthHVR :: ZapThink( void ) @@ -1495,7 +1495,7 @@ void CNihilanthHVR :: ZapThink( void )
UTIL_EmitAmbientSound( edict(), tr.vecEndPos, "weapons/electro4.wav", 0.5, ATTN_NORM, 0, RANDOM_LONG( 140, 160 ) );
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
pev->nextthink = gpGlobals->time + 0.2;
return;
@ -1535,7 +1535,7 @@ void CNihilanthHVR::ZapTouch( CBaseEntity *pOther ) @@ -1535,7 +1535,7 @@ void CNihilanthHVR::ZapTouch( CBaseEntity *pOther )
}
*/
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
pev->nextthink = gpGlobals->time + 0.2;
}
@ -1559,8 +1559,8 @@ void CNihilanthHVR :: TeleportInit( CNihilanth *pOwner, CBaseEntity *pEnemy, CBa @@ -1559,8 +1559,8 @@ void CNihilanthHVR :: TeleportInit( CNihilanth *pOwner, CBaseEntity *pEnemy, CBa
m_hTargetEnt = pTarget;
m_hTouch = pTouch;
SetThink( TeleportThink );
SetTouch( TeleportTouch );
SetThink( &TeleportThink );
SetTouch( &TeleportTouch );
pev->nextthink = gpGlobals->time + 0.1;
EMIT_SOUND_DYN( edict(), CHAN_WEAPON, "x/x_teleattack1.wav", 1, 0.2, 0, 100 );
@ -1579,7 +1579,7 @@ void CNihilanthHVR :: GreenBallInit( ) @@ -1579,7 +1579,7 @@ void CNihilanthHVR :: GreenBallInit( )
SET_MODEL(edict(), "sprites/exit1.spr");
SetTouch( RemoveTouch );
SetTouch( &RemoveTouch );
}
@ -1631,7 +1631,7 @@ void CNihilanthHVR :: TeleportThink( void ) @@ -1631,7 +1631,7 @@ void CNihilanthHVR :: TeleportThink( void )
void CNihilanthHVR :: AbsorbInit( void )
{
SetThink( DissipateThink );
SetThink( &DissipateThink );
pev->renderamt = 255;
MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );
@ -1669,7 +1669,7 @@ void CNihilanthHVR::TeleportTouch( CBaseEntity *pOther ) @@ -1669,7 +1669,7 @@ void CNihilanthHVR::TeleportTouch( CBaseEntity *pOther )
m_pNihilanth->MakeFriend( pev->origin );
}
ResetTouch();
SetTouch( NULL );
STOP_SOUND(edict(), CHAN_WEAPON, "x/x_teleattack1.wav" );
UTIL_Remove( this );
}

12
dlls/nodes.cpp

@ -1459,12 +1459,12 @@ void CTestHull :: Spawn( entvars_t *pevMasterNode ) @@ -1459,12 +1459,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( &SUB_Remove );
pev->nextthink = gpGlobals->time;
}
else
{
SetThink ( DropDelay );
SetThink( &DropDelay );
pev->nextthink = gpGlobals->time + 1;
}
@ -1484,7 +1484,7 @@ void CTestHull::DropDelay ( void ) @@ -1484,7 +1484,7 @@ void CTestHull::DropDelay ( void )
UTIL_SetOrigin ( VARS(pev), WorldGraph.m_pNodes[ 0 ].m_vecOrigin );
SetThink ( CallBuildNodeGraph );
SetThink( &CallBuildNodeGraph );
pev->nextthink = gpGlobals->time + 1;
}
@ -1632,7 +1632,7 @@ void CTestHull :: BuildNodeGraph( void ) @@ -1632,7 +1632,7 @@ void CTestHull :: BuildNodeGraph( void )
float flDist;
int step;
SetThink ( SUB_Remove );// no matter what happens, the hull gets rid of itself.
SetThink( &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.
@ -1744,7 +1744,7 @@ void CTestHull :: BuildNodeGraph( void ) @@ -1744,7 +1744,7 @@ void CTestHull :: BuildNodeGraph( void )
{
ALERT ( at_aiconsole, "**ConnectVisibleNodes FAILED!\n" );
SetThink ( ShowBadNode );// send the hull off to show the offending node.
SetThink( &ShowBadNode );// send the hull off to show the offending node.
//pev->solid = SOLID_NOT;
pev->origin = WorldGraph.m_pNodes[ iBadNode ].m_vecOrigin;
@ -3559,7 +3559,7 @@ void CNodeViewer::Spawn( ) @@ -3559,7 +3559,7 @@ void CNodeViewer::Spawn( )
ALERT( at_aiconsole, "%d nodes\n", m_nVisited );
m_iDraw = 0;
SetThink( DrawThink );
SetThink( &DrawThink );
pev->nextthink = gpGlobals->time;
}

20
dlls/osprey.cpp

@ -167,8 +167,8 @@ void COsprey :: Spawn( void ) @@ -167,8 +167,8 @@ void COsprey :: Spawn( void )
InitBoneControllers();
SetThink( FindAllThink );
SetUse( CommandUse );
SetThink( &FindAllThink );
SetUse( &CommandUse );
if (!(pev->spawnflags & SF_WAITFORTRIGGER))
{
@ -225,7 +225,7 @@ void COsprey :: FindAllThink( void ) @@ -225,7 +225,7 @@ void COsprey :: FindAllThink( void )
UTIL_Remove( this );
return;
}
SetThink( FlyThink );
SetThink( &FlyThink );
pev->nextthink = gpGlobals->time + 0.1;
m_startTime = gpGlobals->time;
}
@ -257,7 +257,7 @@ void COsprey :: DeployThink( void ) @@ -257,7 +257,7 @@ void COsprey :: DeployThink( void )
vecSrc = pev->origin + vecForward * -64 + vecRight * -100 + vecUp * -96;
m_hRepel[3] = MakeGrunt( vecSrc );
SetThink( HoverThink );
SetThink( &HoverThink );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -308,7 +308,7 @@ CBaseMonster *COsprey :: MakeGrunt( Vector vecSrc ) @@ -308,7 +308,7 @@ CBaseMonster *COsprey :: MakeGrunt( Vector vecSrc )
pBeam->PointEntInit( vecSrc + Vector(0,0,112), pGrunt->entindex() );
pBeam->SetFlags( BEAM_FSOLID );
pBeam->SetColor( 255, 255, 255 );
pBeam->SetThink( SUB_Remove );
pBeam->SetThink( &SUB_Remove );
pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5;
// ALERT( at_console, "%d at %.0f %.0f %.0f\n", i, m_vecOrigin[i].x, m_vecOrigin[i].y, m_vecOrigin[i].z );
@ -336,7 +336,7 @@ void COsprey :: HoverThink( void ) @@ -336,7 +336,7 @@ void COsprey :: HoverThink( void )
if (i == 4)
{
m_startTime = gpGlobals->time;
SetThink( FlyThink );
SetThink( &FlyThink );
}
pev->nextthink = gpGlobals->time + 0.1;
@ -396,7 +396,7 @@ void COsprey::FlyThink( void ) @@ -396,7 +396,7 @@ void COsprey::FlyThink( void )
{
if (m_pGoalEnt->pev->speed == 0)
{
SetThink( DeployThink );
SetThink( &DeployThink );
}
do {
m_pGoalEnt = CBaseEntity::Instance( FIND_ENTITY_BY_TARGETNAME ( NULL, STRING( m_pGoalEnt->pev->target ) ) );
@ -518,8 +518,8 @@ void COsprey :: Killed( entvars_t *pevAttacker, int iGib ) @@ -518,8 +518,8 @@ void COsprey :: Killed( entvars_t *pevAttacker, int iGib )
STOP_SOUND( ENT(pev), CHAN_STATIC, "apache/ap_rotor4.wav" );
UTIL_SetSize( pev, Vector( -32, -32, -64), Vector( 32, 32, 0) );
SetThink( DyingThink );
SetTouch( CrashTouch );
SetThink( &DyingThink );
SetTouch( &CrashTouch );
pev->nextthink = gpGlobals->time + 0.1;
pev->health = 0;
pev->takedamage = DAMAGE_NO;
@ -532,7 +532,7 @@ void COsprey::CrashTouch( CBaseEntity *pOther ) @@ -532,7 +532,7 @@ void COsprey::CrashTouch( CBaseEntity *pOther )
// only crash if we hit something solid
if ( pOther->pev->solid == SOLID_BSP)
{
ResetTouch();
SetTouch( NULL );
m_startTime = gpGlobals->time;
pev->nextthink = gpGlobals->time;
m_velocity = pev->velocity;

2
dlls/pathcorner.cpp

@ -221,7 +221,7 @@ void CPathTrack :: Spawn( void ) @@ -221,7 +221,7 @@ void CPathTrack :: Spawn( void )
m_pprevious = NULL;
// DEBUGGING CODE
#if PATH_SPARKLE_DEBUG
SetThink( Sparkle );
SetThink( &Sparkle );
pev->nextthink = gpGlobals->time + 0.5;
#endif
}

62
dlls/plats.cpp

@ -328,7 +328,7 @@ void CFuncPlat :: Spawn( ) @@ -328,7 +328,7 @@ void CFuncPlat :: Spawn( )
{
UTIL_SetOrigin (pev, m_vecPosition1);
m_toggle_state = TS_AT_TOP;
SetUse( PlatUse );
SetUse( &PlatUse );
}
else
{
@ -417,7 +417,7 @@ void CFuncPlat :: PlatUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY @@ -417,7 +417,7 @@ void CFuncPlat :: PlatUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY
}
else
{
ResetUse();
SetUse( NULL );
if (m_toggle_state == TS_AT_TOP)
GoDown();
@ -435,7 +435,7 @@ void CFuncPlat :: GoDown( void ) @@ -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( &CallHitBottom);
LinearMove(m_vecPosition2, pev->speed);
}
@ -466,7 +466,7 @@ void CFuncPlat :: GoUp( void ) @@ -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( &CallHitTop);
LinearMove(m_vecPosition1, pev->speed);
}
@ -488,7 +488,7 @@ void CFuncPlat :: HitTop( void ) @@ -488,7 +488,7 @@ void CFuncPlat :: HitTop( void )
if ( !IsTogglePlat() )
{
// After a delay, the platform will automatically start going down again.
SetThink( CallGoDown );
SetThink( &CallGoDown );
pev->nextthink = pev->ltime + 3;
}
}
@ -738,7 +738,7 @@ void CFuncTrain :: Wait( void ) @@ -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( &Next );
}
else
{
@ -802,7 +802,7 @@ void CFuncTrain :: Next( void ) @@ -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( &Wait );
LinearMove (pTarg->pev->origin - (pev->mins + pev->maxs)* 0.5, pev->speed);
}
}
@ -824,7 +824,7 @@ void CFuncTrain :: Activate( void ) @@ -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( &Next );
}
else
pev->spawnflags |= SF_TRAIN_WAIT_RETRIGGER;
@ -920,7 +920,7 @@ void CFuncTrain::OverrideReset( void ) @@ -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( &Next );
pev->nextthink = pev->ltime + 0.1;
}
}
@ -1047,7 +1047,7 @@ void CFuncTrackTrain :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ @@ -1047,7 +1047,7 @@ void CFuncTrackTrain :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
pev->velocity = g_vecZero;
pev->avelocity = g_vecZero;
StopSound();
ResetThink();
SetThink( NULL );
}
}
else
@ -1262,7 +1262,7 @@ void CFuncTrackTrain :: Next( void ) @@ -1262,7 +1262,7 @@ void CFuncTrackTrain :: Next( void )
}
}
SetThink( Next );
SetThink( &Next );
NextThink( pev->ltime + time, TRUE );
}
else // end of path, stop
@ -1284,7 +1284,7 @@ void CFuncTrackTrain :: Next( void ) @@ -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( &DeadEnd );
NextThink( pev->ltime + time, FALSE );
}
else
@ -1402,7 +1402,7 @@ void CFuncTrackTrain :: Find( void ) @@ -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( &Next );
pev->speed = m_startSpeed;
UpdateSound();
@ -1434,7 +1434,7 @@ void CFuncTrackTrain :: NearestPath( void ) @@ -1434,7 +1434,7 @@ void CFuncTrackTrain :: NearestPath( void )
if ( !pNearest )
{
ALERT( at_console, "Can't find a nearby track !!!\n" );
ResetThink();
SetThink( NULL );
return;
}
@ -1452,7 +1452,7 @@ void CFuncTrackTrain :: NearestPath( void ) @@ -1452,7 +1452,7 @@ void CFuncTrackTrain :: NearestPath( void )
if ( pev->speed != 0 )
{
NextThink( pev->ltime + 0.1, FALSE );
SetThink( Next );
SetThink( &Next );
}
}
@ -1460,7 +1460,7 @@ void CFuncTrackTrain :: NearestPath( void ) @@ -1460,7 +1460,7 @@ void CFuncTrackTrain :: NearestPath( void )
void CFuncTrackTrain::OverrideReset( void )
{
NextThink( pev->ltime + 0.1, FALSE );
SetThink( NearestPath );
SetThink( &NearestPath );
}
@ -1519,7 +1519,7 @@ void CFuncTrackTrain :: Spawn( void ) @@ -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( &Find );
Precache();
}
@ -1589,7 +1589,7 @@ void CFuncTrainControls :: Spawn( void ) @@ -1589,7 +1589,7 @@ void CFuncTrainControls :: Spawn( void )
UTIL_SetSize( pev, pev->mins, pev->maxs );
UTIL_SetOrigin( pev, pev->origin );
SetThink( Find );
SetThink( &Find );
pev->nextthink = gpGlobals->time;
}
@ -1701,7 +1701,7 @@ void CFuncTrackChange :: Spawn( void ) @@ -1701,7 +1701,7 @@ void CFuncTrackChange :: Spawn( void )
EnableUse();
pev->nextthink = pev->ltime + 2.0;
SetThink( Find );
SetThink( &Find );
Precache();
}
@ -1752,7 +1752,7 @@ void CFuncTrackChange :: KeyValue( KeyValueData *pkvd ) @@ -1752,7 +1752,7 @@ void CFuncTrackChange :: KeyValue( KeyValueData *pkvd )
void CFuncTrackChange::OverrideReset( void )
{
pev->nextthink = pev->ltime + 1.0;
SetThink( Find );
SetThink( &Find );
}
void CFuncTrackChange :: Find( void )
@ -1781,7 +1781,7 @@ void CFuncTrackChange :: Find( void ) @@ -1781,7 +1781,7 @@ void CFuncTrackChange :: Find( void )
m_trackBottom = m_trackBottom->Nearest( center );
m_trackTop = m_trackTop->Nearest( center );
UpdateAutoTargets( m_toggle_state );
ResetThink();
SetThink( NULL );
return;
}
else
@ -1862,14 +1862,14 @@ void CFuncTrackChange :: GoDown( void ) @@ -1862,14 +1862,14 @@ void CFuncTrackChange :: GoDown( void )
// If ROTMOVE, move & rotate
if ( FBitSet( pev->spawnflags, SF_TRACK_DONT_MOVE ) )
{
SetMoveDone( CallHitBottom );
SetMoveDone( &CallHitBottom );
m_toggle_state = TS_GOING_DOWN;
AngularMove( m_start, pev->speed );
}
else
{
CFuncPlat :: GoDown();
SetMoveDone( CallHitBottom );
SetMoveDone( &CallHitBottom );
RotMove( m_start, pev->nextthink - pev->ltime );
}
// Otherwise, rotate first, move second
@ -1898,14 +1898,14 @@ void CFuncTrackChange :: GoUp( void ) @@ -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( &CallHitTop );
AngularMove( m_end, pev->speed );
}
else
{
// If ROTMOVE, move & rotate
CFuncPlat :: GoUp();
SetMoveDone( CallHitTop );
SetMoveDone( &CallHitTop );
RotMove( m_end, pev->nextthink - pev->ltime );
}
@ -1980,7 +1980,7 @@ void CFuncTrackChange :: HitBottom( void ) @@ -1980,7 +1980,7 @@ void CFuncTrackChange :: HitBottom( void )
// UpdateTrain();
m_train->SetTrack( m_trackBottom );
}
ResetThink();
SetThink( NULL );
pev->nextthink = -1;
UpdateAutoTargets( m_toggle_state );
@ -2002,7 +2002,7 @@ void CFuncTrackChange :: HitTop( void ) @@ -2002,7 +2002,7 @@ void CFuncTrackChange :: HitTop( void )
}
// Don't let the plat go back down
ResetThink();
SetThink( NULL );
pev->nextthink = -1;
UpdateAutoTargets( m_toggle_state );
EnableUse();
@ -2160,7 +2160,7 @@ void CGunTarget::Spawn( void ) @@ -2160,7 +2160,7 @@ void CGunTarget::Spawn( void )
if ( pev->spawnflags & FGUNTARGET_START_ON )
{
SetThink( Start );
SetThink( &Start );
pev->nextthink = pev->ltime + 0.3;
}
}
@ -2188,7 +2188,7 @@ void CGunTarget::Start( void ) @@ -2188,7 +2188,7 @@ void CGunTarget::Start( void )
void CGunTarget::Next( void )
{
ResetThink();
SetThink( NULL );
m_hTargetEnt = GetNextTarget();
CBaseEntity *pTarget = m_hTargetEnt;
@ -2198,7 +2198,7 @@ void CGunTarget::Next( void ) @@ -2198,7 +2198,7 @@ void CGunTarget::Next( void )
Stop();
return;
}
SetMoveDone( Wait );
SetMoveDone( &Wait );
LinearMove( pTarget->pev->origin - (pev->mins + pev->maxs) * 0.5, pev->speed );
}
@ -2224,7 +2224,7 @@ void CGunTarget::Wait( void ) @@ -2224,7 +2224,7 @@ void CGunTarget::Wait( void )
m_flWait = pTarget->GetDelay();
pev->target = pTarget->pev->target;
SetThink( Next );
SetThink( &Next );
if (m_flWait != 0)
{// -1 wait will wait forever!
pev->nextthink = pev->ltime + m_flWait;

16
dlls/player.cpp

@ -774,7 +774,7 @@ void CBasePlayer::PackDeadPlayerItems( void ) @@ -774,7 +774,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;
// back these two lists up to their first elements
@ -933,7 +933,7 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib ) @@ -933,7 +933,7 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib )
pev->angles.x = 0;
pev->angles.z = 0;
SetThink(PlayerDeathThink);
SetThink( &PlayerDeathThink);
pev->nextthink = gpGlobals->time + 0.1;
}
@ -3209,7 +3209,7 @@ void CBloodSplat::Spawn ( entvars_t *pevOwner ) @@ -3209,7 +3209,7 @@ void CBloodSplat::Spawn ( entvars_t *pevOwner )
pev->angles = pevOwner->v_angle;
pev->owner = ENT(pevOwner);
SetThink ( Spray );
SetThink( &Spray );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -3224,7 +3224,7 @@ void CBloodSplat::Spray ( void ) @@ -3224,7 +3224,7 @@ void CBloodSplat::Spray ( void )
UTIL_BloodDecalTrace( &tr, BLOOD_COLOR_RED );
}
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -3587,7 +3587,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) @@ -3587,7 +3587,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse )
if ( pEntity )
{
if ( pEntity->pev->takedamage )
pEntity->SetThink(SUB_Remove);
pEntity->SetThink( &SUB_Remove);
}
break;
}
@ -3663,7 +3663,7 @@ int CBasePlayer::RemovePlayerItem( CBasePlayerItem *pItem ) @@ -3663,7 +3663,7 @@ int CBasePlayer::RemovePlayerItem( CBasePlayerItem *pItem )
ResetAutoaim( );
pItem->Holster( );
pItem->pev->nextthink = 0;// crowbar may be trying to swing again, etc.
pItem->ResetThink();
pItem->SetThink( NULL );
m_pActiveItem = NULL;
pev->viewmodel = 0;
pev->weaponmodel = 0;
@ -4726,7 +4726,7 @@ void CRevertSaved :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP @@ -4726,7 +4726,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( &MessageThink );
}
@ -4737,7 +4737,7 @@ void CRevertSaved :: MessageThink( void ) @@ -4737,7 +4737,7 @@ void CRevertSaved :: MessageThink( void )
if ( nextThink > 0 )
{
pev->nextthink = gpGlobals->time + nextThink;
SetThink( LoadThink );
SetThink( &LoadThink );
}
else
LoadThink();

24
dlls/prop.cpp

@ -566,7 +566,7 @@ void CProp::Killed(entvars_t *pevAttacker, int iGib) @@ -566,7 +566,7 @@ void CProp::Killed(entvars_t *pevAttacker, int iGib)
pev->solid = SOLID_NOT;
pev->effects |= EF_NODRAW;
pev->nextthink = gpGlobals->time + m_flRespawnTime;
SetThink( CProp::RespawnThink );
SetThink( &CProp::RespawnThink );
ResetTouch( );
ResetUse( );
}
@ -605,7 +605,7 @@ void CProp::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, @@ -605,7 +605,7 @@ void CProp::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType,
m_pHolstered->pev->weaponmodel = 0;
m_pHolstered->pev->viewmodel = 0;
}
SetThink( CProp::DeployThink );
SetThink( &CProp::DeployThink );
pev->nextthink = gpGlobals->time + 0.2;
}
}
@ -664,7 +664,7 @@ void CProp::Force(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTyp @@ -664,7 +664,7 @@ void CProp::Force(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTyp
}
pev->nextthink = gpGlobals->time + m_flRespawnTime;
SetThink(CProp::RespawnThink);
SetThink( &CProp::RespawnThink);
}
void CProp::CheckRotate()
@ -739,7 +739,7 @@ void CProp::DeployThink( void ) @@ -739,7 +739,7 @@ void CProp::DeployThink( void )
if( m_pfnThink == &CProp::DeployThink )
{
pev->nextthink = gpGlobals->time + m_flRespawnTime;
SetThink( CProp::RespawnThink );
SetThink( &CProp::RespawnThink );
}
}
@ -899,8 +899,8 @@ void CProp::PropRespawn() @@ -899,8 +899,8 @@ void CProp::PropRespawn()
m_oldshape = (PropShape)-1;
CheckRotate();
pev->health = m_flSpawnHealth;
SetTouch(CProp::BounceTouch);
SetUse(CProp::Use);
SetTouch( &CProp::BounceTouch);
SetUse( &CProp::Use);
pev->effects &= ~EF_NODRAW;
pev->framerate = 1.0f;
}
@ -917,7 +917,7 @@ void CProp::RespawnThink() @@ -917,7 +917,7 @@ void CProp::RespawnThink()
void CProp::AngleThink()
{
pev->nextthink = gpGlobals->time + m_flRespawnTime;
SetThink(CProp::RespawnThink);
SetThink( &CProp::RespawnThink);
if (!(pev->flags & FL_ONGROUND || fabs(pev->velocity.z) < 40))
{
m_owner2 = m_attacker = 0;
@ -928,7 +928,7 @@ void CProp::AngleThink() @@ -928,7 +928,7 @@ void CProp::AngleThink()
pev->angles.z += UTIL_AngleDiff(90, pev->angles.z) * 0.7;
if (fabs(UTIL_AngleDiff(90, pev->angles.z)) > 0.1)
{
SetThink(CProp::AngleThink);
SetThink( &CProp::AngleThink);
pev->nextthink = gpGlobals->time + 0.1;
}
//ALERT( at_console, "AngleThink: %f %f %f\n", pev->angles.x, pev->angles.y, pev->angles.z );
@ -938,7 +938,7 @@ void CProp::AngleThink() @@ -938,7 +938,7 @@ void CProp::AngleThink()
{
if (fabs(UTIL_AngleDiff(90, pev->angles.z)) > 0.1)
{
SetThink(CProp::AngleThink);
SetThink( &CProp::AngleThink);
pev->nextthink = gpGlobals->time + 0.1;
}
pev->angles.z += UTIL_AngleDiff(0, pev->angles.z) * 0.7;
@ -955,7 +955,7 @@ void CProp::AngleThink() @@ -955,7 +955,7 @@ void CProp::AngleThink()
//fabs(UTIL_AngleDiff(iangles.y, pev->angles.y)) > 0.1 ||
fabs(UTIL_AngleDiff(iangles.z, pev->angles.z)) > 0.1)
{
SetThink(CProp::AngleThink);
SetThink( &CProp::AngleThink);
pev->nextthink = gpGlobals->time + 0.1;
}
pev->angles.x += UTIL_AngleDiff(iangles.x, pev->angles.x) * 0.6;
@ -972,7 +972,7 @@ void CProp::AngleThink() @@ -972,7 +972,7 @@ void CProp::AngleThink()
fabs(UTIL_AngleDiff(iangles.y, pev->angles.y)) > 0.1 ||
fabs(UTIL_AngleDiff(iangles.z, pev->angles.z)) > 0.1)
{
SetThink(CProp::AngleThink);
SetThink( &CProp::AngleThink);
pev->nextthink = gpGlobals->time + 0.1;
}
pev->angles.x += UTIL_AngleDiff(iangles.x, pev->angles.x) * 0.6;
@ -1006,7 +1006,7 @@ void CProp::AngleThink() @@ -1006,7 +1006,7 @@ void CProp::AngleThink()
if (fabs(UTIL_AngleDiff(ianglex, pev->angles.x)) > 0.1 ||
fabs(UTIL_AngleDiff(ianglez, pev->angles.z)) > 0.1 )
{
SetThink(CProp::AngleThink);
SetThink( &CProp::AngleThink);
pev->nextthink = gpGlobals->time + 0.1;
}
pev->angles.x += UTIL_AngleDiff(ianglex, pev->angles.x) * 0.6;

5
dlls/replace.sh

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
f="effects.h *.cpp"
for m in SetThink SetTouch SetUse SetBlocked SetMoveDone; do
m2=`echo $m|sed -e s/Set/Reset/`
sed -e s/$m[[:space:]]\*\([[:space:]]\*/$m\(/g -e s/$m\([[:space:]]\*\\\&/$m\(/g -e s/$m\([[:space:]]\*NULL[[:space:]]\)/$m2\(\)/g -e s/$m\([[:space:]]*/$m\(\ \\\&/g -e s/$m2\(\)/$m\(\ NULL\ \)/g -i $f
done

12
dlls/rpg.cpp

@ -80,7 +80,7 @@ void CLaserSpot::Suspend( float flSuspendTime ) @@ -80,7 +80,7 @@ void CLaserSpot::Suspend( float flSuspendTime )
{
pev->effects |= EF_NODRAW;
SetThink( Revive );
SetThink( &Revive );
pev->nextthink = gpGlobals->time + flSuspendTime;
}
@ -91,7 +91,7 @@ void CLaserSpot::Revive( void ) @@ -91,7 +91,7 @@ void CLaserSpot::Revive( void )
{
pev->effects &= ~EF_NODRAW;
ResetThink();
SetThink( NULL );
}
void CLaserSpot::Precache( void )
@ -110,7 +110,7 @@ CRpgRocket *CRpgRocket::CreateRpgRocket( Vector vecOrigin, Vector vecAngles, CBa @@ -110,7 +110,7 @@ CRpgRocket *CRpgRocket::CreateRpgRocket( Vector vecOrigin, Vector vecAngles, CBa
UTIL_SetOrigin( pRocket->pev, vecOrigin );
pRocket->pev->angles = vecAngles;
pRocket->Spawn();
pRocket->SetTouch( CRpgRocket::RocketTouch );
pRocket->SetTouch( &CRpgRocket::RocketTouch );
pRocket->m_pLauncher = pLauncher;// remember what RPG fired me.
pRocket->m_pLauncher->m_cActiveRockets++;// register this missile as active for the launcher
pRocket->pev->owner = pOwner->edict();
@ -133,8 +133,8 @@ void CRpgRocket :: Spawn( void ) @@ -133,8 +133,8 @@ void CRpgRocket :: Spawn( void )
pev->classname = MAKE_STRING("rpg_rocket");
SetThink( IgniteThink );
SetTouch( ExplodeTouch );
SetThink( &IgniteThink );
SetTouch( &ExplodeTouch );
pev->angles.x -= 30;
UTIL_MakeVectors( pev->angles );
@ -200,7 +200,7 @@ void CRpgRocket :: IgniteThink( void ) @@ -200,7 +200,7 @@ void CRpgRocket :: IgniteThink( void )
m_flIgniteTime = gpGlobals->time;
// set to follow laser spot
SetThink( FollowThink );
SetThink( &FollowThink );
pev->nextthink = gpGlobals->time + 0.1;
}

8
dlls/satchel.cpp

@ -77,9 +77,9 @@ void CSatchelCharge :: Spawn( void ) @@ -77,9 +77,9 @@ void CSatchelCharge :: Spawn( void )
UTIL_SetSize(pev, Vector( -4, -4, -4), Vector(4, 4, 4)); // Uses point-sized, and can be stepped over
UTIL_SetOrigin( pev, pev->origin );
SetTouch( SatchelSlide );
SetUse( DetonateUse );
SetThink( SatchelThink );
SetTouch( &SatchelSlide );
SetUse( &DetonateUse );
SetThink( &SatchelThink );
pev->nextthink = gpGlobals->time + 0.1;
pev->gravity = 0.5;
@ -322,7 +322,7 @@ void CSatchel::Holster( int skiplocal /* = 0 */ ) @@ -322,7 +322,7 @@ void CSatchel::Holster( int skiplocal /* = 0 */ )
if ( !m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] && !m_chargeReady )
{
m_pPlayer->pev->weapons &= ~(1<<WEAPON_SATCHEL);
SetThink( DestroyItem );
SetThink( &DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}
}

2
dlls/schedule.cpp

@ -454,7 +454,7 @@ void CBaseMonster :: RunTask ( Task_t *pTask ) @@ -454,7 +454,7 @@ void CBaseMonster :: RunTask ( Task_t *pTask )
{
pev->deadflag = DEAD_DEAD;
ResetThink();
SetThink( NULL );
StopAnimation();
if ( !BBoxFlat() )

6
dlls/scientist.cpp

@ -686,7 +686,7 @@ void CScientist :: Spawn( void ) @@ -686,7 +686,7 @@ void CScientist :: Spawn( void )
pev->skin = 1;
MonsterInit();
SetUse( FollowerUse );
SetUse( &FollowerUse );
}
//=========================================================
@ -813,7 +813,7 @@ void CScientist :: DeathSound ( void ) @@ -813,7 +813,7 @@ void CScientist :: DeathSound ( void )
void CScientist::Killed( entvars_t *pevAttacker, int iGib )
{
ResetUse();
SetUse( NULL );
CTalkMonster::Killed( pevAttacker, iGib );
}
@ -1240,7 +1240,7 @@ void CSittingScientist :: Spawn( ) @@ -1240,7 +1240,7 @@ void CSittingScientist :: Spawn( )
pev->sequence = m_baseSequence + RANDOM_LONG(0,4);
ResetSequenceInfo( );
SetThink (SittingThink);
SetThink( &SittingThink);
pev->nextthink = gpGlobals->time + 0.1;
DROP_TO_FLOOR ( ENT(pev) );

28
dlls/scripted.cpp

@ -142,7 +142,7 @@ void CCineMonster :: Spawn( void ) @@ -142,7 +142,7 @@ void CCineMonster :: Spawn( void )
// if no targetname, start now
if ( FStringNull(pev->targetname) || !FStringNull( m_iszIdle ) )
{
SetThink( CineThink );
SetThink( &CineThink );
pev->nextthink = gpGlobals->time + 1.0;
// Wait to be used?
if ( pev->targetname )
@ -198,7 +198,7 @@ void CCineMonster :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP @@ -198,7 +198,7 @@ void CCineMonster :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
else
{
// if not, try finding them
SetThink( CineThink );
SetThink( &CineThink );
pev->nextthink = gpGlobals->time;
}
}
@ -253,7 +253,7 @@ void CCineMonster :: Touch( CBaseEntity *pOther ) @@ -253,7 +253,7 @@ void CCineMonster :: Touch( CBaseEntity *pOther )
//
void CCineMonster :: Die( void )
{
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
}
//
@ -564,7 +564,7 @@ void CCineMonster :: SequenceDone ( CBaseMonster *pMonster ) @@ -564,7 +564,7 @@ void CCineMonster :: SequenceDone ( CBaseMonster *pMonster )
if ( !( pev->spawnflags & SF_SCRIPT_REPEATABLE ) )
{
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -827,12 +827,12 @@ BOOL CBaseMonster :: CineCleanup( ) @@ -827,12 +827,12 @@ BOOL CBaseMonster :: CineCleanup( )
if ( pOldCine && FBitSet( pOldCine->pev->spawnflags, SF_SCRIPT_LEAVECORPSE ) )
{
ResetUse(); // BUGBUG -- This doesn't call Killed()
ResetThink(); // This will probably break some stuff
ResetTouch();
SetUse( NULL ); // BUGBUG -- This doesn't call Killed()
SetThink( NULL ); // This will probably break some stuff
SetTouch( NULL );
}
else
SUB_StartFadeOut(); // SetThink( SUB_DoNothing );
SUB_StartFadeOut(); // SetThink( &SUB_DoNothing );
// This turns off animation & physics in case their origin ends up stuck in the world or something
StopAnimation();
pev->movetype = MOVETYPE_NONE;
@ -1026,7 +1026,7 @@ void CScriptedSentence :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, US @@ -1026,7 +1026,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( &FindThink );
pev->nextthink = gpGlobals->time;
}
@ -1039,7 +1039,7 @@ void CScriptedSentence :: Spawn( void ) @@ -1039,7 +1039,7 @@ void CScriptedSentence :: Spawn( void )
// if no targetname, start now
if ( !pev->targetname )
{
SetThink( FindThink );
SetThink( &FindThink );
pev->nextthink = gpGlobals->time + 1.0;
}
@ -1078,7 +1078,7 @@ void CScriptedSentence :: FindThink( void ) @@ -1078,7 +1078,7 @@ void CScriptedSentence :: FindThink( void )
StartSentence( pMonster );
if ( pev->spawnflags & SF_SENTENCE_ONCE )
UTIL_Remove( this );
SetThink( DelayThink );
SetThink( &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) );
@ -1096,7 +1096,7 @@ void CScriptedSentence :: DelayThink( void ) @@ -1096,7 +1096,7 @@ void CScriptedSentence :: DelayThink( void )
m_active = TRUE;
if ( !pev->targetname )
pev->nextthink = gpGlobals->time + 0.1;
SetThink( FindThink );
SetThink( &FindThink );
}
@ -1219,7 +1219,7 @@ LINK_ENTITY_TO_CLASS( monster_furniture, CFurniture ); @@ -1219,7 +1219,7 @@ LINK_ENTITY_TO_CLASS( monster_furniture, CFurniture );
//=========================================================
void CFurniture :: Die ( void )
{
SetThink ( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time;
}
@ -1242,7 +1242,7 @@ void CFurniture :: Spawn( ) @@ -1242,7 +1242,7 @@ void CFurniture :: Spawn( )
pev->frame = 0;
// pev->nextthink += 1.0;
// SetThink (WalkMonsterDelay);
// SetThink( &WalkMonsterDelay);
ResetSequenceInfo( );
pev->frame = 0;

12
dlls/sound.cpp

@ -193,7 +193,7 @@ void CAmbientGeneric :: Spawn( void ) @@ -193,7 +193,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( &SUB_Remove );
return;
}
pev->solid = SOLID_NOT;
@ -203,12 +203,12 @@ void CAmbientGeneric :: Spawn( void ) @@ -203,12 +203,12 @@ void CAmbientGeneric :: Spawn( void )
// of ambient sound's pitch or volume. Don't
// start thinking yet.
SetThink(RampThink);
SetThink( &RampThink);
pev->nextthink = 0;
// allow on/off switching via 'use' function.
SetUse ( ToggleUse );
SetUse( &ToggleUse );
m_fActive = FALSE;
@ -1824,19 +1824,19 @@ void CSpeaker :: Spawn( void ) @@ -1824,19 +1824,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( &SUB_Remove );
return;
}
pev->solid = SOLID_NOT;
pev->movetype = MOVETYPE_NONE;
SetThink(SpeakerThink);
SetThink( &SpeakerThink);
pev->nextthink = 0.0;
// allow on/off switching via 'use' function.
SetUse ( ToggleUse );
SetUse( &ToggleUse );
Precache( );
}

12
dlls/squeakgrenade.cpp

@ -120,8 +120,8 @@ void CSqueakGrenade :: Spawn( void ) @@ -120,8 +120,8 @@ void CSqueakGrenade :: Spawn( void )
UTIL_SetSize(pev, Vector( -4, -4, 0), Vector(4, 4, 8));
UTIL_SetOrigin( pev, pev->origin );
SetTouch( SuperBounceTouch );
SetThink( HuntThink );
SetTouch( &SuperBounceTouch );
SetThink( &HuntThink );
pev->nextthink = gpGlobals->time + 0.1;
m_flNextHunt = gpGlobals->time + 1E6;
@ -162,8 +162,8 @@ void CSqueakGrenade::Precache( void ) @@ -162,8 +162,8 @@ void CSqueakGrenade::Precache( void )
void CSqueakGrenade :: Killed( entvars_t *pevAttacker, int iGib )
{
pev->model = iStringNull;// make invisible
SetThink( SUB_Remove );
ResetTouch();
SetThink( &SUB_Remove );
SetTouch( NULL );
pev->nextthink = gpGlobals->time + 0.1;
// since squeak grenades never leave a body behind, clear out their takedamage now.
@ -203,7 +203,7 @@ void CSqueakGrenade::HuntThink( void ) @@ -203,7 +203,7 @@ void CSqueakGrenade::HuntThink( void )
if (!IsInWorld())
{
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
return;
}
@ -483,7 +483,7 @@ void CSqueak::Holster( int skiplocal /* = 0 */ ) @@ -483,7 +483,7 @@ void CSqueak::Holster( int skiplocal /* = 0 */ )
if ( !m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] )
{
m_pPlayer->pev->weapons &= ~(1<<WEAPON_SNARK);
SetThink( DestroyItem );
SetThink( &DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
return;
}

6
dlls/subs.cpp

@ -231,7 +231,7 @@ void CBaseDelay :: SUB_UseTargets( CBaseEntity *pActivator, USE_TYPE useType, fl @@ -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( &DelayThink );
// Save the useType
pTemp->pev->button = (int)useType;
@ -413,7 +413,7 @@ void CBaseToggle :: LinearMove( Vector vecDest, float flSpeed ) @@ -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( &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 ) @@ -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( &AngularMoveDone );
// scale the destdelta vector by the time spent traveling to get velocity
pev->avelocity = vecDestDelta / flTravelTime;

2
dlls/talkmonster.cpp

@ -640,7 +640,7 @@ void CTalkMonster :: Killed( entvars_t *pevAttacker, int iGib ) @@ -640,7 +640,7 @@ void CTalkMonster :: Killed( entvars_t *pevAttacker, int iGib )
m_hTargetEnt = NULL;
// Don't finish that sentence
StopTalking();
ResetUse();
SetUse( NULL );
CBaseMonster::Killed( pevAttacker, iGib );
}

14
dlls/tentacle.cpp

@ -265,9 +265,9 @@ void CTentacle :: Spawn( ) @@ -265,9 +265,9 @@ void CTentacle :: Spawn( )
m_bloodColor = BLOOD_COLOR_GREEN;
SetThink( Start );
SetTouch( HitTouch );
SetUse( CommandUse );
SetThink( &Start );
SetTouch( &HitTouch );
SetUse( &CommandUse );
pev->nextthink = gpGlobals->time + 0.2;
@ -288,7 +288,7 @@ void CTentacle :: Spawn( ) @@ -288,7 +288,7 @@ void CTentacle :: Spawn( )
m_MonsterState = MONSTERSTATE_IDLE;
// SetThink( Test );
// SetThink( &Test );
UTIL_SetOrigin( pev, pev->origin );
}
@ -714,7 +714,7 @@ void CTentacle::CommandUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T @@ -714,7 +714,7 @@ void CTentacle::CommandUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
{
case USE_OFF:
pev->takedamage = DAMAGE_NO;
SetThink( DieThink );
SetThink( &DieThink );
m_iGoalAnim = TENTACLE_ANIM_Engine_Death1;
break;
case USE_ON:
@ -728,7 +728,7 @@ void CTentacle::CommandUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T @@ -728,7 +728,7 @@ void CTentacle::CommandUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
break;
case USE_TOGGLE:
pev->takedamage = DAMAGE_NO;
SetThink( DieThink );
SetThink( &DieThink );
m_iGoalAnim = TENTACLE_ANIM_Engine_Idle;
break;
}
@ -926,7 +926,7 @@ void CTentacle :: HandleAnimEvent( MonsterEvent_t *pEvent ) @@ -926,7 +926,7 @@ void CTentacle :: HandleAnimEvent( MonsterEvent_t *pEvent )
// void CTentacle :: Start( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
void CTentacle :: Start( void )
{
SetThink( Cycle );
SetThink( &Cycle );
if ( !g_fFlySound )
{

66
dlls/triggers.cpp

@ -73,7 +73,7 @@ void CFrictionModifier :: Spawn( void ) @@ -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( &ChangeFriction );
}
@ -344,8 +344,8 @@ void CMultiManager :: KeyValue( KeyValueData *pkvd ) @@ -344,8 +344,8 @@ void CMultiManager :: KeyValue( KeyValueData *pkvd )
void CMultiManager :: Spawn( void )
{
pev->solid = SOLID_NOT;
SetUse ( ManagerUse );
SetThink ( ManagerThink);
SetUse( &ManagerUse );
SetThink( &ManagerThink);
// Sort targets
// Quick and dirty bubble sort
@ -397,13 +397,13 @@ void CMultiManager :: ManagerThink ( void ) @@ -397,13 +397,13 @@ void CMultiManager :: ManagerThink ( void )
if ( m_index >= m_cTargets )// have we fired all targets?
{
ResetThink();
SetThink( NULL );
if ( IsClone() )
{
UTIL_Remove( this );
return;
}
SetUse ( ManagerUse );// allow manager re-use
SetUse( &ManagerUse );// allow manager re-use
}
else
pev->nextthink = m_startTime + m_flTargetDelay[ m_index ];
@ -442,9 +442,9 @@ void CMultiManager :: ManagerUse ( CBaseEntity *pActivator, CBaseEntity *pCaller @@ -442,9 +442,9 @@ void CMultiManager :: ManagerUse ( CBaseEntity *pActivator, CBaseEntity *pCaller
m_index = 0;
m_startTime = gpGlobals->time;
ResetUse();// disable use until all targets have fired
SetUse( NULL );// disable use until all targets have fired
SetThink ( ManagerThink );
SetThink( &ManagerThink );
pev->nextthink = gpGlobals->time;
}
@ -618,7 +618,7 @@ void CTriggerMonsterJump :: Spawn ( void ) @@ -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( &ToggleUse );
}
}
@ -627,7 +627,7 @@ void CTriggerMonsterJump :: Think( void ) @@ -627,7 +627,7 @@ void CTriggerMonsterJump :: Think( void )
{
pev->solid = SOLID_NOT;// kill the trigger for now !!!UNDONE
UTIL_SetOrigin( pev, pev->origin ); // Unlink from trigger list
ResetThink();
SetThink( NULL );
}
void CTriggerMonsterJump :: Touch( CBaseEntity *pOther )
@ -729,7 +729,7 @@ void CTriggerCDAudio :: PlayTrack( void ) @@ -729,7 +729,7 @@ void CTriggerCDAudio :: PlayTrack( void )
{
PlayCDTrack( (int)pev->health );
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
}
@ -808,20 +808,20 @@ void CTargetCDAudio::Play( void ) @@ -808,20 +808,20 @@ void CTargetCDAudio::Play( void )
void CTriggerHurt :: Spawn( void )
{
InitTrigger();
SetTouch ( HurtTouch );
SetTouch( &HurtTouch );
if ( !FStringNull ( pev->targetname ) )
{
SetUse ( ToggleUse );
SetUse( &ToggleUse );
}
else
{
ResetUse();
SetUse( NULL );
}
if (m_bitsDamageInflict & DMG_RADIATION)
{
SetThink ( RadiationThink );
SetThink( &RadiationThink );
pev->nextthink = gpGlobals->time + RANDOM_FLOAT(0.0, 0.5);
}
@ -1080,7 +1080,7 @@ void CTriggerMultiple :: Spawn( void ) @@ -1080,7 +1080,7 @@ void CTriggerMultiple :: Spawn( void )
// }
// else
{
SetTouch( MultiTouch );
SetTouch( &MultiTouch );
}
}
@ -1177,16 +1177,16 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator ) @@ -1177,16 +1177,16 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator )
if (m_flWait > 0)
{
SetThink( MultiWaitOver );
SetThink( &MultiWaitOver );
pev->nextthink = gpGlobals->time + m_flWait;
}
else
{
// we can't just remove (self) here, because this is a touch function
// called while C code is looping through area links...
ResetTouch();
SetTouch( NULL );
pev->nextthink = gpGlobals->time + 0.1;
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
}
}
@ -1200,7 +1200,7 @@ void CBaseTrigger :: MultiWaitOver( void ) @@ -1200,7 +1200,7 @@ void CBaseTrigger :: MultiWaitOver( void )
// pev->takedamage = DAMAGE_YES;
// pev->solid = SOLID_BBOX;
// }
ResetThink();
SetThink( NULL );
}
@ -1266,7 +1266,7 @@ void CTriggerCounter :: Spawn( void ) @@ -1266,7 +1266,7 @@ void CTriggerCounter :: Spawn( void )
if (m_cTriggersLeft == 0)
m_cTriggersLeft = 2;
SetUse( CounterUse );
SetUse( &CounterUse );
}
// ====================== TRIGGER_CHANGELEVEL ================================
@ -1411,11 +1411,11 @@ void CChangeLevel :: Spawn( void ) @@ -1411,11 +1411,11 @@ void CChangeLevel :: Spawn( void )
if (!FStringNull ( pev->targetname ) )
{
SetUse ( UseChangeLevel );
SetUse( &UseChangeLevel );
}
InitTrigger();
if ( !(pev->spawnflags & SF_CHANGELEVEL_USEONLY) )
SetTouch( TouchChangeLevel );
SetTouch( &TouchChangeLevel );
// ALERT( at_console, "TRANSITION: %s (%s)\n", m_szMapName, m_szLandmarkName );
}
@ -1732,7 +1732,7 @@ void NextLevel( void ) @@ -1732,7 +1732,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;
}
}
@ -1820,7 +1820,7 @@ void CTriggerPush :: Spawn( ) @@ -1820,7 +1820,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( &ToggleUse );
UTIL_SetOrigin( pev, pev->origin ); // Link into the list
}
@ -1938,7 +1938,7 @@ void CTriggerTeleport :: Spawn( void ) @@ -1938,7 +1938,7 @@ void CTriggerTeleport :: Spawn( void )
{
InitTrigger();
SetTouch( TeleportTouch );
SetTouch( &TeleportTouch );
}
@ -1963,7 +1963,7 @@ void CTriggerSave::Spawn( void ) @@ -1963,7 +1963,7 @@ void CTriggerSave::Spawn( void )
}
InitTrigger();
SetTouch( SaveTouch );
SetTouch( &SaveTouch );
}
void CTriggerSave::SaveTouch( CBaseEntity *pOther )
@ -1975,7 +1975,7 @@ void CTriggerSave::SaveTouch( CBaseEntity *pOther ) @@ -1975,7 +1975,7 @@ void CTriggerSave::SaveTouch( CBaseEntity *pOther )
if ( !pOther->IsPlayer() )
return;
ResetTouch();
SetTouch( NULL );
UTIL_Remove( this );
SERVER_COMMAND( "autosave\n" );
}
@ -1999,7 +1999,7 @@ void CTriggerEndSection::EndSectionUse( CBaseEntity *pActivator, CBaseEntity *pC @@ -1999,7 +1999,7 @@ void CTriggerEndSection::EndSectionUse( CBaseEntity *pActivator, CBaseEntity *pC
if ( pActivator && !pActivator->IsNetClient() )
return;
ResetUse();
SetUse( NULL );
if ( pev->message )
{
@ -2018,10 +2018,10 @@ void CTriggerEndSection::Spawn( void ) @@ -2018,10 +2018,10 @@ void CTriggerEndSection::Spawn( void )
InitTrigger();
SetUse ( EndSectionUse );
SetUse( &EndSectionUse );
// If it is a "use only" trigger, then don't set the touch function.
if ( ! (pev->spawnflags & SF_ENDSECTION_USEONLY) )
SetTouch( EndSectionTouch );
SetTouch( &EndSectionTouch );
}
void CTriggerEndSection::EndSectionTouch( CBaseEntity *pOther )
@ -2030,7 +2030,7 @@ void CTriggerEndSection::EndSectionTouch( CBaseEntity *pOther ) @@ -2030,7 +2030,7 @@ void CTriggerEndSection::EndSectionTouch( CBaseEntity *pOther )
if ( !pOther->IsNetClient() )
return;
ResetTouch();
SetTouch( NULL );
if (pev->message)
{
@ -2064,7 +2064,7 @@ LINK_ENTITY_TO_CLASS( trigger_gravity, CTriggerGravity ); @@ -2064,7 +2064,7 @@ LINK_ENTITY_TO_CLASS( trigger_gravity, CTriggerGravity );
void CTriggerGravity::Spawn( void )
{
InitTrigger();
SetTouch( GravityTouch );
SetTouch( &GravityTouch );
}
void CTriggerGravity::GravityTouch( CBaseEntity *pOther )
@ -2321,7 +2321,7 @@ void CTriggerCamera::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP @@ -2321,7 +2321,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( &FollowTarget );
pev->nextthink = gpGlobals->time;
m_moveDistance = 0;

16
dlls/tripmine.cpp

@ -120,7 +120,7 @@ void CTripmineGrenade :: Spawn( void ) @@ -120,7 +120,7 @@ void CTripmineGrenade :: Spawn( void )
m_flPowerUp = gpGlobals->time + 2.5;
}
SetThink( PowerupThink );
SetThink( &PowerupThink );
pev->nextthink = gpGlobals->time + 0.2;
pev->takedamage = DAMAGE_YES;
@ -158,7 +158,7 @@ void CTripmineGrenade :: WarningThink( void ) @@ -158,7 +158,7 @@ void CTripmineGrenade :: WarningThink( void )
// EMIT_SOUND( ENT(pev), CHAN_VOICE, "buttons/Blip2.wav", 1.0, ATTN_NORM );
// set to power up
SetThink( PowerupThink );
SetThink( &PowerupThink );
pev->nextthink = gpGlobals->time + 1.0;
}
@ -191,7 +191,7 @@ void CTripmineGrenade :: PowerupThink( void ) @@ -191,7 +191,7 @@ void CTripmineGrenade :: 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( &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();
@ -206,7 +206,7 @@ void CTripmineGrenade :: PowerupThink( void ) @@ -206,7 +206,7 @@ void CTripmineGrenade :: PowerupThink( void )
CBaseEntity *pMine = Create( "weapon_tripmine", pev->origin + m_vecDir * 24, pev->angles );
pMine->pev->spawnflags |= SF_NORESPAWN;
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
KillBeam();
pev->nextthink = gpGlobals->time + 0.1;
return;
@ -249,7 +249,7 @@ void CTripmineGrenade :: MakeBeam( void ) @@ -249,7 +249,7 @@ void CTripmineGrenade :: MakeBeam( void )
m_flBeamLength = tr.flFraction;
// set to follow laser spot
SetThink( BeamBreakThink );
SetThink( &BeamBreakThink );
pev->nextthink = gpGlobals->time + 0.1;
Vector vecTmpEnd = pev->origin + m_vecDir * 2048 * m_flBeamLength;
@ -317,7 +317,7 @@ int CTripmineGrenade :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttac @@ -317,7 +317,7 @@ int CTripmineGrenade :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttac
{
// disable
// Create( "weapon_tripmine", pev->origin + m_vecDir * 24, pev->angles );
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
KillBeam();
return FALSE;
@ -335,7 +335,7 @@ void CTripmineGrenade::Killed( entvars_t *pevAttacker, int iGib ) @@ -335,7 +335,7 @@ void CTripmineGrenade::Killed( entvars_t *pevAttacker, int iGib )
pev->owner = ENT( pevAttacker );
}
SetThink( DelayDeathThink );
SetThink( &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
@ -420,7 +420,7 @@ void CTripmine::Holster( int skiplocal /* = 0 */ ) @@ -420,7 +420,7 @@ void CTripmine::Holster( int skiplocal /* = 0 */ )
{
// out of mines
m_pPlayer->pev->weapons &= ~(1<<WEAPON_TRIPMINE);
SetThink( DestroyItem );
SetThink( &DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}

58
dlls/turret.cpp

@ -257,7 +257,7 @@ void CBaseTurret::Spawn() @@ -257,7 +257,7 @@ void CBaseTurret::Spawn()
pev->takedamage = DAMAGE_AIM;
SetBits (pev->flags, FL_MONSTER);
SetUse( TurretUse );
SetUse( &TurretUse );
if (( pev->spawnflags & SF_MONSTER_TURRET_AUTOACTIVATE )
&& !( pev->spawnflags & SF_MONSTER_TURRET_STARTINACTIVE ))
@ -307,7 +307,7 @@ void CTurret::Spawn() @@ -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( &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() @@ -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( &Initialize);
pev->nextthink = gpGlobals->time + 0.3;
}
@ -381,11 +381,11 @@ void CBaseTurret::Initialize(void) @@ -381,11 +381,11 @@ void CBaseTurret::Initialize(void)
if (m_iAutoStart)
{
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink(AutoSearchThink);
SetThink( &AutoSearchThink);
pev->nextthink = gpGlobals->time + .1;
}
else
SetThink(SUB_DoNothing);
SetThink( &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_ @@ -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( &Retire);
}
else
{
@ -411,7 +411,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ @@ -411,7 +411,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
m_iAutoStart = TRUE;
}
SetThink(Deploy);
SetThink( &Deploy);
}
}
@ -472,7 +472,7 @@ void CBaseTurret::ActiveThink(void) @@ -472,7 +472,7 @@ void CBaseTurret::ActiveThink(void)
{
m_hEnemy = NULL;
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink(SearchThink);
SetThink( &SearchThink);
return;
}
@ -489,7 +489,7 @@ void CBaseTurret::ActiveThink(void) @@ -489,7 +489,7 @@ void CBaseTurret::ActiveThink(void)
{
m_hEnemy = NULL;
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink(SearchThink);
SetThink( &SearchThink);
return;
}
}
@ -518,7 +518,7 @@ void CBaseTurret::ActiveThink(void) @@ -518,7 +518,7 @@ void CBaseTurret::ActiveThink(void)
{
m_hEnemy = NULL;
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink(SearchThink);
SetThink( &SearchThink);
return;
}
}
@ -670,7 +670,7 @@ void CBaseTurret::Deploy(void) @@ -670,7 +670,7 @@ void CBaseTurret::Deploy(void)
SetTurretAnim(TURRET_ANIM_SPIN);
pev->framerate = 0;
SetThink(SearchThink);
SetThink( &SearchThink);
}
m_flLastSight = gpGlobals->time + m_flMaxWait;
@ -710,11 +710,11 @@ void CBaseTurret::Retire(void) @@ -710,11 +710,11 @@ void CBaseTurret::Retire(void)
UTIL_SetSize(pev, pev->mins, pev->maxs);
if (m_iAutoStart)
{
SetThink(AutoSearchThink);
SetThink( &AutoSearchThink);
pev->nextthink = gpGlobals->time + .1;
}
else
SetThink(SUB_DoNothing);
SetThink( &SUB_DoNothing);
}
}
else
@ -746,7 +746,7 @@ void CTurret::SpinUpCall(void) @@ -746,7 +746,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( &ActiveThink);
m_iStartSpin = 0;
m_iSpin = 1;
}
@ -758,7 +758,7 @@ void CTurret::SpinUpCall(void) @@ -758,7 +758,7 @@ void CTurret::SpinUpCall(void)
if (m_iSpin)
{
SetThink(ActiveThink);
SetThink( &ActiveThink);
}
}
@ -856,7 +856,7 @@ void CBaseTurret::SearchThink(void) @@ -856,7 +856,7 @@ void CBaseTurret::SearchThink(void)
{
m_flLastSight = 0;
m_flSpinUpTime = 0;
SetThink(ActiveThink);
SetThink( &ActiveThink);
}
else
{
@ -866,7 +866,7 @@ void CBaseTurret::SearchThink(void) @@ -866,7 +866,7 @@ void CBaseTurret::SearchThink(void)
//Before we retrace, make sure that we are spun down.
m_flLastSight = 0;
m_flSpinUpTime = 0;
SetThink(Retire);
SetThink( &Retire);
}
// should we stop the spin?
else if ((m_flSpinUpTime) && (gpGlobals->time > m_flSpinUpTime))
@ -911,7 +911,7 @@ void CBaseTurret::AutoSearchThink(void) @@ -911,7 +911,7 @@ void CBaseTurret::AutoSearchThink(void)
if (m_hEnemy != NULL)
{
SetThink(Deploy);
SetThink( &Deploy);
EMIT_SOUND(ENT(pev), CHAN_BODY, "turret/tu_alert.wav", TURRET_MACHINE_VOLUME, ATTN_NORM);
}
}
@ -979,7 +979,7 @@ void CBaseTurret :: TurretDeath( void ) @@ -979,7 +979,7 @@ void CBaseTurret :: TurretDeath( void )
if (m_fSequenceFinished && !MoveTurret( ) && pev->dmgtime + 5 < gpGlobals->time)
{
pev->framerate = 0;
ResetThink();
SetThink( NULL );
}
}
@ -1024,8 +1024,8 @@ int CBaseTurret::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, flo @@ -1024,8 +1024,8 @@ int CBaseTurret::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, flo
ClearBits (pev->flags, FL_MONSTER); // why are they set in the first place???
ResetUse();
SetThink(TurretDeath);
SetUse( NULL );
SetThink( &TurretDeath);
SUB_UseTargets( this, USE_ON, 0 ); // wake up others
pev->nextthink = gpGlobals->time + 0.1;
@ -1037,7 +1037,7 @@ int CBaseTurret::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, flo @@ -1037,7 +1037,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( &SearchThink);
}
}
@ -1179,8 +1179,8 @@ void CSentry::Spawn() @@ -1179,8 +1179,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( &SentryTouch);
SetThink( &Initialize);
pev->nextthink = gpGlobals->time + 0.3;
}
@ -1204,8 +1204,8 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f @@ -1204,8 +1204,8 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f
if (!m_iOn)
{
SetThink( Deploy );
ResetUse();
SetThink( &Deploy );
SetUse( NULL );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -1218,8 +1218,8 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f @@ -1218,8 +1218,8 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f
ClearBits (pev->flags, FL_MONSTER); // why are they set in the first place???
ResetUse();
SetThink(SentryDeath);
SetUse( NULL );
SetThink( &SentryDeath);
SUB_UseTargets( this, USE_ON, 0 ); // wake up others
pev->nextthink = gpGlobals->time + 0.1;
@ -1299,7 +1299,7 @@ void CSentry :: SentryDeath( void ) @@ -1299,7 +1299,7 @@ void CSentry :: SentryDeath( void )
if (m_fSequenceFinished && pev->dmgtime + 5 < gpGlobals->time)
{
pev->framerate = 0;
ResetThink();
SetThink( NULL );
}
}

48
dlls/weapons.cpp

@ -477,8 +477,8 @@ void CBasePlayerItem :: FallInit( void ) @@ -477,8 +477,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( &DefaultTouch );
SetThink( &FallThink );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -528,8 +528,8 @@ void CBasePlayerItem::Materialize( void ) @@ -528,8 +528,8 @@ void CBasePlayerItem::Materialize( void )
pev->solid = SOLID_TRIGGER;
UTIL_SetOrigin( pev, pev->origin );// link into world.
SetTouch (DefaultTouch);
ResetThink();
SetTouch( &DefaultTouch);
SetThink( NULL );
}
@ -580,8 +580,8 @@ CBaseEntity* CBasePlayerItem::Respawn( void ) @@ -580,8 +580,8 @@ CBaseEntity* CBasePlayerItem::Respawn( void )
if ( pNewWeapon )
{
pNewWeapon->pev->effects |= EF_NODRAW;// invisible for now
pNewWeapon->ResetTouch();// no touch
pNewWeapon->SetThink( AttemptToMaterialize );
pNewWeapon->SetTouch( NULL );// no touch
pNewWeapon->SetThink( &AttemptToMaterialize );
DROP_TO_FLOOR ( ENT(pev) );
@ -738,15 +738,15 @@ int CBasePlayerItem::AddToPlayer( CBasePlayer *pPlayer ) @@ -738,15 +738,15 @@ int CBasePlayerItem::AddToPlayer( CBasePlayer *pPlayer )
void CBasePlayerItem::Drop( void )
{
ResetTouch();
SetThink(SUB_Remove);
SetTouch( NULL );
SetThink( &SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
void CBasePlayerItem::Kill( void )
{
ResetTouch();
SetThink(SUB_Remove);
SetTouch( NULL );
SetThink( &SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
@ -766,8 +766,8 @@ void CBasePlayerItem::AttachToPlayer ( CBasePlayer *pPlayer ) @@ -766,8 +766,8 @@ void CBasePlayerItem::AttachToPlayer ( CBasePlayer *pPlayer )
pev->model = iStringNull;
pev->owner = pPlayer->edict();
pev->nextthink = gpGlobals->time + .1;
ResetTouch();
ResetThink();
SetTouch( NULL );
SetThink( NULL );
}
// CALLED THROUGH the newly-touched weapon's instance. The existing player weapon is pOriginal
@ -1066,17 +1066,17 @@ void CBasePlayerAmmo::Spawn( void ) @@ -1066,17 +1066,17 @@ void CBasePlayerAmmo::Spawn( void )
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
UTIL_SetOrigin( pev, pev->origin );
SetTouch( DefaultTouch );
SetTouch( &DefaultTouch );
}
CBaseEntity* CBasePlayerAmmo::Respawn( void )
{
pev->effects |= EF_NODRAW;
ResetTouch();
SetTouch( NULL );
UTIL_SetOrigin( pev, g_pGameRules->VecAmmoRespawnSpot( this ) );// move to wherever I'm supposed to repawn.
SetThink( Materialize );
SetThink( &Materialize );
pev->nextthink = g_pGameRules->FlAmmoRespawnTime( this );
return this;
@ -1092,7 +1092,7 @@ void CBasePlayerAmmo::Materialize( void ) @@ -1092,7 +1092,7 @@ void CBasePlayerAmmo::Materialize( void )
pev->effects |= EF_MUZZLEFLASH;
}
SetTouch( DefaultTouch );
SetTouch( &DefaultTouch );
}
void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
@ -1110,16 +1110,16 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther ) @@ -1110,16 +1110,16 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
}
else
{
ResetTouch();
SetThink(SUB_Remove);
SetTouch( NULL );
SetThink( &SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
}
else if (gEvilImpulse101)
{
// evil impulse 101 hack, kill always
ResetTouch();
SetThink(SUB_Remove);
SetTouch( NULL );
SetThink( &SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
}
@ -1256,7 +1256,7 @@ void CWeaponBox::Kill( void ) @@ -1256,7 +1256,7 @@ void CWeaponBox::Kill( void )
while ( pWeapon )
{
pWeapon->SetThink(SUB_Remove);
pWeapon->SetThink( &SUB_Remove);
pWeapon->pev->nextthink = gpGlobals->time + 0.1;
pWeapon = pWeapon->m_pNext;
}
@ -1334,7 +1334,7 @@ void CWeaponBox::Touch( CBaseEntity *pOther ) @@ -1334,7 +1334,7 @@ void CWeaponBox::Touch( CBaseEntity *pOther )
}
EMIT_SOUND( pOther->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
ResetTouch();
SetTouch( NULL );
UTIL_Remove(this);
}
@ -1380,8 +1380,8 @@ BOOL CWeaponBox::PackWeapon( CBasePlayerItem *pWeapon ) @@ -1380,8 +1380,8 @@ BOOL CWeaponBox::PackWeapon( CBasePlayerItem *pWeapon )
pWeapon->pev->modelindex = 0;
pWeapon->pev->model = iStringNull;
pWeapon->pev->owner = edict();
pWeapon->ResetThink();// crowbar may be trying to swing again, etc.
pWeapon->ResetTouch();
pWeapon->SetThink( NULL );// crowbar may be trying to swing again, etc.
pWeapon->SetTouch( NULL );
pWeapon->m_pPlayer = NULL;
//ALERT ( at_console, "packed %s\n", STRING(pWeapon->pev->classname) );

10
dlls/world.cpp

@ -125,15 +125,15 @@ void CDecal :: Spawn( void ) @@ -125,15 +125,15 @@ void CDecal :: Spawn( void )
if ( FStringNull ( pev->targetname ) )
{
SetThink( StaticDecal );
SetThink( &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( &SUB_DoNothing );
SetUse( &TriggerDecal);
}
}
@ -158,7 +158,7 @@ void CDecal :: TriggerDecal ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE @@ -158,7 +158,7 @@ void CDecal :: TriggerDecal ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE
WRITE_SHORT( (int)VARS(trace.pHit)->modelindex );
MESSAGE_END();
SetThink( SUB_Remove );
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -642,7 +642,7 @@ void CWorld :: Precache( void ) @@ -642,7 +642,7 @@ void CWorld :: Precache( void )
CBaseEntity *pEntity = CBaseEntity::Create( "env_message", g_vecZero, g_vecZero, NULL );
if ( pEntity )
{
pEntity->SetThink( SUB_CallUseToggle );
pEntity->SetThink( &SUB_CallUseToggle );
pEntity->pev->message = pev->netname;
pev->netname = 0;
pEntity->pev->nextthink = gpGlobals->time + 0.3;

Loading…
Cancel
Save