Browse Source

Merge branch 'test' into gravgun

AR2
mittorn 9 years ago
parent
commit
d0be1f06e9
  1. 2
      cl_dll/Android.mk
  2. 5
      cl_dll/StudioModelRenderer.cpp
  3. 2
      cl_dll/camera.h
  4. 2
      cl_dll/cl_util.h
  5. 4
      cl_dll/entity.cpp
  6. 2
      cl_dll/geiger.cpp
  7. 4
      cl_dll/health.cpp
  8. 2
      cl_dll/hl/hl_weapons.cpp
  9. 1
      cl_dll/hud.cpp
  10. 3
      cl_dll/hud_spectator.cpp
  11. 3
      cl_dll/in_defs.h
  12. 6
      cl_dll/input_xash3d.cpp
  13. 1
      cl_dll/menu.cpp
  14. 1
      cl_dll/status_icons.cpp
  15. 7
      cl_dll/view.cpp
  16. 16
      cl_dll/wrect.h
  17. 14
      dlls/aflock.cpp
  18. 4
      dlls/airtank.cpp
  19. 22
      dlls/apache.cpp
  20. 4
      dlls/barnacle.cpp
  21. 2
      dlls/barney.cpp
  22. 2
      dlls/bigmomma.cpp
  23. 30
      dlls/bmodels.cpp
  24. 4
      dlls/bullsquid.cpp
  25. 46
      dlls/buttons.cpp
  26. 4
      dlls/client.cpp
  27. 12
      dlls/combat.cpp
  28. 10
      dlls/controller.cpp
  29. 8
      dlls/crossbow.cpp
  30. 18
      dlls/doors.cpp
  31. 38
      dlls/effects.cpp
  32. 2
      dlls/explode.cpp
  33. 10
      dlls/extdll.h
  34. 8
      dlls/func_break.cpp
  35. 6
      dlls/gargantua.cpp
  36. 22
      dlls/ggrenade.cpp
  37. 8
      dlls/h_battery.cpp
  38. 10
      dlls/h_cine.cpp
  39. 2
      dlls/h_cycler.cpp
  40. 2
      dlls/handgrenade.cpp
  41. 2
      dlls/headcrab.cpp
  42. 8
      dlls/healthkit.cpp
  43. 4
      dlls/hgrunt.cpp
  44. 16
      dlls/hornet.cpp
  45. 2
      dlls/houndeye.cpp
  46. 4
      dlls/ichthyosaur.cpp
  47. 6
      dlls/items.cpp
  48. 4
      dlls/leech.cpp
  49. 12
      dlls/monstermaker.cpp
  50. 8
      dlls/monsters.cpp
  51. 4
      dlls/mortar.cpp
  52. 2
      dlls/multiplay_gamerules.cpp
  53. 31
      dlls/nihilanth.cpp
  54. 69
      dlls/nodes.cpp
  55. 18
      dlls/osprey.cpp
  56. 50
      dlls/plats.cpp
  57. 18
      dlls/player.cpp
  58. 2
      dlls/roach.cpp
  59. 8
      dlls/rpg.cpp
  60. 4
      dlls/satchel.cpp
  61. 2
      dlls/saverestore.h
  62. 6
      dlls/scientist.cpp
  63. 18
      dlls/scripted.cpp
  64. 12
      dlls/sound.cpp
  65. 2
      dlls/soundent.cpp
  66. 10
      dlls/squeakgrenade.cpp
  67. 6
      dlls/subs.cpp
  68. 12
      dlls/talkmonster.cpp
  69. 2
      dlls/tempmonster.cpp
  70. 12
      dlls/tentacle.cpp
  71. 46
      dlls/triggers.cpp
  72. 16
      dlls/tripmine.cpp
  73. 48
      dlls/turret.cpp
  74. 10
      dlls/util.cpp
  75. 6
      dlls/util.h
  76. 24
      dlls/weapons.cpp
  77. 2
      dlls/weapons.h
  78. 10
      dlls/world.cpp
  79. 2
      engine/studio.h
  80. 2
      game_shared/bitvec.h
  81. 4
      game_shared/voice_gamemgr.cpp

2
cl_dll/Android.mk

@ -21,7 +21,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard) @@ -21,7 +21,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard)
LOCAL_MODULE_FILENAME = libclient_hardfp
endif
LOCAL_CFLAGS += -fsigned-char -DCLIENT_DLL=1
LOCAL_CFLAGS += -DCLIENT_DLL=1
SRCS=
SRCS_C=

5
cl_dll/StudioModelRenderer.cpp

@ -377,7 +377,7 @@ mstudioanim_t *CStudioModelRenderer::StudioGetAnim( model_t *m_pSubModel, mstudi @@ -377,7 +377,7 @@ mstudioanim_t *CStudioModelRenderer::StudioGetAnim( model_t *m_pSubModel, mstudi
if (pseqdesc->seqgroup == 0)
{
return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqgroup->data + pseqdesc->animindex);
return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqdesc->animindex);
}
paSequences = (cache_user_t *)m_pSubModel->submodels;
@ -782,7 +782,7 @@ StudioSetupBones @@ -782,7 +782,7 @@ StudioSetupBones
*/
void CStudioModelRenderer::StudioSetupBones ( void )
{
int i;
int i, j;
double f;
mstudiobone_t *pbones;
@ -911,7 +911,6 @@ void CStudioModelRenderer::StudioSetupBones ( void ) @@ -911,7 +911,6 @@ void CStudioModelRenderer::StudioSetupBones ( void )
for (i = 0; i < m_pStudioHeader->numbones; i++)
{
int j;
for( j = 0; j < LEGS_BONES_COUNT; j++ )
{
if( !strcmp( pbones[i].name, legs_bones[j] ))

2
cl_dll/camera.h

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
// NOTE: must include quakedef.h first
#ifndef _CAMERA_H_
#define _CAMEA_H_
#define _CAMERA_H_
// pitch, yaw, dist
extern vec3_t cam_ofs;

2
cl_dll/cl_util.h

@ -84,7 +84,7 @@ inline struct cvar_s *CVAR_CREATE( const char *cv, const char *val, const int fl @@ -84,7 +84,7 @@ inline struct cvar_s *CVAR_CREATE( const char *cv, const char *val, const int fl
#define AngleVectors (*gEngfuncs.pfnAngleVectors)
extern cvar_t *hud_textmode;
extern float g_hud_text_color[3];
inline int DrawSetTextColor(float r, float g, float b)
inline void DrawSetTextColor(float r, float g, float b)
{
if( hud_textmode->value == 1 )
g_hud_text_color[0]=r, g_hud_text_color[1] = g, g_hud_text_color[2] = b;

4
cl_dll/entity.cpp

@ -723,8 +723,8 @@ void DLLEXPORT HUD_TempEntUpdate ( @@ -723,8 +723,8 @@ void DLLEXPORT HUD_TempEntUpdate (
s = sin( pTemp->entity.baseline.origin[2] + fastFreq );
c = cos( pTemp->entity.baseline.origin[2] + fastFreq );
pTemp->entity.origin[0] += pTemp->entity.baseline.origin[0] * frametime + 8 * sin( client_time * 20 + (int)pTemp );
pTemp->entity.origin[1] += pTemp->entity.baseline.origin[1] * frametime + 4 * sin( client_time * 30 + (int)pTemp );
pTemp->entity.origin[0] += pTemp->entity.baseline.origin[0] * frametime + 8 * sin( client_time * 20 + (int)(size_t)pTemp );
pTemp->entity.origin[1] += pTemp->entity.baseline.origin[1] * frametime + 4 * sin( client_time * 30 + (int)(size_t)pTemp );
pTemp->entity.origin[2] += pTemp->entity.baseline.origin[2] * frametime;
}

2
cl_dll/geiger.cpp

@ -64,7 +64,7 @@ int CHudGeiger::MsgFunc_Geiger(const char *pszName, int iSize, void *pbuf) @@ -64,7 +64,7 @@ int CHudGeiger::MsgFunc_Geiger(const char *pszName, int iSize, void *pbuf)
int CHudGeiger::Draw (float flTime)
{
int pct;
float flvol = 0;
float flvol = 0.0f;
int rg[3];
int i = 0;

4
cl_dll/health.cpp

@ -377,7 +377,7 @@ int CHudHealth::DrawPain(float flTime) @@ -377,7 +377,7 @@ int CHudHealth::DrawPain(float flTime)
int CHudHealth::DrawDamage(float flTime)
{
int r, g, b, a;
int i, r, g, b, a;
DAMAGE_IMAGE *pdmg;
int i;
@ -405,7 +405,7 @@ int CHudHealth::DrawDamage(float flTime) @@ -405,7 +405,7 @@ int CHudHealth::DrawDamage(float flTime)
// check for bits that should be expired
for ( i = 0; i < NUM_DMG_TYPES; i++ )
{
DAMAGE_IMAGE *pdmg = &m_dmg[i];
pdmg = &m_dmg[i];
if ( m_bitsDamage & giDmgFlags[i] )
{

2
cl_dll/hl/hl_weapons.cpp

@ -621,7 +621,7 @@ void HUD_InitClientWeapons( void ) @@ -621,7 +621,7 @@ void HUD_InitClientWeapons( void )
// Pass through to engine
g_engfuncs.pfnPrecacheEvent = gEngfuncs.pfnPrecacheEvent;
g_engfuncs.pfnRandomFloat = gEngfuncs.pfnRandomFloat;
g_engfuncs.pfnRandomLong = RandomLong;
g_engfuncs.pfnRandomLong = gEngfuncs.pfnRandomLong;
// Allocate a slot for the local player
HUD_PrepEntity( &player , NULL );

1
cl_dll/hud.cpp

@ -280,6 +280,7 @@ int CHud :: GetSpriteIndex( const char *SpriteName ) @@ -280,6 +280,7 @@ int CHud :: GetSpriteIndex( const char *SpriteName )
void CHud :: VidInit( void )
{
int j;
m_scrinfo.iSize = sizeof(m_scrinfo);
GetScreenInfo(&m_scrinfo);

3
cl_dll/hud_spectator.cpp

@ -874,6 +874,9 @@ bool CHudSpectator::ParseOverviewFile( ) @@ -874,6 +874,9 @@ bool CHudSpectator::ParseOverviewFile( )
char *pfile = NULL;
memset( filename, 0, 255 );
memset( levelname, 0, 255 );
memset( token, 0, 1024 );
memset( &m_OverviewData, 0, sizeof(m_OverviewData));
// fill in standrd values

3
cl_dll/in_defs.h

@ -17,7 +17,10 @@ @@ -17,7 +17,10 @@
#define ROLL 2
#ifdef _WIN32
#define HSPRITE HSPRITE_win32
#include <windows.h>
#undef HSPRITE
#else
typedef struct point_s{
int x;

6
cl_dll/input_xash3d.cpp

@ -201,6 +201,12 @@ void IN_Move( float frametime, usercmd_t *cmd ) @@ -201,6 +201,12 @@ void IN_Move( float frametime, usercmd_t *cmd )
IN_ToggleButtons( ac_forwardmove / ac_movecount, ac_sidemove / ac_movecount );
if( ac_forwardmove ) cmd->forwardmove = ac_forwardmove * cl_forwardspeed->value / ac_movecount;
if( ac_sidemove ) cmd->sidemove = ac_sidemove * cl_sidespeed->value / ac_movecount;
if (in_speed.state & 1)
{
cmd->forwardmove *= cl_movespeedkey->value;
cmd->sidemove *= cl_movespeedkey->value;
}
}
ac_sidemove = ac_forwardmove = rel_pitch = rel_yaw = 0;

1
cl_dll/menu.cpp

@ -65,6 +65,7 @@ int CHudMenu :: VidInit( void ) @@ -65,6 +65,7 @@ int CHudMenu :: VidInit( void )
int CHudMenu :: Draw( float flTime )
{
int i;
// check for if menu is set to disappear
if ( m_flShutoffTime > 0 )
{

1
cl_dll/status_icons.cpp

@ -107,6 +107,7 @@ int CHudStatusIcons::MsgFunc_StatusIcon( const char *pszName, int iSize, void *p @@ -107,6 +107,7 @@ int CHudStatusIcons::MsgFunc_StatusIcon( const char *pszName, int iSize, void *p
void CHudStatusIcons::EnableIcon( char *pszIconName, unsigned char red, unsigned char green, unsigned char blue )
{
int i;
// check to see if the sprite is in the current list
for ( i = 0; i < MAX_ICONSPRITES; i++ )
{

7
cl_dll/view.cpp

@ -134,7 +134,7 @@ void V_NormalizeAngles( float *angles ) @@ -134,7 +134,7 @@ void V_NormalizeAngles( float *angles )
}
}
/*
===================
V_InterpolateAngles
@ -466,7 +466,7 @@ void V_CalcNormalRefdef ( struct ref_params_s *pparams ) @@ -466,7 +466,7 @@ void V_CalcNormalRefdef ( struct ref_params_s *pparams )
waterOffset = 0;
if ( pparams->waterlevel >= 2 )
{
int i, contents, waterDist, waterEntity;
int contents, waterDist, waterEntity;
vec3_t point;
waterDist = cl_waterdist->value;
@ -661,7 +661,6 @@ void V_CalcNormalRefdef ( struct ref_params_s *pparams ) @@ -661,7 +661,6 @@ void V_CalcNormalRefdef ( struct ref_params_s *pparams )
( pparams->smoothing && ( pparams->maxclients > 1 ) ) )
{
int foundidx;
int i;
float t;
if ( cl_vsmoothing->value < 0.0 )
@ -1333,7 +1332,7 @@ int V_FindViewModelByWeaponModel(int weaponindex) @@ -1333,7 +1332,7 @@ int V_FindViewModelByWeaponModel(int weaponindex)
int len = strlen( weaponModel->name );
int i = 0;
while ( modelmap[i] != NULL )
while ( modelmap[i][0] != NULL )
{
if ( !strnicmp( weaponModel->name, modelmap[i][0], len ) )
{

16
cl_dll/wrect.h

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#if !defined( WRECTH )
#define WRECTH
typedef struct rect_s
{
int left, right, top, bottom;
} wrect_t;
#endif

14
dlls/aflock.cpp

@ -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( &CFlockingFlyer::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( &CFlockingFlyer::FallHack );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -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( &CFlockingFlyer::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( &CFlockingFlyer::FlockLeaderThink );
}
else
{
SetThink( &FlockFollowerThink );
SetThink( &CFlockingFlyer::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( &CFlockingFlyer::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( &CFlockingFlyer::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( &CAirtank::TankTouch );
SetThink( &CAirtank::TankThink );
pev->flags |= FL_MONSTER;
pev->takedamage = DAMAGE_YES;

22
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( &CApache::StartupUse );
}
else
{
SetThink( &HuntThink );
SetTouch( &FlyTouch );
SetThink( &CApache::HuntThink );
SetTouch( &CApache::FlyTouch );
pev->nextthink = gpGlobals->time + 1.0;
}
@ -186,8 +186,8 @@ void CApache::NullThink( void ) @@ -186,8 +186,8 @@ void CApache::NullThink( void )
void CApache::StartupUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetThink( &HuntThink );
SetTouch( &FlyTouch );
SetThink( &CApache::HuntThink );
SetTouch( &CApache::FlyTouch );
pev->nextthink = gpGlobals->time + 0.1;
SetUse( NULL );
}
@ -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( &CApache::DyingThink );
SetTouch( &CApache::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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
}
}
@ -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( &CApacheHVR::IgniteThink );
SetTouch( &CGrenade::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( &CApacheHVR::AccelerateThink );
pev->nextthink = gpGlobals->time + 0.1;
}

4
dlls/barnacle.cpp

@ -137,7 +137,7 @@ void CBarnacle :: Spawn() @@ -137,7 +137,7 @@ void CBarnacle :: Spawn()
SetActivity ( ACT_IDLE );
SetThink( &BarnacleThink );
SetThink( &CBarnacle::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( &CBarnacle::WaitTillDead );
}
//=========================================================

2
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( &CTalkMonster::FollowerUse );
}
//=========================================================

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( &CBMortar::Animate );
pSpit->pev->nextthink = gpGlobals->time + 0.1;
return pSpit;

30
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( &CFuncRotating::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( &CBaseEntity::SUB_CallUseToggle );
pev->nextthink = pev->ltime + 1.5; // leave a magic delay for client to start up
}
// can this brush inflict pain?
if ( FBitSet (pev->spawnflags, SF_BRUSH_HURT) )
{
SetTouch( &HurtTouch );
SetTouch( &CFuncRotating::HurtTouch );
}
Precache( );
@ -504,7 +504,7 @@ void CFuncRotating :: Precache( void ) @@ -504,7 +504,7 @@ void CFuncRotating :: Precache( void )
// if fan was spinning, and we went through transition or save/restore,
// make sure we restart the sound. 1.5 sec delay is magic number. KDB
SetThink( &SpinUp );
SetThink( &CFuncRotating::SpinUp );
pev->nextthink = pev->ltime + 1.5;
}
}
@ -600,7 +600,7 @@ void CFuncRotating :: SpinUp( void ) @@ -600,7 +600,7 @@ void CFuncRotating :: SpinUp( void )
EMIT_SOUND_DYN(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseRunning),
m_flVolume, m_flAttenuation, SND_CHANGE_PITCH | SND_CHANGE_VOL, FANPITCHMAX);
SetThink( &Rotate );
SetThink( &CFuncRotating::Rotate );
Rotate();
}
else
@ -641,7 +641,7 @@ void CFuncRotating :: SpinDown( void ) @@ -641,7 +641,7 @@ void CFuncRotating :: SpinDown( void )
EMIT_SOUND_DYN(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseRunning /* Stop */),
0, 0, SND_STOP, m_pitch);
SetThink( &Rotate );
SetThink( &CFuncRotating::Rotate );
Rotate();
}
else
@ -666,7 +666,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller @@ -666,7 +666,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
// fan is spinning, so stop it.
if ( pev->avelocity != g_vecZero )
{
SetThink( &SpinDown );
SetThink( &CFuncRotating::SpinDown );
//EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, (char *)STRING(pev->noiseStop),
// m_flVolume, m_flAttenuation, 0, m_pitch);
@ -674,7 +674,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller @@ -674,7 +674,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
}
else// fan is not moving, so start it
{
SetThink( &SpinUp );
SetThink( &CFuncRotating::SpinUp );
EMIT_SOUND_DYN(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseRunning),
0.01, m_flAttenuation, 0, FANPITCHMIN);
@ -686,7 +686,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller @@ -686,7 +686,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
if ( pev->avelocity != g_vecZero )
{
// play stopping sound here
SetThink( &SpinDown );
SetThink( &CFuncRotating::SpinDown );
// EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, (char *)STRING(pev->noiseStop),
// m_flVolume, m_flAttenuation, 0, m_pitch);
@ -700,7 +700,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller @@ -700,7 +700,7 @@ void CFuncRotating :: RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller
m_flVolume, m_flAttenuation, 0, FANPITCHMAX);
pev->avelocity = pev->movedir * pev->speed;
SetThink( &Rotate );
SetThink( &CFuncRotating::Rotate );
Rotate();
}
}
@ -812,15 +812,15 @@ void CPendulum :: Spawn( void ) @@ -812,15 +812,15 @@ void CPendulum :: Spawn( void )
if ( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_INSTANT) )
{
SetThink( &SUB_CallUseToggle );
SetThink( &CBaseEntity::SUB_CallUseToggle );
pev->nextthink = gpGlobals->time + 0.1;
}
pev->speed = 0;
SetUse( &PendulumUse );
SetUse( &CPendulum::PendulumUse );
if ( FBitSet( pev->spawnflags, SF_PENDULUM_SWING ) )
{
SetTouch( &RopeTouch );
SetTouch( &CPendulum::RopeTouch );
}
}
@ -837,7 +837,7 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US @@ -837,7 +837,7 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US
pev->avelocity = m_maxSpeed * pev->movedir;
pev->nextthink = pev->ltime + (delta / m_maxSpeed);
SetThink( &Stop );
SetThink( &CPendulum::Stop );
}
else
{
@ -850,7 +850,7 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US @@ -850,7 +850,7 @@ void CPendulum :: PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US
{
pev->nextthink = pev->ltime + 0.1; // Start the pendulum moving
m_time = gpGlobals->time; // Save time to calculate dt
SetThink( &Swing );
SetThink( &CPendulum::Swing );
m_dampSpeed = m_maxSpeed;
}
}

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( &CSquidSpit::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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time;
}

46
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( &CMultiSource::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( &CBaseEntity::SUB_DoNothing);
// search for all entities which target this multisource (pev->targetname)
@ -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( &CBaseButton::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( &CBaseButton::ButtonTouch );
}
else
{
SetTouch( NULL );
SetUse( &ButtonUse );
SetUse( &CBaseButton::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( &CBaseButton::ButtonSpark );
pev->nextthink = gpGlobals->time + ( 0.1 + RANDOM_FLOAT ( 0, 1.5 ) );// spark again at random interval
DoSpark( pev, pev->mins );
@ -680,7 +680,7 @@ void CBaseButton::ButtonActivate( ) @@ -680,7 +680,7 @@ void CBaseButton::ButtonActivate( )
ASSERT(m_toggle_state == TS_AT_BOTTOM);
m_toggle_state = TS_GOING_UP;
SetMoveDone( &TriggerAndWait );
SetMoveDone( &CBaseButton::TriggerAndWait );
if (!m_fRotating)
LinearMove( m_vecPosition2, pev->speed);
else
@ -709,12 +709,12 @@ void CBaseButton::TriggerAndWait( void ) @@ -709,12 +709,12 @@ void CBaseButton::TriggerAndWait( void )
SetTouch( NULL );
}
else
SetTouch( &ButtonTouch );
SetTouch( &CBaseButton::ButtonTouch );
}
else
{
pev->nextthink = pev->ltime + m_flWait;
SetThink( &ButtonReturn );
SetThink( &CBaseButton::ButtonReturn );
}
pev->frame = 1; // use alternate textures
@ -732,7 +732,7 @@ void CBaseButton::ButtonReturn( void ) @@ -732,7 +732,7 @@ void CBaseButton::ButtonReturn( void )
ASSERT(m_toggle_state == TS_AT_TOP);
m_toggle_state = TS_GOING_DOWN;
SetMoveDone( &ButtonBackHome );
SetMoveDone( &CBaseButton::ButtonBackHome );
if (!m_fRotating)
LinearMove( m_vecPosition1, pev->speed);
else
@ -784,12 +784,12 @@ void CBaseButton::ButtonBackHome( void ) @@ -784,12 +784,12 @@ void CBaseButton::ButtonBackHome( void )
SetTouch( NULL );
}
else
SetTouch( &ButtonTouch );
SetTouch( &CBaseButton::ButtonTouch );
// reset think for a sparking button
if ( FBitSet ( pev->spawnflags, SF_BUTTON_SPARK_IF_OFF ) )
{
SetThink( &ButtonSpark );
SetThink( &CBaseButton::ButtonSpark );
pev->nextthink = gpGlobals->time + 0.5;// no hurry.
}
}
@ -857,10 +857,10 @@ void CRotButton::Spawn( void ) @@ -857,10 +857,10 @@ void CRotButton::Spawn( void )
if ( !FBitSet ( pev->spawnflags, SF_BUTTON_TOUCH_ONLY ) )
{
SetTouch( NULL );
SetUse( &ButtonUse );
SetUse( &CBaseButton::ButtonUse );
}
else // touchable button
SetTouch( &ButtonTouch );
SetTouch( &CBaseButton::ButtonTouch );
//SetTouch( &ButtonTouch );
}
@ -1049,7 +1049,7 @@ void CMomentaryRotButton::UpdateSelf( float value ) @@ -1049,7 +1049,7 @@ void CMomentaryRotButton::UpdateSelf( float value )
pev->nextthink += 0.1;
pev->avelocity = (m_direction * pev->speed) * pev->movedir;
SetThink( &Off );
SetThink( &CMomentaryRotButton::Off );
}
void CMomentaryRotButton::UpdateTarget( float value )
@ -1077,7 +1077,7 @@ void CMomentaryRotButton::Off( void ) @@ -1077,7 +1077,7 @@ void CMomentaryRotButton::Off( void )
m_lastUsed = 0;
if ( FBitSet( pev->spawnflags, SF_PENDULUM_AUTO_RETURN ) && m_returnSpeed > 0 )
{
SetThink( &Return );
SetThink( &CMomentaryRotButton::Return );
pev->nextthink = pev->ltime + 0.1;
m_direction = -1;
}
@ -1154,14 +1154,14 @@ void CEnvSpark::Spawn(void) @@ -1154,14 +1154,14 @@ void CEnvSpark::Spawn(void)
{
if (FBitSet(pev->spawnflags, 64)) // Start on
{
SetThink( &SparkThink); // start sparking
SetUse( &SparkStop); // set up +USE to stop sparking
SetThink( &CEnvSpark::SparkThink); // start sparking
SetUse( &CEnvSpark::SparkStop); // set up +USE to stop sparking
}
else
SetUse( &SparkStart);
SetUse( &CEnvSpark::SparkStart);
}
else
SetThink( &SparkThink);
SetThink( &CEnvSpark::SparkThink);
pev->nextthink = gpGlobals->time + ( 0.1 + RANDOM_FLOAT ( 0, 1.5 ) );
@ -1208,14 +1208,14 @@ void EXPORT CEnvSpark::SparkThink(void) @@ -1208,14 +1208,14 @@ void EXPORT CEnvSpark::SparkThink(void)
void EXPORT CEnvSpark::SparkStart(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetUse( &SparkStop);
SetThink( &SparkThink);
SetUse( &CEnvSpark::SparkStop);
SetThink( &CEnvSpark::SparkThink);
pev->nextthink = gpGlobals->time + (0.1 + RANDOM_FLOAT ( 0, m_flDelay));
}
void EXPORT CEnvSpark::SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetUse( &SparkStart);
SetUse( &CEnvSpark::SparkStart);
SetThink( NULL );
}

4
dlls/client.cpp

@ -217,7 +217,7 @@ void Host_Say( edict_t *pEntity, int teamonly ) @@ -217,7 +217,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
{
CBasePlayer *client;
int j;
char *p;
char *p, *pc;
char text[128];
char szTemp[256];
const char *cpSay = "say";
@ -269,7 +269,7 @@ void Host_Say( edict_t *pEntity, int teamonly ) @@ -269,7 +269,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
}
// make sure the text has content
for ( char *pc = p; pc != NULL && *pc != 0; pc++ )
for ( pc = p; pc != NULL && *pc != 0; pc++ )
{
if ( !isspace( *pc ) )
{

12
dlls/combat.cpp

@ -115,7 +115,7 @@ void CGib :: SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs @@ -115,7 +115,7 @@ void CGib :: SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs
pGib->pev->movetype = MOVETYPE_TOSS;
pGib->pev->solid = SOLID_BBOX;
UTIL_SetSize ( pGib->pev, Vector ( 0, 0 ,0 ), Vector ( 0, 0, 0 ) );
pGib->SetTouch( &StickyGibTouch );
pGib->SetTouch( &CGib::StickyGibTouch );
pGib->SetThink( NULL );
}
pGib->LimitVelocity();
@ -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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time;
}
else
@ -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( &CBaseEntity::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( &CBaseEntity::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( &CBaseEntity::SUB_StartFadeOut);
pev->nextthink = gpGlobals->time + m_lifeTime;
// If you bleed, you stink!
@ -771,8 +771,8 @@ void CGib :: StickyGibTouch ( CBaseEntity *pOther ) @@ -771,8 +771,8 @@ void CGib :: StickyGibTouch ( CBaseEntity *pOther )
Vector vecSpot;
TraceResult tr;
SetThink( &SUB_Remove );
pev->nextthink = gpGlobals->time + 100;
SetThink( &CBaseEntity::SUB_Remove );
if ( !FClassnameIs( pOther->pev, "worldspawn" ) )
{

10
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( &CControllerHeadBall::HuntThink );
SetTouch( &CControllerHeadBall::BounceTouch );
m_vecIdeal = Vector( 0, 0, 0 );
@ -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( &CControllerHeadBall::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( &CControllerZapBall::AnimateThink );
SetTouch( &CControllerZapBall::ExplodeTouch );
m_hOwner = Instance( pev->owner );
pev->dmgtime = gpGlobals->time; // keep track of when ball spawned

8
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( &CCrossbowBolt::BoltTouch );
SetThink( &CCrossbowBolt::BubbleThink );
pev->nextthink = gpGlobals->time + 0.2;
}
@ -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( &CBaseEntity::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( &CCrossbowBolt::ExplodeThink );
pev->nextthink = gpGlobals->time + 0.1;
}
}

18
dlls/doors.cpp

@ -320,7 +320,7 @@ void CBaseDoor::Spawn( ) @@ -320,7 +320,7 @@ void CBaseDoor::Spawn( )
SetTouch( NULL );
}
else // touchable button
SetTouch( &DoorTouch );
SetTouch( &CBaseDoor::DoorTouch );
}
@ -520,7 +520,7 @@ void CBaseDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use @@ -520,7 +520,7 @@ void CBaseDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
{
m_hActivator = pActivator;
// if not ready to be used, ignore "use" command.
if (m_toggle_state == TS_AT_BOTTOM || FBitSet(pev->spawnflags, SF_DOOR_NO_AUTO_RETURN) && m_toggle_state == TS_AT_TOP)
if ( m_toggle_state == TS_AT_BOTTOM || ( FBitSet(pev->spawnflags, SF_DOOR_NO_AUTO_RETURN) && m_toggle_state == TS_AT_TOP ) )
DoorActivate();
}
@ -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( &CBaseDoor::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( &CBaseDoor::DoorTouch );
}
else
{
// In flWait seconds, DoorGoDown will fire, unless wait is -1, then door stays open
pev->nextthink = pev->ltime + m_flWait;
SetThink( &DoorGoDown );
SetThink( &CBaseDoor::DoorGoDown );
if ( m_flWait == -1 )
{
@ -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( &CBaseDoor::DoorHitBottom );
if ( FClassnameIs(pev, "func_door_rotating"))//rotating door
AngularMove( m_vecAngle1, pev->speed);
else
@ -688,7 +688,7 @@ void CBaseDoor::DoorHitBottom( void ) @@ -688,7 +688,7 @@ void CBaseDoor::DoorHitBottom( void )
SetTouch( NULL );
}
else // touchable door
SetTouch( &DoorTouch );
SetTouch( &CBaseDoor::DoorTouch );
SUB_UseTargets( m_hActivator, USE_TOGGLE, 0 ); // this isn't finished
@ -865,7 +865,7 @@ void CRotDoor::Spawn( void ) @@ -865,7 +865,7 @@ void CRotDoor::Spawn( void )
SetTouch( NULL );
}
else // touchable button
SetTouch( &DoorTouch );
SetTouch( &CBaseDoor::DoorTouch );
}
@ -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( &CMomentaryDoor::MomentaryMoveDone );
}
}

38
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( &CBubbling::FizzThink );
pev->nextthink = gpGlobals->time + 2.0;
m_state = 1;
}
@ -108,7 +108,7 @@ void CBubbling::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use @@ -108,7 +108,7 @@ void CBubbling::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
if ( m_state )
{
SetThink( &FizzThink );
SetThink( &CBubbling::FizzThink );
pev->nextthink = gpGlobals->time + 0.1;
}
else
@ -459,7 +459,7 @@ void CLightning::Spawn( void ) @@ -459,7 +459,7 @@ void CLightning::Spawn( void )
{
if ( FStringNull( m_iszSpriteName ) )
{
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
return;
}
pev->solid = SOLID_NOT; // Remove model & collisions
@ -472,7 +472,7 @@ void CLightning::Spawn( void ) @@ -472,7 +472,7 @@ void CLightning::Spawn( void )
SetThink( NULL );
if ( pev->dmg > 0 )
{
SetThink( &DamageThink );
SetThink( &CLightning::DamageThink );
pev->nextthink = gpGlobals->time + 0.1;
}
if ( pev->targetname )
@ -486,7 +486,7 @@ void CLightning::Spawn( void ) @@ -486,7 +486,7 @@ void CLightning::Spawn( void )
else
m_active = 1;
SetUse( &ToggleUse );
SetUse( &CLightning::ToggleUse );
}
}
else
@ -494,11 +494,11 @@ void CLightning::Spawn( void ) @@ -494,11 +494,11 @@ void CLightning::Spawn( void )
m_active = 0;
if ( !FStringNull(pev->targetname) )
{
SetUse( &StrikeUse );
SetUse( &CLightning::StrikeUse );
}
if ( FStringNull(pev->targetname) || FBitSet(pev->spawnflags, SF_BEAM_STARTON) )
{
SetThink( &StrikeThink );
SetThink( &CLightning::StrikeThink );
pev->nextthink = gpGlobals->time + 1.0;
}
}
@ -616,7 +616,7 @@ void CLightning::StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T @@ -616,7 +616,7 @@ void CLightning::StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
}
else
{
SetThink( &StrikeThink );
SetThink( &CLightning::StrikeThink );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -961,13 +961,13 @@ void CLaser::Spawn( void ) @@ -961,13 +961,13 @@ void CLaser::Spawn( void )
{
if ( FStringNull( pev->model ) )
{
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
return;
}
pev->solid = SOLID_NOT; // Remove model & collisions
Precache( );
SetThink( &StrikeThink );
SetThink( &CLaser::StrikeThink );
pev->flags |= FL_CUSTOMENTITY;
PointsInit( pev->origin, pev->origin );
@ -1264,7 +1264,7 @@ void CSprite::Expand( float scaleSpeed, float fadeSpeed ) @@ -1264,7 +1264,7 @@ void CSprite::Expand( float scaleSpeed, float fadeSpeed )
{
pev->speed = scaleSpeed;
pev->health = fadeSpeed;
SetThink( &ExpandThink );
SetThink( &CSprite::ExpandThink );
pev->nextthink = gpGlobals->time;
m_lastTime = gpGlobals->time;
@ -1319,7 +1319,7 @@ void CSprite::TurnOn( void ) @@ -1319,7 +1319,7 @@ void CSprite::TurnOn( void )
pev->effects = 0;
if ( (pev->framerate && m_maxFrame > 1.0) || (pev->spawnflags & SF_SPRITE_ONCE) )
{
SetThink( &AnimateThink );
SetThink( &CSprite::CSprite::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( &CGibShooter::ShootThink );
pev->nextthink = gpGlobals->time;
}
@ -1516,7 +1516,7 @@ void CGibShooter :: ShootThink ( void ) @@ -1516,7 +1516,7 @@ void CGibShooter :: ShootThink ( void )
}
else
{
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time;
}
}
@ -1708,7 +1708,7 @@ void CTestEffect::TestThink( void ) @@ -1708,7 +1708,7 @@ void CTestEffect::TestThink( void )
void CTestEffect::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
SetThink( &TestThink );
SetThink( &CTestEffect::TestThink );
pev->nextthink = gpGlobals->time + 0.1;
m_flStartTime = gpGlobals->time;
}
@ -2129,7 +2129,7 @@ void CEnvFunnel::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us @@ -2129,7 +2129,7 @@ void CEnvFunnel::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
MESSAGE_END();
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time;
}
@ -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( &CItemSoda::CanThink);
pev->nextthink = gpGlobals->time + 0.5;
}
@ -2239,7 +2239,7 @@ void CItemSoda::CanThink ( void ) @@ -2239,7 +2239,7 @@ void CItemSoda::CanThink ( void )
pev->solid = SOLID_TRIGGER;
UTIL_SetSize ( pev, Vector ( -8, -8, 0 ), Vector ( 8, 8, 8 ) );
SetThink( NULL );
SetTouch( &CanTouch );
SetTouch( &CItemSoda::CanTouch );
}
void CItemSoda::CanTouch ( CBaseEntity *pOther )
@ -2263,6 +2263,6 @@ void CItemSoda::CanTouch ( CBaseEntity *pOther ) @@ -2263,6 +2263,6 @@ void CItemSoda::CanTouch ( CBaseEntity *pOther )
pev->movetype = MOVETYPE_NONE;
pev->effects = EF_NODRAW;
SetTouch( NULL );
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time;
}

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( &CEnvExplosion::Smoke );
pev->nextthink = gpGlobals->time + 0.3;
// draw sparks

10
dlls/extdll.h

@ -39,7 +39,17 @@ @@ -39,7 +39,17 @@
#define NOSERVICE
#define NOMCX
#define NOIME
#define HSPRITE HSPRITE_w32
#include "windows.h"
#undef HSPRITE
#ifdef __amd64__
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#endif
#else // _WIN32
#define FALSE 0
#define TRUE (!FALSE)

8
dlls/func_break.cpp

@ -164,7 +164,7 @@ void CBreakable::Spawn( void ) @@ -164,7 +164,7 @@ void CBreakable::Spawn( void )
SET_MODEL(ENT(pev), STRING(pev->model) );//set size and link into world.
SetTouch( &BreakTouch );
SetTouch( &CBreakable::BreakTouch );
if ( FBitSet( pev->spawnflags, SF_BREAK_TRIGGER_ONLY ) ) // Only break on trigger
SetTouch( NULL );
@ -359,7 +359,7 @@ void CBreakable::DamageSound( void ) @@ -359,7 +359,7 @@ void CBreakable::DamageSound( void )
int pitch;
float fvol;
char *rgpsz[6];
int i;
int i = 0;
int material = m_Material;
// if (RANDOM_LONG(0,1))
@ -459,7 +459,7 @@ void CBreakable::BreakTouch( CBaseEntity *pOther ) @@ -459,7 +459,7 @@ void CBreakable::BreakTouch( CBaseEntity *pOther )
// play creaking sound here.
DamageSound();
SetThink( &Die );
SetThink( &CBreakable::Die );
SetTouch( NULL );
if ( m_flDelay == 0 )
@ -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( &CBaseEntity::SUB_Remove );
pev->nextthink = pev->ltime + 0.1;
if ( m_iszSpawnObject )
CBaseEntity::Create( (char *)STRING(m_iszSpawnObject), VecBModelOrigin(pev), pev->angles, edict() );

6
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( &CBaseEntity::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( &CBaseEntity::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( &CBaseEntity::SUB_FadeOut );
}
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, pev->origin );
WRITE_BYTE( TE_BREAKMODEL);

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( &CGrenade::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( &CGrenade::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( &CGrenade::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( &CGrenade::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( &CGrenade::DangerSoundThink );
pGrenade->pev->nextthink = gpGlobals->time;
// Tumble in air
pGrenade->pev->avelocity.x = RANDOM_FLOAT ( -100, -500 );
// Explode on contact
pGrenade->SetTouch( &ExplodeTouch );
pGrenade->SetTouch( &CGrenade::ExplodeTouch );
pGrenade->pev->dmg = 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( &CGrenade::BounceTouch ); // Bounce if touched
// Take one second off of the desired detonation time and set the think to PreDetonate. PreDetonate
// will insert a DANGER sound into the world sound list and delay detonation for one second so that
// the grenade explodes after the exact amount of time specified in the call to ShootTimed().
pGrenade->pev->dmgtime = gpGlobals->time + time;
pGrenade->SetThink( &TumbleThink );
pGrenade->SetThink( &CGrenade::TumbleThink );
pGrenade->pev->nextthink = gpGlobals->time + 0.1;
if (time < 0.1)
{
@ -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( &CBaseEntity::SUB_DoNothing );
pGrenade->SetUse( &CGrenade::DetonateUse );
pGrenade->SetTouch( &CGrenade::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( &CRecharge::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( &CBaseEntity::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( &CRecharge::Recharge);
}
else
SetThink( &SUB_DoNothing );
SetThink( &CBaseEntity::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( &CLegacyCineMonster::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( &CLegacyCineMonster::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( &CBaseEntity::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( &CCineBlood::BloodGush );
pev->nextthink = gpGlobals->time;// now!
}
void CCineBlood :: Spawn ( void )
{
pev->solid = SOLID_NOT;
SetUse( &BloodStart );
SetUse( &CCineBlood::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( &CBasePlayerItem::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( &CHandGrenade::DestroyItem );
SetThink( &CBasePlayerItem::DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}

2
dlls/headcrab.cpp

@ -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( &CHeadCrab::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( &CWallHealth::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( &CBaseEntity::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( &CWallHealth::Recharge );
}
else
SetThink( &SUB_DoNothing );
SetThink( &CBaseEntity::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( &CHGruntRepel::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( &CBaseEntity::SUB_Remove );
pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5;
UTIL_Remove( this );

16
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( &CHornet::DieTouch );
SetThink( &CHornet::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( &CHornet::TrackTouch );
SetThink( &CHornet::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( &CHornet::DartTouch );
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 4;
}
@ -257,7 +257,7 @@ void CHornet :: TrackTarget ( void ) @@ -257,7 +257,7 @@ void CHornet :: TrackTarget ( void )
if (gpGlobals->time > m_flStopAttack)
{
SetTouch( NULL );
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 1;// stick around long enough for the sound to finish!
}

2
dlls/houndeye.cpp

@ -97,7 +97,7 @@ public: @@ -97,7 +97,7 @@ public:
BOOL FValidateHintType ( short sHint );
BOOL FCanActiveIdle ( void );
Schedule_t *GetScheduleOfType ( int Type );
Schedule_t *CHoundeye :: GetSchedule( void );
Schedule_t *GetSchedule( void );
int Save( CSave &save );
int Restore( CRestore &restore );

4
dlls/ichthyosaur.cpp

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

6
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( &CItem::ItemTouch );
if (DROP_TO_FLOOR(ENT(pev)) == 0)
{
@ -152,7 +152,7 @@ CBaseEntity* CItem::Respawn( void ) @@ -152,7 +152,7 @@ CBaseEntity* CItem::Respawn( void )
UTIL_SetOrigin( pev, m_SpawnPoint );// blip to whereever you should respawn.
SetThink( &Materialize );
SetThink( &CItem::Materialize );
pev->nextthink = g_pGameRules->FlItemRespawnTime( this );
return this;
}
@ -188,7 +188,7 @@ void CItem::Materialize( void ) @@ -188,7 +188,7 @@ void CItem::Materialize( void )
if( m_SpawnPoint != Vector( 0, 0, 0 ) )
UTIL_SetOrigin( pev, m_SpawnPoint );// blip to whereever you should respawn.
SetTouch( &ItemTouch );
SetTouch( &CItem::ItemTouch );
}
#define SF_SUIT_SHORTLOGON 0x0001

4
dlls/leech.cpp

@ -196,7 +196,7 @@ void CLeech::Spawn( void ) @@ -196,7 +196,7 @@ void CLeech::Spawn( void )
m_flFieldOfView = -0.5; // 180 degree FOV
m_flDistLook = 750;
MonsterInit();
SetThink( &SwimThink );
SetThink( &CLeech::SwimThink );
SetUse( NULL );
SetTouch( NULL );
pev->view_ofs = g_vecZero;
@ -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( &CLeech::DeadThink );
}

12
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( &CMonsterMaker::CyclicUse );// drop one monster each time we fire
}
else
{
SetUse( &ToggleUse );// so can be turned on/off
SetUse( &CMonsterMaker::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( &CMonsterMaker::MakerThink );
}
else
{// wait to be activated.
m_fActive = FALSE;
SetThink( &SUB_DoNothing );
SetThink( &CBaseEntity::SUB_DoNothing );
}
}
else
{// no targetname, just start.
pev->nextthink = gpGlobals->time + m_flDelay;
m_fActive = TRUE;
SetThink( &MakerThink );
SetThink( &CMonsterMaker::MakerThink );
}
if ( m_cNumMonsters == 1 )
@ -259,7 +259,7 @@ void CMonsterMaker :: ToggleUse ( CBaseEntity *pActivator, CBaseEntity *pCaller, @@ -259,7 +259,7 @@ void CMonsterMaker :: ToggleUse ( CBaseEntity *pActivator, CBaseEntity *pCaller,
else
{
m_fActive = TRUE;
SetThink( &MakerThink );
SetThink( &CMonsterMaker::MakerThink );
}
pev->nextthink = gpGlobals->time;

8
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( &CBaseMonster::MonsterInitThink );
pev->nextthink = gpGlobals->time + 0.1;
SetUse( &MonsterUse );
SetUse( &CBaseMonster::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( &CBaseMonster::CallMonsterThink );
pev->nextthink += RANDOM_FLOAT(0.1, 0.4); // spread think times.
if ( !FStringNull(pev->targetname) )// wait until triggered
@ -3289,7 +3289,7 @@ void CBaseMonster :: MonsterInitDead( void ) @@ -3289,7 +3289,7 @@ void CBaseMonster :: MonsterInitDead( void )
// Setup health counters, etc.
BecomeDead();
SetThink( &CorpseFallThink );
SetThink( &CBaseMonster::CorpseFallThink );
pev->nextthink = gpGlobals->time + 0.5;
}

4
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( &CFuncMortarField::FieldUse );
Precache();
}
@ -209,7 +209,7 @@ void CMortar::Spawn( ) @@ -209,7 +209,7 @@ void CMortar::Spawn( )
pev->dmg = 200;
SetThink( &MortarExplode );
SetThink( &CMortar::MortarExplode );
pev->nextthink = 0;
Precache( );

2
dlls/multiplay_gamerules.cpp

@ -563,7 +563,7 @@ void CHalfLifeMultiplay :: PlayerSpawn( CBasePlayer *pPlayer ) @@ -563,7 +563,7 @@ void CHalfLifeMultiplay :: PlayerSpawn( CBasePlayer *pPlayer )
addDefault = TRUE;
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
while ( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) )
{
pWeaponEntity->Touch( pPlayer );
addDefault = FALSE;

31
dlls/nihilanth.cpp

@ -300,7 +300,7 @@ void CNihilanth :: Spawn( void ) @@ -300,7 +300,7 @@ void CNihilanth :: Spawn( void )
InitBoneControllers();
SetThink( &StartupThink );
SetThink( &CNihilanth::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( &CNihilanth::HuntThink );
pev->nextthink = gpGlobals->time + 0.1;
SetUse( &CommandUse );
SetUse( &CNihilanth::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( &CNihilanth::HuntThink);
SetUse( &CNihilanth::CommandUse );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -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( &CNihilanth::DyingThink );
m_fSequenceFinished = TRUE;
return;
}
@ -1018,8 +1018,9 @@ BOOL CNihilanth :: EmitSphere( void ) @@ -1018,8 +1018,9 @@ BOOL CNihilanth :: EmitSphere( void )
void CNihilanth :: TargetSphere( USE_TYPE useType, float value )
{
int i;
CBaseMonster *pSphere;
for (int i = 0; i < N_SPHERES; i++)
for (i = 0; i < N_SPHERES; i++)
{
if (m_hSphere[i] != NULL)
{
@ -1330,8 +1331,8 @@ void CNihilanthHVR :: CircleInit( CBaseEntity *pTarget ) @@ -1330,8 +1331,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( &CNihilanthHVR::HoverThink );
SetTouch( &CNihilanthHVR::BounceTouch );
pev->nextthink = gpGlobals->time + 0.1;
m_hTargetEnt = pTarget;
@ -1433,8 +1434,8 @@ void CNihilanthHVR :: ZapInit( CBaseEntity *pEnemy ) @@ -1433,8 +1434,8 @@ void CNihilanthHVR :: ZapInit( CBaseEntity *pEnemy )
pev->velocity = (pEnemy->pev->origin - pev->origin).Normalize() * 200;
m_hEnemy = pEnemy;
SetThink( &ZapThink );
SetTouch( &ZapTouch );
SetThink( &CNihilanthHVR::ZapThink );
SetTouch( &CNihilanthHVR::ZapTouch );
pev->nextthink = gpGlobals->time + 0.1;
EMIT_SOUND_DYN( edict(), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0, 100 );
@ -1559,8 +1560,8 @@ void CNihilanthHVR :: TeleportInit( CNihilanth *pOwner, CBaseEntity *pEnemy, CBa @@ -1559,8 +1560,8 @@ void CNihilanthHVR :: TeleportInit( CNihilanth *pOwner, CBaseEntity *pEnemy, CBa
m_hTargetEnt = pTarget;
m_hTouch = pTouch;
SetThink( &TeleportThink );
SetTouch( &TeleportTouch );
SetThink( &CNihilanthHVR::TeleportThink );
SetTouch( &CNihilanthHVR::TeleportTouch );
pev->nextthink = gpGlobals->time + 0.1;
EMIT_SOUND_DYN( edict(), CHAN_WEAPON, "x/x_teleattack1.wav", 1, 0.2, 0, 100 );
@ -1579,7 +1580,7 @@ void CNihilanthHVR :: GreenBallInit( ) @@ -1579,7 +1580,7 @@ void CNihilanthHVR :: GreenBallInit( )
SET_MODEL(edict(), "sprites/exit1.spr");
SetTouch( &RemoveTouch );
SetTouch( &CNihilanthHVR::RemoveTouch );
}
@ -1631,7 +1632,7 @@ void CNihilanthHVR :: TeleportThink( void ) @@ -1631,7 +1632,7 @@ void CNihilanthHVR :: TeleportThink( void )
void CNihilanthHVR :: AbsorbInit( void )
{
SetThink( &DissipateThink );
SetThink( &CNihilanthHVR::DissipateThink );
pev->renderamt = 255;
MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );

69
dlls/nodes.cpp

@ -40,7 +40,7 @@ CGraph WorldGraph; @@ -40,7 +40,7 @@ CGraph WorldGraph;
LINK_ENTITY_TO_CLASS( info_node, CNodeEnt );
LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt );
#ifdef __linux__
#ifdef _LINUX
#include <unistd.h>
#include <sys/stat.h>
#define CreateDirectory(p, n) mkdir(p, 0777)
@ -636,6 +636,7 @@ int CGraph :: FindShortestPath ( int *piPath, int iStart, int iDest, int iHull, @@ -636,6 +636,7 @@ int CGraph :: FindShortestPath ( int *piPath, int iStart, int iDest, int iHull,
}
else
{
int i;
CQueuePriority queue;
switch( iHull )
@ -656,7 +657,7 @@ int CGraph :: FindShortestPath ( int *piPath, int iStart, int iDest, int iHull, @@ -656,7 +657,7 @@ int CGraph :: FindShortestPath ( int *piPath, int iStart, int iDest, int iHull,
// Mark all the nodes as unvisited.
//
for ( int i = 0; i < m_cNodes; i++)
for ( i = 0; i < m_cNodes; i++)
{
m_pNodes[ i ].m_flClosestSoFar = -1.0;
}
@ -888,7 +889,7 @@ int CGraph :: FindNearestNode ( const Vector &vecOrigin, int afNodeTypes ) @@ -888,7 +889,7 @@ int CGraph :: FindNearestNode ( const Vector &vecOrigin, int afNodeTypes )
m_CheckedCounter++;
if (m_CheckedCounter == 0)
{
for (int i = 0; i < m_cNodes; i++)
for ( i = 0; i < m_cNodes; i++ )
{
m_di[i].m_CheckedEvent = 0;
}
@ -1274,7 +1275,8 @@ int CGraph :: LinkVisibleNodes ( CLink *pLinkPool, FILE *file, int *piBadNode ) @@ -1274,7 +1275,8 @@ int CGraph :: LinkVisibleNodes ( CLink *pLinkPool, FILE *file, int *piBadNode )
fprintf ( file, " Entity on connection: %s, name: %s Model: %s", STRING( VARS( pTraceEnt )->classname ), STRING ( VARS( pTraceEnt )->targetname ), STRING ( VARS(tr.pHit)->model ) );
}
fprintf ( file, "\n", j );
//fprintf ( file, "\n", j );
fprintf ( file, "\n" );
}
pLinkPool [ cTotalLinks ].m_iDestNode = j;
@ -1459,12 +1461,12 @@ void CTestHull :: Spawn( entvars_t *pevMasterNode ) @@ -1459,12 +1461,12 @@ void CTestHull :: Spawn( entvars_t *pevMasterNode )
if ( WorldGraph.m_fGraphPresent )
{// graph loaded from disk, so we don't need the test hull
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time;
}
else
{
SetThink( &DropDelay );
SetThink( &CTestHull::DropDelay );
pev->nextthink = gpGlobals->time + 1;
}
@ -1484,7 +1486,7 @@ void CTestHull::DropDelay ( void ) @@ -1484,7 +1486,7 @@ void CTestHull::DropDelay ( void )
UTIL_SetOrigin ( VARS(pev), WorldGraph.m_pNodes[ 0 ].m_vecOrigin );
SetThink( &CallBuildNodeGraph );
SetThink( &CTestHull::CallBuildNodeGraph );
pev->nextthink = gpGlobals->time + 1;
}
@ -1593,7 +1595,7 @@ void CTestHull::CallBuildNodeGraph( void ) @@ -1593,7 +1595,7 @@ void CTestHull::CallBuildNodeGraph( void )
//=========================================================
void CTestHull :: BuildNodeGraph( void )
{
TraceResult tr;
//TraceResult tr;
FILE *file;
char szNrpFilename [MAX_PATH];// text node report filename
@ -1632,7 +1634,7 @@ void CTestHull :: BuildNodeGraph( void ) @@ -1632,7 +1634,7 @@ void CTestHull :: BuildNodeGraph( void )
float flDist;
int step;
SetThink( &SUB_Remove );// no matter what happens, the hull gets rid of itself.
SetThink( &CBaseEntity::SUB_Remove );// no matter what happens, the hull gets rid of itself.
pev->nextthink = gpGlobals->time;
// malloc a swollen temporary connection pool that we trim down after we know exactly how many connections there are.
@ -1744,7 +1746,7 @@ void CTestHull :: BuildNodeGraph( void ) @@ -1744,7 +1746,7 @@ void CTestHull :: BuildNodeGraph( void )
{
ALERT ( at_aiconsole, "**ConnectVisibleNodes FAILED!\n" );
SetThink( &ShowBadNode );// send the hull off to show the offending node.
SetThink( &CTestHull::ShowBadNode );// send the hull off to show the offending node.
//pev->solid = SOLID_NOT;
pev->origin = WorldGraph.m_pNodes[ iBadNode ].m_vecOrigin;
@ -1883,17 +1885,17 @@ void CTestHull :: BuildNodeGraph( void ) @@ -1883,17 +1885,17 @@ void CTestHull :: BuildNodeGraph( void )
switch ( hull )
{
case NODE_SMALL_HULL: // if this hull can't fit, nothing can, so drop the connection
fprintf ( file, "NODE_SMALL_HULL step %f\n", step );
fprintf ( file, "NODE_SMALL_HULL step %d\n", step );
pTempPool[ pSrcNode->m_iFirstLink + j ].m_afLinkInfo &= ~(bits_LINK_SMALL_HULL | bits_LINK_HUMAN_HULL | bits_LINK_LARGE_HULL);
fSkipRemainingHulls = TRUE;// don't bother checking larger hulls
break;
case NODE_HUMAN_HULL:
fprintf ( file, "NODE_HUMAN_HULL step %f\n", step );
fprintf ( file, "NODE_HUMAN_HULL step %d\n", step );
pTempPool[ pSrcNode->m_iFirstLink + j ].m_afLinkInfo &= ~(bits_LINK_HUMAN_HULL | bits_LINK_LARGE_HULL);
fSkipRemainingHulls = TRUE;// don't bother checking larger hulls
break;
case NODE_LARGE_HULL:
fprintf ( file, "NODE_LARGE_HULL step %f\n", step );
fprintf ( file, "NODE_LARGE_HULL step %d\n", step );
pTempPool[ pSrcNode->m_iFirstLink + j ].m_afLinkInfo &= ~bits_LINK_LARGE_HULL;
break;
}
@ -2722,6 +2724,7 @@ int Primes[NUMBER_OF_PRIMES] = @@ -2722,6 +2724,7 @@ int Primes[NUMBER_OF_PRIMES] =
void CGraph::HashChoosePrimes(int TableSize)
{
int iPrime, iZone;
int LargestPrime = TableSize/2;
if (LargestPrime > Primes[NUMBER_OF_PRIMES-2])
{
@ -2733,7 +2736,7 @@ void CGraph::HashChoosePrimes(int TableSize) @@ -2733,7 +2736,7 @@ void CGraph::HashChoosePrimes(int TableSize)
// We divide this interval into 16 equal sized zones. We want to find
// one prime number that best represents that zone.
//
for (int iZone = 1, iPrime = 0; iPrime < 16; iZone += Spacing)
for ( iZone = 1, iPrime = 0; iPrime < 16; iZone += Spacing )
{
// Search for a prime number that is less than the target zone
// number given by iZone.
@ -2789,9 +2792,9 @@ void CGraph::SortNodes(void) @@ -2789,9 +2792,9 @@ void CGraph::SortNodes(void)
// After assigning new node numbers to everything, we move
// things and patchup the links.
//
int iNodeCnt = 0;
int i, iNodeCnt = 0;
m_pNodes[0].m_iPreviousNode = iNodeCnt++;
for (int i = 1; i < m_cNodes; i++)
for (i = 1; i < m_cNodes; i++)
{
m_pNodes[i].m_iPreviousNode = UNNUMBERED_NODE;
}
@ -2847,6 +2850,7 @@ void CGraph::SortNodes(void) @@ -2847,6 +2850,7 @@ void CGraph::SortNodes(void)
void CGraph::BuildLinkLookups(void)
{
int i;
m_nHashLinks = 3*m_cLinks/2 + 3;
HashChoosePrimes(m_nHashLinks);
@ -2856,7 +2860,7 @@ void CGraph::BuildLinkLookups(void) @@ -2856,7 +2860,7 @@ void CGraph::BuildLinkLookups(void)
ALERT(at_aiconsole, "Couldn't allocated Link Lookup Table.\n");
return;
}
for (int i = 0; i < m_nHashLinks; i++)
for ( i = 0; i < m_nHashLinks; i++ )
{
m_pHashLinks[i] = ENTRY_STATE_EMPTY;
}
@ -2882,6 +2886,7 @@ void CGraph::BuildLinkLookups(void) @@ -2882,6 +2886,7 @@ void CGraph::BuildLinkLookups(void)
void CGraph::BuildRegionTables(void)
{
int i, j;
if (m_di) free(m_di);
// Go ahead and setup for range searching the nodes for FindNearestNodes
@ -2896,7 +2901,7 @@ void CGraph::BuildRegionTables(void) @@ -2896,7 +2901,7 @@ void CGraph::BuildRegionTables(void)
// Calculate regions for all the nodes.
//
//
for (int i = 0; i < 3; i++)
for ( i = 0; i < 3; i++ )
{
m_RegionMin[i] = 999999999.0; // just a big number out there;
m_RegionMax[i] = -999999999.0; // just a big number out there;
@ -2926,7 +2931,7 @@ void CGraph::BuildRegionTables(void) @@ -2926,7 +2931,7 @@ void CGraph::BuildRegionTables(void)
for (i = 0; i < 3; i++)
{
for (int j = 0; j < NUM_RANGES; j++)
for (j = 0; j < NUM_RANGES; j++)
{
m_RangeStart[i][j] = 255;
m_RangeEnd[i][j] = 0;
@ -3029,6 +3034,7 @@ void CGraph::BuildRegionTables(void) @@ -3029,6 +3034,7 @@ void CGraph::BuildRegionTables(void)
void CGraph :: ComputeStaticRoutingTables( void )
{
int iFrom;
int nRoutes = m_cNodes*m_cNodes;
#define FROM_TO(x,y) ((x)*m_cNodes+(y))
short *Routes = new short[nRoutes];
@ -3060,7 +3066,7 @@ void CGraph :: ComputeStaticRoutingTables( void ) @@ -3060,7 +3066,7 @@ void CGraph :: ComputeStaticRoutingTables( void )
// Initialize Routing table to uncalculated.
//
for (int iFrom = 0; iFrom < m_cNodes; iFrom++)
for (iFrom = 0; iFrom < m_cNodes; iFrom++)
{
for (int iTo = 0; iTo < m_cNodes; iTo++)
{
@ -3276,7 +3282,8 @@ void CGraph :: ComputeStaticRoutingTables( void ) @@ -3276,7 +3282,8 @@ void CGraph :: ComputeStaticRoutingTables( void )
int nRoute = p - pRoute;
if (m_pRouteInfo)
{
for (int i = 0; i < m_nRouteInfo - nRoute; i++)
int i;
for (i = 0; i < m_nRouteInfo - nRoute; i++)
{
if (memcmp(m_pRouteInfo + i, pRoute, nRoute) == 0)
{
@ -3312,10 +3319,11 @@ void CGraph :: ComputeStaticRoutingTables( void ) @@ -3312,10 +3319,11 @@ void CGraph :: ComputeStaticRoutingTables( void )
}
ALERT( at_aiconsole, "Size of Routes = %d\n", nTotalCompressedSize);
}
if (Routes) delete Routes;
if (BestNextNodes) delete BestNextNodes;
if (pRoute) delete pRoute;
if (pMyPath) delete pMyPath;
if ( Routes ) delete[] Routes;
if ( BestNextNodes ) delete[] BestNextNodes;
if ( pRoute ) delete[] pRoute;
if ( pMyPath ) delete[] pMyPath;
Routes = 0;
BestNextNodes = 0;
pRoute = 0;
@ -3331,6 +3339,7 @@ void CGraph :: ComputeStaticRoutingTables( void ) @@ -3331,6 +3339,7 @@ void CGraph :: ComputeStaticRoutingTables( void )
//
void CGraph :: TestRoutingTables( void )
{
int i;
int *pMyPath = new int[m_cNodes];
int *pMyPath2 = new int[m_cNodes];
if (pMyPath && pMyPath2)
@ -3368,7 +3377,7 @@ void CGraph :: TestRoutingTables( void ) @@ -3368,7 +3377,7 @@ void CGraph :: TestRoutingTables( void )
//
#if 1
float flDistance1 = 0.0;
for (int i = 0; i < cPathSize1-1; i++)
for ( i = 0; i < cPathSize1-1; i++ )
{
// Find the link from pMyPath[i] to pMyPath[i+1]
//
@ -3422,7 +3431,7 @@ void CGraph :: TestRoutingTables( void ) @@ -3422,7 +3431,7 @@ void CGraph :: TestRoutingTables( void )
#endif
ALERT(at_aiconsole, "Routing is inconsistent!!!\n");
ALERT(at_aiconsole, "(%d to %d |%d/%d)1:", iFrom, iTo, iHull, iCap);
for (int i = 0; i < cPathSize1; i++)
for ( i = 0; i < cPathSize1; i++ )
{
ALERT(at_aiconsole, "%d ", pMyPath[i]);
}
@ -3446,8 +3455,8 @@ void CGraph :: TestRoutingTables( void ) @@ -3446,8 +3455,8 @@ void CGraph :: TestRoutingTables( void )
EnoughSaid:
if (pMyPath) delete pMyPath;
if (pMyPath2) delete pMyPath2;
if (pMyPath) delete[] pMyPath;
if (pMyPath2) delete[] pMyPath2;
pMyPath = 0;
pMyPath2 = 0;
}
@ -3559,7 +3568,7 @@ void CNodeViewer::Spawn( ) @@ -3559,7 +3568,7 @@ void CNodeViewer::Spawn( )
ALERT( at_aiconsole, "%d nodes\n", m_nVisited );
m_iDraw = 0;
SetThink( &DrawThink );
SetThink( &CNodeViewer::DrawThink );
pev->nextthink = gpGlobals->time;
}

18
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( &COsprey::FindAllThink );
SetUse( &COsprey::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( &COsprey::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( &COsprey::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( &CBaseEntity::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( &COsprey::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( &COsprey::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( &COsprey::DyingThink );
SetTouch( &COsprey::CrashTouch );
pev->nextthink = gpGlobals->time + 0.1;
pev->health = 0;
pev->takedamage = DAMAGE_NO;

50
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( &CFuncPlat::PlatUse );
}
else
{
@ -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( &CFuncPlat::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( &CFuncPlat::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( &CFuncPlat::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( &CFuncTrain::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( &CFuncTrain::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( &CFuncTrain::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( &CFuncTrain::Next );
pev->nextthink = pev->ltime + 0.1;
}
}
@ -1126,7 +1126,7 @@ void CFuncTrackTrain :: UpdateSound( void ) @@ -1126,7 +1126,7 @@ void CFuncTrackTrain :: UpdateSound( void )
if (!pev->noise)
return;
flpitch = TRAIN_STARTPITCH + (abs(pev->speed) * (TRAIN_MAXPITCH - TRAIN_STARTPITCH) / TRAIN_MAXSPEED);
flpitch = TRAIN_STARTPITCH + (fabs(pev->speed) * (TRAIN_MAXPITCH - TRAIN_STARTPITCH) / TRAIN_MAXSPEED);
if (!m_soundPlaying)
{
@ -1262,7 +1262,7 @@ void CFuncTrackTrain :: Next( void ) @@ -1262,7 +1262,7 @@ void CFuncTrackTrain :: Next( void )
}
}
SetThink( &Next );
SetThink( &CFuncTrackTrain::Next );
NextThink( pev->ltime + time, TRUE );
}
else // end of path, stop
@ -1284,7 +1284,7 @@ void CFuncTrackTrain :: Next( void ) @@ -1284,7 +1284,7 @@ void CFuncTrackTrain :: Next( void )
// no, how long to get there?
time = distance / m_oldSpeed;
pev->velocity = pev->velocity * (m_oldSpeed / distance);
SetThink( &DeadEnd );
SetThink( &CFuncTrackTrain::DeadEnd );
NextThink( pev->ltime + time, FALSE );
}
else
@ -1402,7 +1402,7 @@ void CFuncTrackTrain :: Find( void ) @@ -1402,7 +1402,7 @@ void CFuncTrackTrain :: Find( void )
pev->angles.x = 0;
UTIL_SetOrigin( pev, nextPos );
NextThink( pev->ltime + 0.1, FALSE );
SetThink( &Next );
SetThink( &CFuncTrackTrain::Next );
pev->speed = m_startSpeed;
UpdateSound();
@ -1452,7 +1452,7 @@ void CFuncTrackTrain :: NearestPath( void ) @@ -1452,7 +1452,7 @@ void CFuncTrackTrain :: NearestPath( void )
if ( pev->speed != 0 )
{
NextThink( pev->ltime + 0.1, FALSE );
SetThink( &Next );
SetThink( &CFuncTrackTrain::Next );
}
}
@ -1460,7 +1460,7 @@ void CFuncTrackTrain :: NearestPath( void ) @@ -1460,7 +1460,7 @@ void CFuncTrackTrain :: NearestPath( void )
void CFuncTrackTrain::OverrideReset( void )
{
NextThink( pev->ltime + 0.1, FALSE );
SetThink( &NearestPath );
SetThink( &CFuncTrackTrain::NearestPath );
}
@ -1519,7 +1519,7 @@ void CFuncTrackTrain :: Spawn( void ) @@ -1519,7 +1519,7 @@ void CFuncTrackTrain :: Spawn( void )
// start trains on the next frame, to make sure their targets have had
// a chance to spawn/activate
NextThink( pev->ltime + 0.1, FALSE );
SetThink( &Find );
SetThink( &CFuncTrackTrain::Find );
Precache();
}
@ -1589,7 +1589,7 @@ void CFuncTrainControls :: Spawn( void ) @@ -1589,7 +1589,7 @@ void CFuncTrainControls :: Spawn( void )
UTIL_SetSize( pev, pev->mins, pev->maxs );
UTIL_SetOrigin( pev, pev->origin );
SetThink( &Find );
SetThink( &CFuncTrainControls::Find );
pev->nextthink = gpGlobals->time;
}
@ -1701,7 +1701,7 @@ void CFuncTrackChange :: Spawn( void ) @@ -1701,7 +1701,7 @@ void CFuncTrackChange :: Spawn( void )
EnableUse();
pev->nextthink = pev->ltime + 2.0;
SetThink( &Find );
SetThink( &CFuncTrackChange::Find );
Precache();
}
@ -1752,7 +1752,7 @@ void CFuncTrackChange :: KeyValue( KeyValueData *pkvd ) @@ -1752,7 +1752,7 @@ void CFuncTrackChange :: KeyValue( KeyValueData *pkvd )
void CFuncTrackChange::OverrideReset( void )
{
pev->nextthink = pev->ltime + 1.0;
SetThink( &Find );
SetThink( &CFuncTrackChange::Find );
}
void CFuncTrackChange :: Find( void )
@ -1862,14 +1862,14 @@ void CFuncTrackChange :: GoDown( void ) @@ -1862,14 +1862,14 @@ void CFuncTrackChange :: GoDown( void )
// If ROTMOVE, move & rotate
if ( FBitSet( pev->spawnflags, SF_TRACK_DONT_MOVE ) )
{
SetMoveDone( &CallHitBottom );
SetMoveDone( &CFuncPlat::CallHitBottom );
m_toggle_state = TS_GOING_DOWN;
AngularMove( m_start, pev->speed );
}
else
{
CFuncPlat :: GoDown();
SetMoveDone( &CallHitBottom );
SetMoveDone( &CFuncPlat::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( &CFuncPlat::CallHitTop );
AngularMove( m_end, pev->speed );
}
else
{
// If ROTMOVE, move & rotate
CFuncPlat :: GoUp();
SetMoveDone( &CallHitTop );
SetMoveDone( &CFuncPlat::CallHitTop );
RotMove( m_end, pev->nextthink - pev->ltime );
}
@ -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( &CGunTarget::Start );
pev->nextthink = pev->ltime + 0.3;
}
}
@ -2198,7 +2198,7 @@ void CGunTarget::Next( void ) @@ -2198,7 +2198,7 @@ void CGunTarget::Next( void )
Stop();
return;
}
SetMoveDone( &Wait );
SetMoveDone( &CGunTarget::Wait );
LinearMove( pTarget->pev->origin - (pev->mins + pev->maxs) * 0.5, pev->speed );
}
@ -2224,7 +2224,7 @@ void CGunTarget::Wait( void ) @@ -2224,7 +2224,7 @@ void CGunTarget::Wait( void )
m_flWait = pTarget->GetDelay();
pev->target = pTarget->pev->target;
SetThink( &Next );
SetThink( &CGunTarget::Next );
if (m_flWait != 0)
{// -1 wait will wait forever!
pev->nextthink = pev->ltime + m_flWait;

18
dlls/player.cpp

@ -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( &CBasePlayer::PlayerDeathThink);
pev->nextthink = gpGlobals->time + 0.1;
}
@ -1979,7 +1979,7 @@ void CBasePlayer::CheckTimeBasedDamage() @@ -1979,7 +1979,7 @@ void CBasePlayer::CheckTimeBasedDamage()
return;
// only check for time based damage approx. every 2 seconds
if (abs(gpGlobals->time - m_tbdPrev) < 2.0)
if ( fabs( gpGlobals->time - m_tbdPrev ) < 2.0 )
return;
m_tbdPrev = gpGlobals->time;
@ -2200,7 +2200,7 @@ void CBasePlayer::CheckSuitUpdate() @@ -2200,7 +2200,7 @@ void CBasePlayer::CheckSuitUpdate()
// play a sentence off of the end of the queue
for (i = 0; i < CSUITPLAYLIST; i++)
{
if (isentence = m_rgSuitPlayList[isearch])
if ( ( isentence = m_rgSuitPlayList[isearch] ) )
break;
if (++isearch == CSUITPLAYLIST)
@ -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( &CBloodSplat::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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -3537,7 +3537,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) @@ -3537,7 +3537,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse )
case 107:
{
TraceResult tr;
//TraceResult tr;
edict_t *pWorld = g_engfuncs.pfnPEntityOfEntIndex( 0 );
@ -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( &CBaseEntity::SUB_Remove);
}
break;
}
@ -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( &CRevertSaved::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( &CRevertSaved::LoadThink );
}
else
LoadThink();

2
dlls/roach.cpp

@ -262,7 +262,7 @@ void CRoach :: MonsterThink( void ) @@ -262,7 +262,7 @@ void CRoach :: MonsterThink( void )
pSound = CSoundEnt::SoundPointerForIndex( m_iAudibleList );
// roach smells food and is just standing around. Go to food unless food isn't on same z-plane.
if ( pSound && abs( pSound->m_vecOrigin.z - pev->origin.z ) <= 3 )
if ( pSound && fabs( pSound->m_vecOrigin.z - pev->origin.z ) <= 3.0 )
{
PickNewDest( ROACH_SMELL_FOOD );
SetActivity ( ACT_WALK );

8
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( &CLaserSpot::Revive );
pev->nextthink = gpGlobals->time + flSuspendTime;
}
@ -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( &CRpgRocket::IgniteThink );
SetTouch( &CGrenade::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( &CRpgRocket::FollowThink );
pev->nextthink = gpGlobals->time + 0.1;
}

4
dlls/satchel.cpp

@ -78,7 +78,7 @@ void CSatchelCharge :: Spawn( void ) @@ -78,7 +78,7 @@ void CSatchelCharge :: Spawn( void )
UTIL_SetOrigin( pev, pev->origin );
SetTouch( &CSatchelCharge::SatchelSlide );
SetUse( &CSatchelCharge::DetonateUse );
SetUse( &CGrenade::DetonateUse );
SetThink( &CSatchelCharge::SatchelThink );
pev->nextthink = gpGlobals->time + 0.1;
@ -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( &CSatchel::DestroyItem );
SetThink( &CBasePlayerItem::DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}
}

2
dlls/saverestore.h

@ -60,7 +60,7 @@ public: @@ -60,7 +60,7 @@ public:
void WriteVector( const char *pname, const float *value, int count ); // Save a vector
void WritePositionVector( const char *pname, const Vector &value ); // Offset for landmark if necessary
void WritePositionVector( const char *pname, const float *value, int count ); // array of pos vectors
void WriteFunction( const char *pname, void **value, int count ); // Save a function pointer
void WriteFunction( const char *pname, const int *value, int count ); // Save a function pointer
int WriteEntVars( const char *pname, entvars_t *pev ); // Save entvars_t (entvars_t)
int WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount );

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( &CTalkMonster::FollowerUse );
}
//=========================================================
@ -1012,7 +1012,7 @@ MONSTERSTATE CScientist :: GetIdealState ( void ) @@ -1012,7 +1012,7 @@ MONSTERSTATE CScientist :: GetIdealState ( void )
if ( IsFollowing() )
{
int relationship = IRelationship( m_hEnemy );
if ( relationship != R_FR || relationship != R_HT && !HasConditions( bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE ) )
if ( relationship != R_FR || ( relationship != R_HT && !HasConditions( bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE ) ) )
{
// Don't go to combat if you're following the player
m_IdealMonsterState = MONSTERSTATE_ALERT;
@ -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( &CSittingScientist::SittingThink);
pev->nextthink = gpGlobals->time + 0.1;
DROP_TO_FLOOR ( ENT(pev) );

18
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( &CCineMonster::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( &CCineMonster::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( &CBaseEntity::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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -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( &CScriptedSentence::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( &CScriptedSentence::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( &CScriptedSentence::DelayThink );
pev->nextthink = gpGlobals->time + m_flDuration + m_flRepeat;
m_active = FALSE;
// ALERT( at_console, "%s: found monster %s\n", STRING(m_iszSentence), STRING(m_iszEntity) );
@ -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( &CScriptedSentence::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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time;
}

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( &CBaseEntity::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( &CAmbientGeneric::RampThink);
pev->nextthink = 0;
// allow on/off switching via 'use' function.
SetUse( &ToggleUse );
SetUse( &CAmbientGeneric::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( &CBaseEntity::SUB_Remove );
return;
}
pev->solid = SOLID_NOT;
pev->movetype = MOVETYPE_NONE;
SetThink( &SpeakerThink);
SetThink( &CSpeaker::SpeakerThink);
pev->nextthink = 0.0;
// allow on/off switching via 'use' function.
SetUse( &ToggleUse );
SetUse( &CSpeaker::ToggleUse );
Precache( );
}

2
dlls/soundent.cpp

@ -274,7 +274,7 @@ void CSoundEnt :: Initialize ( void ) @@ -274,7 +274,7 @@ void CSoundEnt :: Initialize ( void )
int CSoundEnt :: ISoundsInList ( int iListType )
{
int i;
int iThisSound;
int iThisSound = 0;
if ( iListType == SOUNDLISTTYPE_FREE )
{

10
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( &CSqueakGrenade::SuperBounceTouch );
SetThink( &CSqueakGrenade::HuntThink );
pev->nextthink = gpGlobals->time + 0.1;
m_flNextHunt = gpGlobals->time + 1E6;
@ -162,7 +162,7 @@ void CSqueakGrenade::Precache( void ) @@ -162,7 +162,7 @@ void CSqueakGrenade::Precache( void )
void CSqueakGrenade :: Killed( entvars_t *pevAttacker, int iGib )
{
pev->model = iStringNull;// make invisible
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
SetTouch( NULL );
pev->nextthink = gpGlobals->time + 0.1;
@ -230,7 +230,7 @@ void CSqueakGrenade::HuntThink( void ) @@ -230,7 +230,7 @@ void CSqueakGrenade::HuntThink( void )
pev->velocity = pev->velocity * 0.9;
pev->velocity.z += 8.0;
}
else if (pev->movetype = MOVETYPE_FLY)
else if ( ( pev->movetype = MOVETYPE_FLY ) )
{
pev->movetype = MOVETYPE_BOUNCE;
}
@ -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( &CSqueak::DestroyItem );
SetThink( &CBasePlayerItem::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( &CBaseDelay::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( &CBaseToggle::LinearMoveDone );
// scale the destdelta vector by the time spent traveling to get velocity
pev->velocity = vecDestDelta / flTravelTime;
@ -473,7 +473,7 @@ void CBaseToggle :: AngularMove( Vector vecDestAngle, float flSpeed ) @@ -473,7 +473,7 @@ void CBaseToggle :: AngularMove( Vector vecDestAngle, float flSpeed )
// set nextthink to trigger a call to AngularMoveDone when dest is reached
pev->nextthink = pev->ltime + flTravelTime;
SetThink( &AngularMoveDone );
SetThink( &CBaseToggle::AngularMoveDone );
// scale the destdelta vector by the time spent traveling to get velocity
pev->avelocity = vecDestDelta / flTravelTime;

12
dlls/talkmonster.cpp

@ -654,7 +654,7 @@ CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber, @@ -654,7 +654,7 @@ CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber,
Vector vecCheck;
pszFriend = m_szFriends[ FriendNumber(listNumber) ];
while (pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ))
while ( ( pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ) ) )
{
if (pFriend == this || !pFriend->IsAlive())
// don't talk to self or dead people
@ -687,7 +687,7 @@ void CTalkMonster::AlertFriends( void ) @@ -687,7 +687,7 @@ void CTalkMonster::AlertFriends( void )
// for each friend in this bsp...
for ( i = 0; i < TLK_CFRIENDS; i++ )
{
while (pFriend = EnumFriends( pFriend, i, TRUE ))
while ( ( pFriend = EnumFriends( pFriend, i, TRUE ) ) )
{
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
if ( pMonster->IsAlive() )
@ -709,7 +709,7 @@ void CTalkMonster::ShutUpFriends( void ) @@ -709,7 +709,7 @@ void CTalkMonster::ShutUpFriends( void )
// for each friend in this bsp...
for ( i = 0; i < TLK_CFRIENDS; i++ )
{
while (pFriend = EnumFriends( pFriend, i, TRUE ))
while ( ( pFriend = EnumFriends( pFriend, i, TRUE ) ) )
{
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
if ( pMonster )
@ -732,7 +732,7 @@ void CTalkMonster::LimitFollowers( CBaseEntity *pPlayer, int maxFollowers ) @@ -732,7 +732,7 @@ void CTalkMonster::LimitFollowers( CBaseEntity *pPlayer, int maxFollowers )
// for each friend in this bsp...
for ( i = 0; i < TLK_CFRIENDS; i++ )
{
while (pFriend = EnumFriends( pFriend, i, FALSE ))
while ( ( pFriend = EnumFriends( pFriend, i, FALSE ) ) )
{
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
if ( pMonster )
@ -831,7 +831,7 @@ CBaseEntity *CTalkMonster :: FindNearestFriend(BOOL fPlayer) @@ -831,7 +831,7 @@ CBaseEntity *CTalkMonster :: FindNearestFriend(BOOL fPlayer)
continue;
// for each friend in this bsp...
while (pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ))
while ( ( pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ) ) )
{
if (pFriend == this || !pFriend->IsAlive())
// don't talk to self or dead people
@ -1119,7 +1119,7 @@ int CTalkMonster :: FIdleSpeak ( void ) @@ -1119,7 +1119,7 @@ int CTalkMonster :: FIdleSpeak ( void )
if ( RANDOM_LONG(0,1) )
{
//SENTENCEG_PlayRndSz( ENT(pev), szIdleGroup, 1.0, ATTN_IDLE, 0, pitch );
CBaseEntity *pFriend = FindNearestFriend(TRUE);
pFriend = FindNearestFriend(TRUE);
if ( pFriend )
{

2
dlls/tempmonster.cpp

@ -114,4 +114,4 @@ void CMyMonster :: Precache() @@ -114,4 +114,4 @@ void CMyMonster :: Precache()
//=========================================================
// AI Schedules Specific to this monster
//=========================================================
#endif 0
#endif //0

12
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( &CTentacle::Start );
SetTouch( &CTentacle::HitTouch );
SetUse( &CTentacle::CommandUse );
pev->nextthink = gpGlobals->time + 0.2;
@ -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( &CTentacle::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( &CTentacle::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( &CTentacle::Cycle );
if ( !g_fFlySound )
{

46
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( &CFrictionModifier::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( &CMultiManager::ManagerUse );
SetThink( &CMultiManager::ManagerThink );
// Sort targets
// Quick and dirty bubble sort
@ -403,7 +403,7 @@ void CMultiManager :: ManagerThink ( void ) @@ -403,7 +403,7 @@ void CMultiManager :: ManagerThink ( void )
UTIL_Remove( this );
return;
}
SetUse( &ManagerUse );// allow manager re-use
SetUse( &CMultiManager::ManagerUse );// allow manager re-use
}
else
pev->nextthink = m_startTime + m_flTargetDelay[ m_index ];
@ -444,7 +444,7 @@ void CMultiManager :: ManagerUse ( CBaseEntity *pActivator, CBaseEntity *pCaller @@ -444,7 +444,7 @@ void CMultiManager :: ManagerUse ( CBaseEntity *pActivator, CBaseEntity *pCaller
SetUse( NULL );// disable use until all targets have fired
SetThink( &ManagerThink );
SetThink( &CMultiManager::ManagerThink );
pev->nextthink = gpGlobals->time;
}
@ -618,7 +618,7 @@ void CTriggerMonsterJump :: Spawn ( void ) @@ -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( &CBaseTrigger::ToggleUse );
}
}
@ -808,11 +808,11 @@ void CTargetCDAudio::Play( void ) @@ -808,11 +808,11 @@ void CTargetCDAudio::Play( void )
void CTriggerHurt :: Spawn( void )
{
InitTrigger();
SetTouch( &HurtTouch );
SetTouch( &CBaseTrigger::HurtTouch );
if ( !FStringNull ( pev->targetname ) )
{
SetUse( &ToggleUse );
SetUse( &CBaseTrigger::ToggleUse );
}
else
{
@ -821,7 +821,7 @@ void CTriggerHurt :: Spawn( void ) @@ -821,7 +821,7 @@ void CTriggerHurt :: Spawn( void )
if (m_bitsDamageInflict & DMG_RADIATION)
{
SetThink( &RadiationThink );
SetThink( &CTriggerHurt::RadiationThink );
pev->nextthink = gpGlobals->time + RANDOM_FLOAT(0.0, 0.5);
}
@ -1080,7 +1080,7 @@ void CTriggerMultiple :: Spawn( void ) @@ -1080,7 +1080,7 @@ void CTriggerMultiple :: Spawn( void )
// }
// else
{
SetTouch( &MultiTouch );
SetTouch( &CBaseTrigger::MultiTouch );
}
}
@ -1122,7 +1122,7 @@ void CBaseTrigger :: MultiTouch( CBaseEntity *pOther ) @@ -1122,7 +1122,7 @@ void CBaseTrigger :: MultiTouch( CBaseEntity *pOther )
// Only touch clients, monsters, or pushables (depending on flags)
if ( ((pevToucher->flags & FL_CLIENT) && !(pev->spawnflags & SF_TRIGGER_NOCLIENTS)) ||
((pevToucher->flags & FL_MONSTER) && (pev->spawnflags & SF_TRIGGER_ALLOWMONSTERS)) ||
(pev->spawnflags & SF_TRIGGER_PUSHABLES) && FClassnameIs(pevToucher,"func_pushable") )
( ( pev->spawnflags & SF_TRIGGER_PUSHABLES ) && FClassnameIs( pevToucher,"func_pushable" ) ) )
{
#if 0
@ -1177,7 +1177,7 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator ) @@ -1177,7 +1177,7 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator )
if (m_flWait > 0)
{
SetThink( &MultiWaitOver );
SetThink( &CBaseTrigger::MultiWaitOver );
pev->nextthink = gpGlobals->time + m_flWait;
}
else
@ -1186,7 +1186,7 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator ) @@ -1186,7 +1186,7 @@ void CBaseTrigger :: ActivateMultiTrigger( CBaseEntity *pActivator )
// called while C code is looping through area links...
SetTouch( NULL );
pev->nextthink = gpGlobals->time + 0.1;
SetThink( &SUB_Remove );
SetThink( &CBaseEntity::SUB_Remove );
}
}
@ -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( &CBaseTrigger::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( &CChangeLevel::UseChangeLevel );
}
InitTrigger();
if ( !(pev->spawnflags & SF_CHANGELEVEL_USEONLY) )
SetTouch( &TouchChangeLevel );
SetTouch( &CChangeLevel::TouchChangeLevel );
// ALERT( at_console, "TRANSITION: %s (%s)\n", m_szMapName, m_szLandmarkName );
}
@ -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( &CBaseTrigger::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( &CBaseTrigger::TeleportTouch );
}
@ -1963,7 +1963,7 @@ void CTriggerSave::Spawn( void ) @@ -1963,7 +1963,7 @@ void CTriggerSave::Spawn( void )
}
InitTrigger();
SetTouch( &SaveTouch );
SetTouch( &CTriggerSave::SaveTouch );
}
void CTriggerSave::SaveTouch( CBaseEntity *pOther )
@ -2018,10 +2018,10 @@ void CTriggerEndSection::Spawn( void ) @@ -2018,10 +2018,10 @@ void CTriggerEndSection::Spawn( void )
InitTrigger();
SetUse( &EndSectionUse );
SetUse( &CTriggerEndSection::EndSectionUse );
// If it is a "use only" trigger, then don't set the touch function.
if ( ! (pev->spawnflags & SF_ENDSECTION_USEONLY) )
SetTouch( &EndSectionTouch );
SetTouch( &CTriggerEndSection::EndSectionTouch );
}
void CTriggerEndSection::EndSectionTouch( CBaseEntity *pOther )
@ -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( &CTriggerGravity::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( &CTriggerCamera::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( &CTripmineGrenade::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( &CTripmineGrenade::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( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1;
ALERT( at_console, "WARNING:Tripmine at %.0f, %.0f, %.0f removed\n", pev->origin.x, pev->origin.y, pev->origin.z );
KillBeam();
@ -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( &CBaseEntity::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( &CTripmineGrenade::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( &CBaseEntity::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( &CTripmineGrenade::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( &CTripmine::DestroyItem );
SetThink( &CBasePlayerItem::DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}

48
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( &CBaseTurret::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( &CBaseTurret::Initialize);
m_pEyeGlow = CSprite::SpriteCreate( TURRET_GLOW_SPRITE, pev->origin, FALSE );
m_pEyeGlow->SetTransparency( kRenderGlow, 255, 0, 0, 0, kRenderFxNoDissipation );
@ -339,7 +339,7 @@ void CMiniTurret::Spawn() @@ -339,7 +339,7 @@ void CMiniTurret::Spawn()
m_iMinPitch = -15;
UTIL_SetSize(pev, Vector(-16, -16, -m_iRetractHeight), Vector(16, 16, m_iRetractHeight));
SetThink( &Initialize);
SetThink( &CBaseTurret::Initialize);
pev->nextthink = gpGlobals->time + 0.3;
}
@ -381,11 +381,11 @@ void CBaseTurret::Initialize(void) @@ -381,11 +381,11 @@ void CBaseTurret::Initialize(void)
if (m_iAutoStart)
{
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink( &AutoSearchThink);
SetThink( &CBaseTurret::AutoSearchThink);
pev->nextthink = gpGlobals->time + .1;
}
else
SetThink( &SUB_DoNothing);
SetThink( &CBaseEntity::SUB_DoNothing);
}
void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
@ -399,7 +399,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ @@ -399,7 +399,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
pev->nextthink = gpGlobals->time + 0.1;
m_iAutoStart = FALSE;// switching off a turret disables autostart
//!!!! this should spin down first!!BUGBUG
SetThink( &Retire);
SetThink( &CBaseTurret::Retire);
}
else
{
@ -411,7 +411,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ @@ -411,7 +411,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
m_iAutoStart = TRUE;
}
SetThink( &Deploy);
SetThink( &CBaseTurret::Deploy);
}
}
@ -472,7 +472,7 @@ void CBaseTurret::ActiveThink(void) @@ -472,7 +472,7 @@ void CBaseTurret::ActiveThink(void)
{
m_hEnemy = NULL;
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink( &SearchThink);
SetThink( &CBaseTurret::SearchThink);
return;
}
@ -489,7 +489,7 @@ void CBaseTurret::ActiveThink(void) @@ -489,7 +489,7 @@ void CBaseTurret::ActiveThink(void)
{
m_hEnemy = NULL;
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink( &SearchThink);
SetThink( &CBaseTurret::SearchThink);
return;
}
}
@ -518,7 +518,7 @@ void CBaseTurret::ActiveThink(void) @@ -518,7 +518,7 @@ void CBaseTurret::ActiveThink(void)
{
m_hEnemy = NULL;
m_flLastSight = gpGlobals->time + m_flMaxWait;
SetThink( &SearchThink);
SetThink( &CBaseTurret::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( &CBaseTurret::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( &CBaseTurret::AutoSearchThink);
pev->nextthink = gpGlobals->time + .1;
}
else
SetThink( &SUB_DoNothing);
SetThink( &CBaseEntity::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( &CBaseTurret::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( &CBaseTurret::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( &CBaseTurret::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( &CBaseTurret::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( &CBaseTurret::Deploy);
EMIT_SOUND(ENT(pev), CHAN_BODY, "turret/tu_alert.wav", TURRET_MACHINE_VOLUME, ATTN_NORM);
}
}
@ -1025,7 +1025,7 @@ int CBaseTurret::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, flo @@ -1025,7 +1025,7 @@ int CBaseTurret::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, flo
ClearBits (pev->flags, FL_MONSTER); // why are they set in the first place???
SetUse( NULL );
SetThink( &TurretDeath);
SetThink( &CBaseTurret::TurretDeath);
SUB_UseTargets( this, USE_ON, 0 ); // wake up others
pev->nextthink = gpGlobals->time + 0.1;
@ -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( &CBaseTurret::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( &CSentry::SentryTouch);
SetThink( &CBaseTurret::Initialize);
pev->nextthink = gpGlobals->time + 0.3;
}
@ -1204,7 +1204,7 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f @@ -1204,7 +1204,7 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f
if (!m_iOn)
{
SetThink( &Deploy );
SetThink( &CBaseTurret::Deploy );
SetUse( NULL );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -1219,7 +1219,7 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f @@ -1219,7 +1219,7 @@ int CSentry::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f
ClearBits (pev->flags, FL_MONSTER); // why are they set in the first place???
SetUse( NULL );
SetThink( &SentryDeath);
SetThink( &CSentry::SentryDeath);
SUB_UseTargets( this, USE_ON, 0 ); // wake up others
pev->nextthink = gpGlobals->time + 0.1;

10
dlls/util.cpp

@ -1973,7 +1973,7 @@ void CSave :: WritePositionVector( const char *pname, const float *value, int co @@ -1973,7 +1973,7 @@ void CSave :: WritePositionVector( const char *pname, const float *value, int co
}
void CSave :: WriteFunction( const char *pname, void **data, int count )
void CSave :: WriteFunction( const char *pname, const int *data, int count )
{
const char *functionName;
@ -2141,7 +2141,7 @@ int CSave :: WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *p @@ -2141,7 +2141,7 @@ int CSave :: WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *p
break;
case FIELD_FUNCTION:
WriteFunction( pTest->fieldName, (void **)pOutputData, pTest->fieldSize );
WriteFunction( pTest->fieldName, (int *)pOutputData, pTest->fieldSize );
break;
default:
ALERT( at_error, "Bad field type\n" );
@ -2372,13 +2372,13 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou @@ -2372,13 +2372,13 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
break;
case FIELD_POINTER:
*((int *)pOutputData) = *( int *)pInputData;
*((void**)pOutputData) = *( void **)pInputData;
break;
case FIELD_FUNCTION:
if ( strlen( (char *)pInputData ) == 0 )
*((int *)pOutputData) = 0;
*((void**)pOutputData) = 0;
else
*((int *)pOutputData) = FUNCTION_FROM_NAME( (char *)pInputData );
*((void**)pOutputData) = FUNCTION_FROM_NAME( (char *)pInputData );
break;
default:

6
dlls/util.h

@ -36,7 +36,11 @@ extern globalvars_t *gpGlobals; @@ -36,7 +36,11 @@ extern globalvars_t *gpGlobals;
// Use this instead of ALLOC_STRING on constant strings
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
#define MAKE_STRING(str) ((int)str - (int)STRING(0))
#if !defined __amd64__ || defined(CLIENT_DLL)
#define MAKE_STRING(str) ((int)(size_t)str - (int)(size_t)STRING(0))
#else
#define MAKE_STRING ALLOC_STRING
#endif
inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName)
{

24
dlls/weapons.cpp

@ -478,8 +478,8 @@ void CBasePlayerItem :: FallInit( void ) @@ -478,8 +478,8 @@ void CBasePlayerItem :: FallInit( void )
UTIL_SetOrigin( pev, pev->origin );
UTIL_SetSize(pev, Vector( 0, 0, 0), Vector(0, 0, 0) );//pointsize until it lands on the ground.
SetTouch( &DefaultTouch );
SetThink( &FallThink );
SetTouch( &CBasePlayerItem::DefaultTouch );
SetThink( &CBasePlayerItem::FallThink );
pev->nextthink = gpGlobals->time + 0.1;
}
@ -531,7 +531,7 @@ void CBasePlayerItem::Materialize( void ) @@ -531,7 +531,7 @@ void CBasePlayerItem::Materialize( void )
UTIL_SetOrigin( pev, m_SpawnPoint );// link into world.
else
UTIL_SetOrigin( pev, m_SpawnPoint = pev->origin );
SetTouch( &DefaultTouch);
SetTouch( &CBasePlayerItem::DefaultTouch );
SetThink( NULL );
}
@ -603,7 +603,7 @@ CBaseEntity* CBasePlayerItem::Respawn( void ) @@ -603,7 +603,7 @@ CBaseEntity* CBasePlayerItem::Respawn( void )
{
pNewWeapon->pev->effects |= EF_NODRAW;// invisible for now
pNewWeapon->SetTouch( NULL );// no touch
pNewWeapon->SetThink( &AttemptToMaterialize );
pNewWeapon->SetThink( &CBasePlayerItem::AttemptToMaterialize );
DROP_TO_FLOOR ( ENT(pev) );
@ -761,14 +761,14 @@ int CBasePlayerItem::AddToPlayer( CBasePlayer *pPlayer ) @@ -761,14 +761,14 @@ int CBasePlayerItem::AddToPlayer( CBasePlayer *pPlayer )
void CBasePlayerItem::Drop( void )
{
SetTouch( NULL );
SetThink( &SUB_Remove);
SetThink( &CBaseEntity::SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
void CBasePlayerItem::Kill( void )
{
SetTouch( NULL );
SetThink( &SUB_Remove);
SetThink( &CBaseEntity::SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
@ -1089,7 +1089,7 @@ void CBasePlayerAmmo::Spawn( void ) @@ -1089,7 +1089,7 @@ void CBasePlayerAmmo::Spawn( void )
UTIL_SetOrigin( pev, pev->origin );
m_SpawnPoint = pev->origin;
SetTouch( &DefaultTouch );
SetTouch( &CBasePlayerAmmo::DefaultTouch );
}
CBaseEntity* CBasePlayerAmmo::Respawn( void )
@ -1099,7 +1099,7 @@ CBaseEntity* CBasePlayerAmmo::Respawn( void ) @@ -1099,7 +1099,7 @@ CBaseEntity* CBasePlayerAmmo::Respawn( void )
UTIL_SetOrigin( pev, m_SpawnPoint );// move to wherever I'm supposed to repawn.
SetThink( &Materialize );
SetThink( &CBasePlayerAmmo::Materialize );
pev->nextthink = g_pGameRules->FlAmmoRespawnTime( this );
return this;
@ -1137,7 +1137,7 @@ void CBasePlayerAmmo::Materialize( void ) @@ -1137,7 +1137,7 @@ void CBasePlayerAmmo::Materialize( void )
DROP_TO_FLOOR(edict());
//else
// UTIL_SetOrigin( pev, m_SpawnPoint = pev->origin );
SetTouch( &DefaultTouch );
SetTouch( &CBasePlayerAmmo::DefaultTouch );
}
void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
@ -1156,7 +1156,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther ) @@ -1156,7 +1156,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
else
{
SetTouch( NULL );
SetThink( &SUB_Remove);
SetThink( &CBaseEntity::SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
}
@ -1164,7 +1164,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther ) @@ -1164,7 +1164,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
{
// evil impulse 101 hack, kill always
SetTouch( NULL );
SetThink( &SUB_Remove);
SetThink( &CBaseEntity::SUB_Remove);
pev->nextthink = gpGlobals->time + .1;
}
}
@ -1301,7 +1301,7 @@ void CWeaponBox::Kill( void ) @@ -1301,7 +1301,7 @@ void CWeaponBox::Kill( void )
while ( pWeapon )
{
pWeapon->SetThink( &SUB_Remove);
pWeapon->SetThink( &CBaseEntity::SUB_Remove);
pWeapon->pev->nextthink = gpGlobals->time + 0.1;
pWeapon = pWeapon->m_pNext;
}

2
dlls/weapons.h

@ -458,7 +458,7 @@ public: @@ -458,7 +458,7 @@ public:
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
bool HasWeapon( CBasePlayerItem *pCheckItem );
BOOL HasWeapon( CBasePlayerItem *pCheckItem );
BOOL PackWeapon( CBasePlayerItem *pWeapon );
BOOL PackAmmo( int iszName, int iCount );

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( &CDecal::StaticDecal );
// if there's no targetname, the decal will spray itself on as soon as the world is done spawning.
pev->nextthink = gpGlobals->time;
}
else
{
// if there IS a targetname, the decal sprays itself on when it is triggered.
SetThink( &SUB_DoNothing );
SetUse( &TriggerDecal);
SetThink( &CBaseEntity::SUB_DoNothing );
SetUse( &CDecal::TriggerDecal);
}
}
@ -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( &CBaseEntity::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( &CBaseEntity::SUB_CallUseToggle );
pEntity->pev->message = pev->netname;
pev->netname = 0;
pEntity->pev->nextthink = gpGlobals->time + 0.3;

2
engine/studio.h

@ -215,7 +215,9 @@ typedef struct @@ -215,7 +215,9 @@ typedef struct
char label[32]; // textual name
char name[64]; // file name
cache_user_t cache; // cache index pointer
#ifndef __amd64
int data; // hack for group 0
#endif
} mstudioseqgroup_t;
// sequence descriptions

2
game_shared/bitvec.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
#include <assert.h>
#include <string.h>
class CBitVecAccessor
{

4
game_shared/voice_gamemgr.cpp

@ -179,7 +179,7 @@ bool CVoiceGameMgr::ClientCommand(CBasePlayer *pPlayer, const char *cmd) @@ -179,7 +179,7 @@ bool CVoiceGameMgr::ClientCommand(CBasePlayer *pPlayer, const char *cmd)
for(int i=1; i < CMD_ARGC(); i++)
{
unsigned long mask = 0;
sscanf(CMD_ARGV(i), "%x", &mask);
sscanf(CMD_ARGV(i), "%lx", &mask);
if(i <= VOICE_MAX_PLAYERS_DW)
{
@ -238,7 +238,7 @@ void CVoiceGameMgr::UpdateMasks() @@ -238,7 +238,7 @@ void CVoiceGameMgr::UpdateMasks()
// Build a mask of who they can hear based on the game rules.
for(int iOtherClient=0; iOtherClient < m_nMaxPlayers; iOtherClient++)
{
CBaseEntity *pEnt = UTIL_PlayerByIndex(iOtherClient+1);
pEnt = UTIL_PlayerByIndex(iOtherClient+1);
if(pEnt && pEnt->IsPlayer() &&
(bAllTalk || m_pHelper->CanPlayerHearPlayer(pPlayer, (CBasePlayer*)pEnt)) )
{

Loading…
Cancel
Save