Browse Source

Remove unneeded casts.

halloween
Night Owl 7 years ago
parent
commit
49e740c6f1
  1. 14
      dlls/agrunt.cpp
  2. 2
      dlls/animation.cpp
  3. 14
      dlls/bmodels.cpp
  4. 12
      dlls/buttons.cpp
  5. 2
      dlls/cbase.cpp
  6. 26
      dlls/doors.cpp
  7. 23
      dlls/effects.cpp
  8. 8
      dlls/func_break.cpp
  9. 10
      dlls/func_tank.cpp
  10. 22
      dlls/gargantua.cpp
  11. 2
      dlls/genericmonster.cpp
  12. 10
      dlls/h_cycler.cpp
  13. 8
      dlls/islave.cpp
  14. 4
      dlls/leech.cpp
  15. 28
      dlls/multiplay_gamerules.cpp
  16. 8
      dlls/nodes.cpp
  17. 6
      dlls/nodes.h
  18. 38
      dlls/plats.cpp
  19. 6
      dlls/prop.cpp
  20. 2
      dlls/scripted.cpp
  21. 8
      dlls/sound.cpp
  22. 4
      dlls/stats.cpp
  23. 2
      dlls/triggers.cpp
  24. 6
      dlls/util.cpp
  25. 2
      dlls/util.h
  26. 8
      dlls/weapons.cpp
  27. 4
      dlls/world.cpp
  28. 2
      dlls/xen.cpp
  29. 12
      dlls/zombie.cpp

14
dlls/agrunt.cpp

@ -613,25 +613,25 @@ void CAGrunt::Precache()
PRECACHE_MODEL( "models/agrunt.mdl" ); PRECACHE_MODEL( "models/agrunt.mdl" );
for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackHitSounds[i] ); PRECACHE_SOUND( pAttackHitSounds[i] );
for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackMissSounds[i] ); PRECACHE_SOUND( pAttackMissSounds[i] );
for( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ )
PRECACHE_SOUND( (char *)pIdleSounds[i] ); PRECACHE_SOUND( pIdleSounds[i] );
for( i = 0; i < ARRAYSIZE( pDieSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pDieSounds ); i++ )
PRECACHE_SOUND( (char *)pDieSounds[i] ); PRECACHE_SOUND( pDieSounds[i] );
for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ )
PRECACHE_SOUND( (char *)pPainSounds[i] ); PRECACHE_SOUND( pPainSounds[i] );
for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackSounds[i] ); PRECACHE_SOUND( pAttackSounds[i] );
for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ )
PRECACHE_SOUND( (char *)pAlertSounds[i] ); PRECACHE_SOUND( pAlertSounds[i] );
PRECACHE_SOUND( "hassault/hw_shoot1.wav" ); PRECACHE_SOUND( "hassault/hw_shoot1.wav" );

2
dlls/animation.cpp

@ -208,7 +208,7 @@ void SequencePrecache( void *pmodel, const char *pSequenceName )
ALERT( at_error, "Bad sound event %d in sequence %s :: %s (sound is \"%s\")\n", pevent[i].event, pstudiohdr->name, pSequenceName, pevent[i].options ); ALERT( at_error, "Bad sound event %d in sequence %s :: %s (sound is \"%s\")\n", pevent[i].event, pstudiohdr->name, pSequenceName, pevent[i].options );
} }
PRECACHE_SOUND( (char *)( gpGlobals->pStringBase + ALLOC_STRING( pevent[i].options ) ) ); PRECACHE_SOUND( gpGlobals->pStringBase + ALLOC_STRING( pevent[i].options ) );
} }
} }
} }

14
dlls/bmodels.cpp

@ -538,7 +538,7 @@ void CFuncRotating::RampPitchVol( int fUp )
pitch = PITCH_NORM - 1; pitch = PITCH_NORM - 1;
// change the fan's vol and pitch // change the fan's vol and pitch
EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, (char *)STRING( pev->noiseRunning ), EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noiseRunning ),
fvol, m_flAttenuation, SND_CHANGE_PITCH | SND_CHANGE_VOL, pitch ); fvol, m_flAttenuation, SND_CHANGE_PITCH | SND_CHANGE_VOL, pitch );
} }
@ -560,7 +560,7 @@ void CFuncRotating::SpinUp( void )
fabs( vecAVel.z ) >= fabs( pev->movedir.z * pev->speed ) ) fabs( vecAVel.z ) >= fabs( pev->movedir.z * pev->speed ) )
{ {
pev->avelocity = pev->movedir * pev->speed;// set speed in case we overshot pev->avelocity = pev->movedir * pev->speed;// set speed in case we overshot
EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, (char *)STRING( pev->noiseRunning ), EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noiseRunning ),
m_flVolume, m_flAttenuation, SND_CHANGE_PITCH | SND_CHANGE_VOL, FANPITCHMAX ); m_flVolume, m_flAttenuation, SND_CHANGE_PITCH | SND_CHANGE_VOL, FANPITCHMAX );
SetThink( &CFuncRotating::Rotate ); SetThink( &CFuncRotating::Rotate );
@ -601,7 +601,7 @@ void CFuncRotating::SpinDown( void )
pev->avelocity = g_vecZero;// set speed in case we overshot pev->avelocity = g_vecZero;// set speed in case we overshot
// stop sound, we're done // stop sound, we're done
EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, (char *)STRING( pev->noiseRunning /* Stop */ ), EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noiseRunning /* Stop */ ),
0, 0, SND_STOP, (int)m_pitch ); 0, 0, SND_STOP, (int)m_pitch );
SetThink( &CFuncRotating::Rotate ); SetThink( &CFuncRotating::Rotate );
@ -630,7 +630,7 @@ void CFuncRotating::RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller,
if( pev->avelocity != g_vecZero ) if( pev->avelocity != g_vecZero )
{ {
SetThink( &CFuncRotating::SpinDown ); SetThink( &CFuncRotating::SpinDown );
//EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, (char *)STRING( pev->noiseStop ), //EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, STRING( pev->noiseStop ),
// m_flVolume, m_flAttenuation, 0, m_pitch ); // m_flVolume, m_flAttenuation, 0, m_pitch );
pev->nextthink = pev->ltime + 0.1; pev->nextthink = pev->ltime + 0.1;
@ -638,7 +638,7 @@ void CFuncRotating::RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller,
else// fan is not moving, so start it else// fan is not moving, so start it
{ {
SetThink( &CFuncRotating::SpinUp ); SetThink( &CFuncRotating::SpinUp );
EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, (char *)STRING( pev->noiseRunning ), EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noiseRunning ),
0.01, m_flAttenuation, 0, FANPITCHMIN ); 0.01, m_flAttenuation, 0, FANPITCHMIN );
pev->nextthink = pev->ltime + 0.1; pev->nextthink = pev->ltime + 0.1;
@ -651,7 +651,7 @@ void CFuncRotating::RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller,
// play stopping sound here // play stopping sound here
SetThink( &CFuncRotating::SpinDown ); SetThink( &CFuncRotating::SpinDown );
// EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, (char *)STRING( pev->noiseStop ), // EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, STRING( pev->noiseStop ),
// m_flVolume, m_flAttenuation, 0, m_pitch ); // m_flVolume, m_flAttenuation, 0, m_pitch );
pev->nextthink = pev->ltime + 0.1; pev->nextthink = pev->ltime + 0.1;
@ -659,7 +659,7 @@ void CFuncRotating::RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller,
} }
else else
{ {
EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, (char *)STRING( pev->noiseRunning ), EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noiseRunning ),
m_flVolume, m_flAttenuation, 0, FANPITCHMAX ); m_flVolume, m_flAttenuation, 0, FANPITCHMAX );
pev->avelocity = pev->movedir * pev->speed; pev->avelocity = pev->movedir * pev->speed;

12
dlls/buttons.cpp

@ -426,7 +426,7 @@ int CBaseButton::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, fl
if( code == BUTTON_RETURN ) if( code == BUTTON_RETURN )
{ {
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noise ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM );
// Toggle buttons fire when they get back to their "home" position // Toggle buttons fire when they get back to their "home" position
if( !( pev->spawnflags & SF_BUTTON_TOGGLE ) ) if( !( pev->spawnflags & SF_BUTTON_TOGGLE ) )
@ -657,7 +657,7 @@ void CBaseButton::ButtonUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
{ {
if( !m_fStayPushed && FBitSet( pev->spawnflags, SF_BUTTON_TOGGLE ) ) if( !m_fStayPushed && FBitSet( pev->spawnflags, SF_BUTTON_TOGGLE ) )
{ {
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noise ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM );
//SUB_UseTargets( m_eoActivator ); //SUB_UseTargets( m_eoActivator );
ButtonReturn(); ButtonReturn();
@ -716,7 +716,7 @@ void CBaseButton::ButtonTouch( CBaseEntity *pOther )
if( code == BUTTON_RETURN ) if( code == BUTTON_RETURN )
{ {
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noise ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM );
SUB_UseTargets( m_hActivator, USE_TOGGLE, 0 ); SUB_UseTargets( m_hActivator, USE_TOGGLE, 0 );
ButtonReturn(); ButtonReturn();
} }
@ -729,7 +729,7 @@ void CBaseButton::ButtonTouch( CBaseEntity *pOther )
// //
void CBaseButton::ButtonActivate() void CBaseButton::ButtonActivate()
{ {
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noise ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM );
if( !UTIL_IsMasterTriggered( m_sMaster, m_hActivator ) ) if( !UTIL_IsMasterTriggered( m_sMaster, m_hActivator ) )
{ {
@ -815,7 +815,7 @@ void CBaseButton::ButtonBackHome( void )
if( FBitSet( pev->spawnflags, SF_BUTTON_TOGGLE ) ) if( FBitSet( pev->spawnflags, SF_BUTTON_TOGGLE ) )
{ {
//EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noise ), 1, ATTN_NORM ); //EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM );
SUB_UseTargets( m_hActivator, USE_TOGGLE, 0 ); SUB_UseTargets( m_hActivator, USE_TOGGLE, 0 );
} }
@ -1034,7 +1034,7 @@ void CMomentaryRotButton::KeyValue( KeyValueData *pkvd )
void CMomentaryRotButton::PlaySound( void ) void CMomentaryRotButton::PlaySound( void )
{ {
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noise ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM );
} }
// BUGBUG: This design causes a latentcy. When the button is retriggered, the first impulse // BUGBUG: This design causes a latentcy. When the button is retriggered, the first impulse

2
dlls/cbase.cpp

@ -605,7 +605,7 @@ int CBaseEntity::Restore( CRestore &restore )
mins = pev->mins; // Set model is about to destroy these mins = pev->mins; // Set model is about to destroy these
maxs = pev->maxs; maxs = pev->maxs;
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
SET_MODEL( ENT( pev ), STRING( pev->model ) ); SET_MODEL( ENT( pev ), STRING( pev->model ) );
UTIL_SetSize( pev, mins, maxs ); // Reset them UTIL_SetSize( pev, mins, maxs ); // Reset them
} }

26
dlls/doors.cpp

@ -127,7 +127,7 @@ void PlayLockSounds( entvars_t *pev, locksound_t *pls, int flocked, int fbutton
if( fplaysound ) if( fplaysound )
{ {
// play 'door locked' sound // play 'door locked' sound
EMIT_SOUND( ENT( pev ), CHAN_ITEM, (char*)STRING( pls->sLockedSound ), fvol, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_ITEM, STRING( pls->sLockedSound ), fvol, ATTN_NORM );
pls->flwaitSound = gpGlobals->time + flsoundwait; pls->flwaitSound = gpGlobals->time + flsoundwait;
} }
@ -164,7 +164,7 @@ void PlayLockSounds( entvars_t *pev, locksound_t *pls, int flocked, int fbutton
// play 'door unlocked' sound if set // play 'door unlocked' sound if set
if( fplaysound ) if( fplaysound )
{ {
EMIT_SOUND( ENT( pev ), CHAN_ITEM, (char*)STRING( pls->sUnlockedSound ), fvol, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_ITEM, STRING( pls->sUnlockedSound ), fvol, ATTN_NORM );
pls->flwaitSound = gpGlobals->time + flsoundwait; pls->flwaitSound = gpGlobals->time + flsoundwait;
} }
@ -606,7 +606,7 @@ void CBaseDoor::DoorGoUp( void )
// filter them out and leave a client stuck with looping door sounds! // filter them out and leave a client stuck with looping door sounds!
if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ), 1, ATTN_NORM );
m_toggle_state = TS_GOING_UP; m_toggle_state = TS_GOING_UP;
@ -646,8 +646,8 @@ void CBaseDoor::DoorHitTop( void )
{ {
if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
{ {
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseArrived ), 1, ATTN_NORM );
} }
ASSERT( m_toggle_state == TS_GOING_UP ); ASSERT( m_toggle_state == TS_GOING_UP );
@ -686,7 +686,7 @@ void CBaseDoor::DoorGoDown( void )
{ {
if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ), 1, ATTN_NORM );
#ifdef DOOR_ASSERT #ifdef DOOR_ASSERT
ASSERT( m_toggle_state == TS_AT_TOP ); ASSERT( m_toggle_state == TS_AT_TOP );
#endif // DOOR_ASSERT #endif // DOOR_ASSERT
@ -706,8 +706,8 @@ void CBaseDoor::DoorHitBottom( void )
{ {
if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
{ {
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseArrived ), 1, ATTN_NORM );
} }
ASSERT( m_toggle_state == TS_GOING_DOWN ); ASSERT( m_toggle_state == TS_GOING_DOWN );
@ -751,7 +751,7 @@ void CBaseDoor::Blocked( CBaseEntity *pOther )
{ {
// BMod Start - Door sound fix. // BMod Start - Door sound fix.
if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ) );
// BMod End // BMod End
if( m_toggle_state == TS_GOING_DOWN ) if( m_toggle_state == TS_GOING_DOWN )
@ -799,7 +799,7 @@ void CBaseDoor::Blocked( CBaseEntity *pOther )
} }
} }
if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ) );
if( pDoor->m_toggle_state == TS_GOING_DOWN ) if( pDoor->m_toggle_state == TS_GOING_DOWN )
pDoor->DoorGoUp(); pDoor->DoorGoUp();
@ -1106,7 +1106,7 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
// This entity only thinks when it moves, so if it's thinking, it's in the process of moving // This entity only thinks when it moves, so if it's thinking, it's in the process of moving
// play the sound when it starts moving(not yet thinking) // play the sound when it starts moving(not yet thinking)
if( pev->nextthink < pev->ltime || pev->nextthink == 0 ) if( pev->nextthink < pev->ltime || pev->nextthink == 0 )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ), 1, ATTN_NORM );
// If we already moving to designated point, return // If we already moving to designated point, return
else if( move == m_vecFinalDest ) else if( move == m_vecFinalDest )
return; return;
@ -1118,6 +1118,6 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
void CMomentaryDoor::MomentaryMoveDone( void ) void CMomentaryDoor::MomentaryMoveDone( void )
{ {
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseArrived ), 1, ATTN_NORM );
} }

23
dlls/effects.cpp

@ -229,7 +229,7 @@ void CBeam::BeamInit( const char *pSpriteName, int width )
SetFrame( 0 ); SetFrame( 0 );
SetScrollRate( 0 ); SetScrollRate( 0 );
pev->model = MAKE_STRING( pSpriteName ); pev->model = MAKE_STRING( pSpriteName );
SetTexture( PRECACHE_MODEL( (char *)pSpriteName ) ); SetTexture( PRECACHE_MODEL( pSpriteName ) );
SetWidth( width ); SetWidth( width );
pev->skin = 0; pev->skin = 0;
pev->sequence = 0; pev->sequence = 0;
@ -486,7 +486,7 @@ void CLightning::Spawn( void )
void CLightning::Precache( void ) void CLightning::Precache( void )
{ {
m_spriteTexture = PRECACHE_MODEL( (char *)STRING( m_iszSpriteName ) ); m_spriteTexture = PRECACHE_MODEL( STRING( m_iszSpriteName ) );
CBeam::Precache(); CBeam::Precache();
} }
@ -954,9 +954,9 @@ void CLaser::Spawn( void )
void CLaser::Precache( void ) void CLaser::Precache( void )
{ {
pev->modelindex = PRECACHE_MODEL( (char *)STRING( pev->model ) ); pev->modelindex = PRECACHE_MODEL( STRING( pev->model ) );
if( m_iszSpriteName ) if( m_iszSpriteName )
PRECACHE_MODEL( (char *)STRING( m_iszSpriteName ) ); PRECACHE_MODEL( STRING( m_iszSpriteName ) );
} }
void CLaser::KeyValue( KeyValueData *pkvd ) void CLaser::KeyValue( KeyValueData *pkvd )
@ -1100,7 +1100,7 @@ void CGlow::Spawn( void )
pev->effects = 0; pev->effects = 0;
pev->frame = 0; pev->frame = 0;
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
SET_MODEL( ENT( pev ), STRING( pev->model ) ); SET_MODEL( ENT( pev ), STRING( pev->model ) );
m_maxFrame = (float) MODEL_FRAMES( pev->modelindex ) - 1; m_maxFrame = (float) MODEL_FRAMES( pev->modelindex ) - 1;
@ -1160,7 +1160,7 @@ void CSprite::Spawn( void )
void CSprite::Precache( void ) void CSprite::Precache( void )
{ {
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
// Reset attachment after save/restore // Reset attachment after save/restore
if( pev->aiment ) if( pev->aiment )
@ -1515,7 +1515,7 @@ void CEnvShooter::KeyValue( KeyValueData *pkvd )
void CEnvShooter::Precache( void ) void CEnvShooter::Precache( void )
{ {
m_iGibModelIndex = PRECACHE_MODEL( (char *)STRING( pev->model ) ); m_iGibModelIndex = PRECACHE_MODEL( STRING( pev->model ) );
CBreakable::MaterialSoundPrecache( (Materials)m_iGibMaterial ); CBreakable::MaterialSoundPrecache( (Materials)m_iGibMaterial );
} }
@ -2005,7 +2005,7 @@ void CMessage::Spawn( void )
void CMessage::Precache( void ) void CMessage::Precache( void )
{ {
if( pev->noise ) if( pev->noise )
PRECACHE_SOUND( (char *)STRING( pev->noise ) ); PRECACHE_SOUND( STRING( pev->noise ) );
} }
void CMessage::KeyValue( KeyValueData *pkvd ) void CMessage::KeyValue( KeyValueData *pkvd )
@ -2040,16 +2040,15 @@ void CMessage::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useT
if( pActivator && pActivator->IsPlayer() ) if( pActivator && pActivator->IsPlayer() )
pPlayer = pActivator; pPlayer = pActivator;
else else
{
pPlayer = CBaseEntity::Instance( g_engfuncs.pfnPEntityOfEntIndex( 1 ) ); pPlayer = CBaseEntity::Instance( g_engfuncs.pfnPEntityOfEntIndex( 1 ) );
}
if( pPlayer ) if( pPlayer )
UTIL_ShowMessage( STRING( pev->message ), pPlayer ); UTIL_ShowMessage( STRING( pev->message ), pPlayer );
} }
if( pev->noise ) if( pev->noise )
{
EMIT_SOUND( edict(), CHAN_BODY, STRING( pev->noise ), pev->scale, pev->speed ); EMIT_SOUND( edict(), CHAN_BODY, STRING( pev->noise ), pev->scale, pev->speed );
}
if( pev->spawnflags & SF_MESSAGE_ONCE ) if( pev->spawnflags & SF_MESSAGE_ONCE )
UTIL_Remove( this ); UTIL_Remove( this );

8
dlls/func_break.cpp

@ -259,7 +259,7 @@ void CBreakable::MaterialSoundPrecache( Materials precacheMaterial )
for( i = 0; i < soundCount; i++ ) for( i = 0; i < soundCount; i++ )
{ {
PRECACHE_SOUND( (char *)pSoundList[i] ); PRECACHE_SOUND( pSoundList[i] );
} }
} }
@ -340,11 +340,11 @@ void CBreakable::Precache( void )
if( m_iszGibModel ) if( m_iszGibModel )
pGibName = STRING( m_iszGibModel ); pGibName = STRING( m_iszGibModel );
m_idShard = PRECACHE_MODEL( (char *)pGibName ); m_idShard = PRECACHE_MODEL( pGibName );
// Precache the spawn item's data // Precache the spawn item's data
if( m_iszSpawnObject ) if( m_iszSpawnObject )
UTIL_PrecacheOther( (char *)STRING( m_iszSpawnObject ) ); UTIL_PrecacheOther( STRING( m_iszSpawnObject ) );
} }
// play shard sound when func_breakable takes damage. // play shard sound when func_breakable takes damage.
@ -746,7 +746,7 @@ void CBreakable::Die( void )
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = pev->ltime + 0.1; pev->nextthink = pev->ltime + 0.1;
if( m_iszSpawnObject ) if( m_iszSpawnObject )
CBaseEntity::Create( (char *)STRING( m_iszSpawnObject ), VecBModelOrigin( pev ), pev->angles, edict() ); CBaseEntity::Create( STRING( m_iszSpawnObject ), VecBModelOrigin( pev ), pev->angles, edict() );
if( Explodable() ) if( Explodable() )
{ {

10
dlls/func_tank.cpp

@ -200,13 +200,13 @@ void CFuncTank::Spawn( void )
void CFuncTank::Precache( void ) void CFuncTank::Precache( void )
{ {
if( m_iszSpriteSmoke ) if( m_iszSpriteSmoke )
PRECACHE_MODEL( (char *)STRING( m_iszSpriteSmoke ) ); PRECACHE_MODEL( STRING( m_iszSpriteSmoke ) );
if( m_iszSpriteFlash ) if( m_iszSpriteFlash )
PRECACHE_MODEL( (char *)STRING( m_iszSpriteFlash ) ); PRECACHE_MODEL( STRING( m_iszSpriteFlash ) );
if( pev->noise ) if( pev->noise )
PRECACHE_SOUND( (char *)STRING( pev->noise ) ); PRECACHE_SOUND( STRING( pev->noise ) );
} }
void CFuncTank::KeyValue( KeyValueData *pkvd ) void CFuncTank::KeyValue( KeyValueData *pkvd )
@ -688,13 +688,13 @@ void CFuncTank::StartRotSound( void )
if( !pev->noise || ( pev->spawnflags & SF_TANK_SOUNDON ) ) if( !pev->noise || ( pev->spawnflags & SF_TANK_SOUNDON ) )
return; return;
pev->spawnflags |= SF_TANK_SOUNDON; pev->spawnflags |= SF_TANK_SOUNDON;
EMIT_SOUND( edict(), CHAN_STATIC, (char*)STRING( pev->noise ), 0.85, ATTN_NORM ); EMIT_SOUND( edict(), CHAN_STATIC, STRING( pev->noise ), 0.85, ATTN_NORM );
} }
void CFuncTank::StopRotSound( void ) void CFuncTank::StopRotSound( void )
{ {
if( pev->spawnflags & SF_TANK_SOUNDON ) if( pev->spawnflags & SF_TANK_SOUNDON )
STOP_SOUND( edict(), CHAN_STATIC, (char*)STRING( pev->noise ) ); STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noise ) );
pev->spawnflags &= ~SF_TANK_SOUNDON; pev->spawnflags &= ~SF_TANK_SOUNDON;
} }

22
dlls/gargantua.cpp

@ -770,37 +770,37 @@ void CGargantua::Precache()
PRECACHE_SOUND( GARG_STOMP_BUZZ_SOUND ); PRECACHE_SOUND( GARG_STOMP_BUZZ_SOUND );
for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackHitSounds[i] ); PRECACHE_SOUND( pAttackHitSounds[i] );
for( i = 0; i < ARRAYSIZE( pBeamAttackSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pBeamAttackSounds ); i++ )
PRECACHE_SOUND( (char *)pBeamAttackSounds[i] ); PRECACHE_SOUND( pBeamAttackSounds[i] );
for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackMissSounds[i] ); PRECACHE_SOUND( pAttackMissSounds[i] );
for( i = 0; i < ARRAYSIZE( pRicSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pRicSounds ); i++ )
PRECACHE_SOUND( (char *)pRicSounds[i] ); PRECACHE_SOUND( pRicSounds[i] );
for( i = 0; i < ARRAYSIZE( pFootSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pFootSounds ); i++ )
PRECACHE_SOUND( (char *)pFootSounds[i] ); PRECACHE_SOUND( pFootSounds[i] );
for( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ )
PRECACHE_SOUND( (char *)pIdleSounds[i] ); PRECACHE_SOUND( pIdleSounds[i] );
for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ )
PRECACHE_SOUND((char *)pAlertSounds[i]); PRECACHE_SOUND( pAlertSounds[i] );
for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ )
PRECACHE_SOUND( (char *)pPainSounds[i] ); PRECACHE_SOUND( pPainSounds[i] );
for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackSounds[i] ); PRECACHE_SOUND( pAttackSounds[i] );
for( i = 0; i < ARRAYSIZE( pStompSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pStompSounds ); i++ )
PRECACHE_SOUND( (char *)pStompSounds[i] ); PRECACHE_SOUND( pStompSounds[i] );
for( i = 0; i < ARRAYSIZE( pBreatheSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pBreatheSounds ); i++ )
PRECACHE_SOUND( (char *)pBreatheSounds[i] ); PRECACHE_SOUND( pBreatheSounds[i] );
} }
void CGargantua::UpdateOnRemove() void CGargantua::UpdateOnRemove()

2
dlls/genericmonster.cpp

@ -131,7 +131,7 @@ void CGenericMonster::Spawn()
//========================================================= //=========================================================
void CGenericMonster::Precache() void CGenericMonster::Precache()
{ {
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
} }
//========================================================= //=========================================================

10
dlls/h_cycler.cpp

@ -67,7 +67,7 @@ class CGenericCycler : public CCycler
public: public:
void Spawn( void ) void Spawn( void )
{ {
GenericCyclerSpawn( (char *)STRING( pev->model ), Vector( -16, -16, 0 ), Vector( 16, 16, 72 ) ); GenericCyclerSpawn( STRING( pev->model ), Vector( -16, -16, 0 ), Vector( 16, 16, 72 ) );
} }
}; };
@ -255,7 +255,7 @@ void CCyclerSprite::Spawn( void )
m_animate = 1; m_animate = 1;
m_lastTime = gpGlobals->time; m_lastTime = gpGlobals->time;
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
SET_MODEL( ENT( pev ), STRING( pev->model ) ); SET_MODEL( ENT( pev ), STRING( pev->model ) );
m_maxFrame = (float)MODEL_FRAMES( pev->modelindex ) - 1; m_maxFrame = (float)MODEL_FRAMES( pev->modelindex ) - 1;
@ -314,7 +314,7 @@ void CWeaponCycler::Spawn()
pev->solid = SOLID_SLIDEBOX; pev->solid = SOLID_SLIDEBOX;
pev->movetype = MOVETYPE_NONE; pev->movetype = MOVETYPE_NONE;
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
SET_MODEL( ENT( pev ), STRING( pev->model ) ); SET_MODEL( ENT( pev ), STRING( pev->model ) );
m_iszModel = pev->model; m_iszModel = pev->model;
m_iModel = pev->modelindex; m_iModel = pev->modelindex;
@ -401,7 +401,7 @@ void CWreckage::Spawn( void )
if( pev->model ) if( pev->model )
{ {
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
SET_MODEL( ENT( pev ), STRING( pev->model ) ); SET_MODEL( ENT( pev ), STRING( pev->model ) );
} }
// pev->scale = 5.0; // pev->scale = 5.0;
@ -412,7 +412,7 @@ void CWreckage::Spawn( void )
void CWreckage::Precache() void CWreckage::Precache()
{ {
if( pev->model ) if( pev->model )
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
} }
void CWreckage::Think( void ) void CWreckage::Think( void )

8
dlls/islave.cpp

@ -544,16 +544,16 @@ void CISlave::Precache()
PRECACHE_SOUND( "weapons/cbar_miss1.wav" ); PRECACHE_SOUND( "weapons/cbar_miss1.wav" );
for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackHitSounds[i] ); PRECACHE_SOUND( pAttackHitSounds[i] );
for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackMissSounds[i] ); PRECACHE_SOUND( pAttackMissSounds[i] );
for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ )
PRECACHE_SOUND((char *)pPainSounds[i] ); PRECACHE_SOUND( pPainSounds[i] );
for( i = 0; i < ARRAYSIZE( pDeathSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pDeathSounds ); i++ )
PRECACHE_SOUND( (char *)pDeathSounds[i] ); PRECACHE_SOUND( pDeathSounds[i] );
UTIL_PrecacheOther( "test_effect" ); UTIL_PrecacheOther( "test_effect" );
} }

4
dlls/leech.cpp

@ -277,9 +277,9 @@ void CLeech::Precache( void )
PRECACHE_MODEL( "models/leech.mdl" ); PRECACHE_MODEL( "models/leech.mdl" );
for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackSounds[i] ); PRECACHE_SOUND( pAttackSounds[i] );
for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ )
PRECACHE_SOUND( (char *)pAlertSounds[i] ); PRECACHE_SOUND( pAlertSounds[i] );
} }
int CLeech::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) int CLeech::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType )

28
dlls/multiplay_gamerules.cpp

@ -92,7 +92,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay()
if( IS_DEDICATED_SERVER() ) if( IS_DEDICATED_SERVER() )
{ {
// dedicated server // dedicated server
/*char *servercfgfile = (char *)CVAR_GET_STRING( "servercfgfile" ); /*const char *servercfgfile = CVAR_GET_STRING( "servercfgfile" );
if( servercfgfile && servercfgfile[0] ) if( servercfgfile && servercfgfile[0] )
{ {
@ -108,7 +108,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay()
else else
{ {
// listen server // listen server
char *lservercfgfile = (char *)CVAR_GET_STRING( "lservercfgfile" ); const char *lservercfgfile = CVAR_GET_STRING( "lservercfgfile" );
if( lservercfgfile && lservercfgfile[0] ) if( lservercfgfile && lservercfgfile[0] )
{ {
@ -1214,7 +1214,7 @@ COM_Parse
Parse a token out of a string Parse a token out of a string
============== ==============
*/ */
char *COM_Parse( char *data ) const char *COM_Parse( const char *data )
{ {
int c; int c;
int len; int len;
@ -1290,9 +1290,9 @@ COM_TokenWaiting
Returns 1 if additional data is waiting to be processed on this line Returns 1 if additional data is waiting to be processed on this line
============== ==============
*/ */
int COM_TokenWaiting( char *buffer ) int COM_TokenWaiting( const char *buffer )
{ {
char *p; const char *p;
p = buffer; p = buffer;
while( *p && *p!='\n') while( *p && *p!='\n')
@ -1313,12 +1313,12 @@ ReloadMapCycleFile
Parses mapcycle.txt file into mapcycle_t structure Parses mapcycle.txt file into mapcycle_t structure
============== ==============
*/ */
int ReloadMapCycleFile( char *filename, mapcycle_t *cycle ) int ReloadMapCycleFile( const char *filename, mapcycle_t *cycle )
{ {
char szMap[32]; char szMap[32];
int length; int length;
char *pFileList; const char *pFileList;
char *aFileList = pFileList = (char*)LOAD_FILE_FOR_ME( filename, &length ); const char *aFileList = pFileList = (const char *)LOAD_FILE_FOR_ME( filename, &length );
int hasbuffer; int hasbuffer;
mapcycle_item_s *item, *newlist = NULL, *next; mapcycle_item_s *item, *newlist = NULL, *next;
@ -1396,7 +1396,7 @@ int ReloadMapCycleFile( char *filename, mapcycle_t *cycle )
} }
} }
FREE_FILE( aFileList ); FREE_FILE( (void*)aFileList );
} }
// Fixup circular list pointer // Fixup circular list pointer
@ -1532,7 +1532,7 @@ void CHalfLifeMultiplay::ChangeLevel( void )
BOOL do_cycle = TRUE; BOOL do_cycle = TRUE;
// find the map to change to // find the map to change to
char *mapcfile = (char*)CVAR_GET_STRING( "mapcyclefile" ); const char *mapcfile = CVAR_GET_STRING( "mapcyclefile" );
ASSERT( mapcfile != NULL ); ASSERT( mapcfile != NULL );
szCommands[0] = '\0'; szCommands[0] = '\0';
@ -1650,8 +1650,8 @@ void CHalfLifeMultiplay::SendMOTDToClient( edict_t *client )
{ {
// read from the MOTD.txt file // read from the MOTD.txt file
int length, char_count = 0; int length, char_count = 0;
char *pFileList; const char *pFileList;
char *aFileList = pFileList = (char*)LOAD_FILE_FOR_ME( (char *)CVAR_GET_STRING( "motdfile" ), &length ); const char *aFileList = pFileList = (const char*)LOAD_FILE_FOR_ME( CVAR_GET_STRING( "motdfile" ), &length );
// send the server name // send the server name
MESSAGE_BEGIN( MSG_ONE, gmsgServerName, NULL, client ); MESSAGE_BEGIN( MSG_ONE, gmsgServerName, NULL, client );
@ -1679,7 +1679,7 @@ void CHalfLifeMultiplay::SendMOTDToClient( edict_t *client )
if( char_count < MAX_MOTD_LENGTH ) if( char_count < MAX_MOTD_LENGTH )
pFileList = aFileList + char_count; pFileList = aFileList + char_count;
else else
*pFileList = 0; pFileList = 0;
MESSAGE_BEGIN( MSG_ONE, gmsgMOTD, NULL, client ); MESSAGE_BEGIN( MSG_ONE, gmsgMOTD, NULL, client );
WRITE_BYTE( *pFileList ? FALSE : TRUE ); // FALSE means there is still more message to come WRITE_BYTE( *pFileList ? FALSE : TRUE ); // FALSE means there is still more message to come
@ -1687,5 +1687,5 @@ void CHalfLifeMultiplay::SendMOTDToClient( edict_t *client )
MESSAGE_END(); MESSAGE_END();
} }
FREE_FILE( aFileList ); FREE_FILE( (void*)aFileList );
} }

8
dlls/nodes.cpp

@ -2108,7 +2108,7 @@ void CTestHull::BuildNodeGraph( void )
WorldGraph.ComputeStaticRoutingTables(); WorldGraph.ComputeStaticRoutingTables();
// save the node graph for this level // save the node graph for this level
WorldGraph.FSaveGraph( (char *)STRING( gpGlobals->mapname ) ); WorldGraph.FSaveGraph( STRING( gpGlobals->mapname ) );
ALERT( at_console, "Done.\n" ); ALERT( at_console, "Done.\n" );
} }
@ -2363,7 +2363,7 @@ void CQueuePriority::Heap_SiftUp( void )
// will be loaded. If file cannot be loaded, the node tree // will be loaded. If file cannot be loaded, the node tree
// will be created and saved to disk. // will be created and saved to disk.
//========================================================= //=========================================================
int CGraph::FLoadGraph( char *szMapName ) int CGraph::FLoadGraph( const char *szMapName )
{ {
char szFilename[MAX_PATH]; char szFilename[MAX_PATH];
int iVersion; int iVersion;
@ -2542,7 +2542,7 @@ NoMemory:
// CGraph - FSaveGraph - It's not rocket science. // CGraph - FSaveGraph - It's not rocket science.
// this WILL overwrite existing files. // this WILL overwrite existing files.
//========================================================= //=========================================================
int CGraph::FSaveGraph( char *szMapName ) int CGraph::FSaveGraph( const char *szMapName )
{ {
int iVersion = GRAPH_VERSION; int iVersion = GRAPH_VERSION;
char szFilename[MAX_PATH]; char szFilename[MAX_PATH];
@ -2674,7 +2674,7 @@ int CGraph::FSetGraphPointers( void )
// though. ( I now suspect that we are getting GMT back from // though. ( I now suspect that we are getting GMT back from
// these functions and must compensate for local time ) (sjb) // these functions and must compensate for local time ) (sjb)
//========================================================= //=========================================================
int CGraph::CheckNODFile( char *szMapName ) int CGraph::CheckNODFile( const char *szMapName )
{ {
int retValue; int retValue;

6
dlls/nodes.h

@ -182,9 +182,9 @@ public:
void InitGraph( void ); void InitGraph( void );
int AllocNodes ( void ); int AllocNodes ( void );
int CheckNODFile(char *szMapName); int CheckNODFile(const char *szMapName);
int FLoadGraph(char *szMapName); int FLoadGraph(const char *szMapName);
int FSaveGraph(char *szMapName); int FSaveGraph(const char *szMapName);
int FSetGraphPointers(void); int FSetGraphPointers(void);
void CheckNode(Vector vecOrigin, int iNode); void CheckNode(Vector vecOrigin, int iNode);

38
dlls/plats.cpp

@ -416,7 +416,7 @@ void CFuncPlat::PlatUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE
void CFuncPlat::GoDown( void ) void CFuncPlat::GoDown( void )
{ {
if( pev->noiseMovement ) if( pev->noiseMovement )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMovement ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMovement ), m_volume, ATTN_NORM );
ASSERT( m_toggle_state == TS_AT_TOP || m_toggle_state == TS_GOING_UP ); ASSERT( m_toggle_state == TS_AT_TOP || m_toggle_state == TS_GOING_UP );
m_toggle_state = TS_GOING_DOWN; m_toggle_state = TS_GOING_DOWN;
@ -430,10 +430,10 @@ void CFuncPlat::GoDown( void )
void CFuncPlat::HitBottom( void ) void CFuncPlat::HitBottom( void )
{ {
if( pev->noiseMovement ) if( pev->noiseMovement )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMovement ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMovement ) );
if( pev->noiseStopMoving ) if( pev->noiseStopMoving )
EMIT_SOUND( ENT( pev ), CHAN_WEAPON, (char*)STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_WEAPON, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
ASSERT( m_toggle_state == TS_GOING_DOWN ); ASSERT( m_toggle_state == TS_GOING_DOWN );
m_toggle_state = TS_AT_BOTTOM; m_toggle_state = TS_AT_BOTTOM;
@ -445,7 +445,7 @@ void CFuncPlat::HitBottom( void )
void CFuncPlat::GoUp( void ) void CFuncPlat::GoUp( void )
{ {
if( pev->noiseMovement ) if( pev->noiseMovement )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMovement ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMovement ), m_volume, ATTN_NORM );
ASSERT( m_toggle_state == TS_AT_BOTTOM || m_toggle_state == TS_GOING_DOWN ); ASSERT( m_toggle_state == TS_AT_BOTTOM || m_toggle_state == TS_GOING_DOWN );
m_toggle_state = TS_GOING_UP; m_toggle_state = TS_GOING_UP;
@ -459,10 +459,10 @@ void CFuncPlat::GoUp( void )
void CFuncPlat::HitTop( void ) void CFuncPlat::HitTop( void )
{ {
if( pev->noiseMovement ) if( pev->noiseMovement )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMovement ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMovement ) );
if( pev->noiseStopMoving ) if( pev->noiseStopMoving )
EMIT_SOUND( ENT( pev ), CHAN_WEAPON, (char*)STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_WEAPON, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
ASSERT( m_toggle_state == TS_GOING_UP ); ASSERT( m_toggle_state == TS_GOING_UP );
m_toggle_state = TS_AT_TOP; m_toggle_state = TS_AT_TOP;
@ -482,7 +482,7 @@ void CFuncPlat::Blocked( CBaseEntity *pOther )
pOther->TakeDamage( pev, pev, 1, DMG_CRUSH ); pOther->TakeDamage( pev, pev, 1, DMG_CRUSH );
if( pev->noiseMovement ) if( pev->noiseMovement )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMovement ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMovement ) );
// Send the platform back where it came from // Send the platform back where it came from
ASSERT( m_toggle_state == TS_GOING_UP || m_toggle_state == TS_GOING_DOWN ); ASSERT( m_toggle_state == TS_GOING_UP || m_toggle_state == TS_GOING_DOWN );
@ -670,7 +670,7 @@ void CFuncTrain::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
pev->nextthink = 0; pev->nextthink = 0;
pev->velocity = g_vecZero; pev->velocity = g_vecZero;
if( pev->noiseStopMoving ) if( pev->noiseStopMoving )
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
} }
} }
@ -691,9 +691,9 @@ void CFuncTrain::Wait( void )
// clear the sound channel. // clear the sound channel.
if( pev->noiseMovement ) if( pev->noiseMovement )
STOP_SOUND( edict(), CHAN_STATIC, (char*)STRING( pev->noiseMovement ) ); STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
if( pev->noiseStopMoving ) if( pev->noiseStopMoving )
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
pev->nextthink = 0; pev->nextthink = 0;
return; return;
} }
@ -704,9 +704,9 @@ void CFuncTrain::Wait( void )
// -1 wait will wait forever! // -1 wait will wait forever!
pev->nextthink = pev->ltime + m_flWait; pev->nextthink = pev->ltime + m_flWait;
if( pev->noiseMovement ) if( pev->noiseMovement )
STOP_SOUND( edict(), CHAN_STATIC, (char*)STRING( pev->noiseMovement ) ); STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
if( pev->noiseStopMoving ) if( pev->noiseStopMoving )
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
SetThink( &CFuncTrain::Next ); SetThink( &CFuncTrain::Next );
} }
else else
@ -728,10 +728,10 @@ void CFuncTrain::Next( void )
if( !pTarg ) if( !pTarg )
{ {
if( pev->noiseMovement ) if( pev->noiseMovement )
STOP_SOUND( edict(), CHAN_STATIC, (char*)STRING( pev->noiseMovement ) ); STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
// Play stop sound // Play stop sound
if( pev->noiseStopMoving ) if( pev->noiseStopMoving )
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
return; return;
} }
@ -767,8 +767,8 @@ void CFuncTrain::Next( void )
// this is not a hack or temporary fix, this is how things should be. (sjb). // this is not a hack or temporary fix, this is how things should be. (sjb).
if( pev->noiseMovement ) if( pev->noiseMovement )
{ {
STOP_SOUND( edict(), CHAN_STATIC, (char*)STRING( pev->noiseMovement ) ); STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMovement ), m_volume, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMovement ), m_volume, ATTN_NORM );
} }
ClearBits( pev->effects, EF_NOINTERP ); ClearBits( pev->effects, EF_NOINTERP );
@ -1061,7 +1061,7 @@ void CFuncTrackTrain::StopSound( void )
PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0, PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0,
(float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, us_encode, 0, 1, 0 ); (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, us_encode, 0, 1, 0 );
/* /*
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noise ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noise ) );
*/ */
EMIT_SOUND_DYN( ENT( pev ), CHAN_ITEM, "plats/ttrain_brake1.wav", m_flVolume, ATTN_NORM, 0, 100 ); EMIT_SOUND_DYN( ENT( pev ), CHAN_ITEM, "plats/ttrain_brake1.wav", m_flVolume, ATTN_NORM, 0, 100 );
} }
@ -1085,14 +1085,14 @@ void CFuncTrackTrain::UpdateSound( void )
{ {
// play startup sound for train // play startup sound for train
EMIT_SOUND_DYN( ENT( pev ), CHAN_ITEM, "plats/ttrain_start1.wav", m_flVolume, ATTN_NORM, 0, 100 ); EMIT_SOUND_DYN( ENT( pev ), CHAN_ITEM, "plats/ttrain_start1.wav", m_flVolume, ATTN_NORM, 0, 100 );
EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noise ), m_flVolume, ATTN_NORM, 0, (int)flpitch ); EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noise ), m_flVolume, ATTN_NORM, 0, (int)flpitch );
m_soundPlaying = 1; m_soundPlaying = 1;
} }
else else
{ {
/* /*
// update pitch // update pitch
EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noise ), m_flVolume, ATTN_NORM, SND_CHANGE_PITCH, (int)flpitch ); EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noise ), m_flVolume, ATTN_NORM, SND_CHANGE_PITCH, (int)flpitch );
*/ */
// volume 0.0 - 1.0 - 6 bits // volume 0.0 - 1.0 - 6 bits
// m_sounds 3 bits // m_sounds 3 bits

6
dlls/prop.cpp

@ -248,7 +248,7 @@ void CProp::MaterialSoundPrecache( Materials precacheMaterial )
for( i = 0; i < soundCount; i++ ) for( i = 0; i < soundCount; i++ )
{ {
PRECACHE_SOUND( (char *)pSoundList[i] ); PRECACHE_SOUND( pSoundList[i] );
} }
} }
@ -327,8 +327,8 @@ void CProp::Precache( void )
if( m_iszGibModel ) if( m_iszGibModel )
pGibName = STRING( m_iszGibModel ); pGibName = STRING( m_iszGibModel );
m_idShard = PRECACHE_MODEL( (char *)pGibName ); m_idShard = PRECACHE_MODEL( pGibName );
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
} }
void CProp::DamageSound( void ) void CProp::DamageSound( void )

2
dlls/scripted.cpp

@ -1177,7 +1177,7 @@ void CFurniture::Die( void )
//========================================================= //=========================================================
void CFurniture::Spawn() void CFurniture::Spawn()
{ {
PRECACHE_MODEL( (char *)STRING( pev->model ) ); PRECACHE_MODEL( STRING( pev->model ) );
SET_MODEL( ENT( pev ), STRING( pev->model ) ); SET_MODEL( ENT( pev ), STRING( pev->model ) );
pev->movetype = MOVETYPE_NONE; pev->movetype = MOVETYPE_NONE;

8
dlls/sound.cpp

@ -182,7 +182,7 @@ void CAmbientGeneric::Spawn( void )
m_flAttenuation = ATTN_STATIC; m_flAttenuation = ATTN_STATIC;
} }
char* szSoundFile = (char*)STRING( pev->message ); const char *szSoundFile = STRING( pev->message );
if( FStringNull( pev->message ) || strlen( szSoundFile ) < 1 ) if( FStringNull( pev->message ) || strlen( szSoundFile ) < 1 )
{ {
@ -216,7 +216,7 @@ void CAmbientGeneric::Spawn( void )
void CAmbientGeneric::Precache( void ) void CAmbientGeneric::Precache( void )
{ {
char* szSoundFile = (char*)STRING( pev->message ); const char *szSoundFile = STRING( pev->message );
if( !FStringNull( pev->message ) && strlen( szSoundFile ) > 1 ) if( !FStringNull( pev->message ) && strlen( szSoundFile ) > 1 )
{ {
@ -248,7 +248,7 @@ void CAmbientGeneric::Precache( void )
// with lfo if active. // with lfo if active.
void CAmbientGeneric::RampThink( void ) void CAmbientGeneric::RampThink( void )
{ {
char* szSoundFile = (char*) STRING(pev->message); const char *szSoundFile = STRING( pev->message );
int pitch = m_dpv.pitch; int pitch = m_dpv.pitch;
int vol = m_dpv.vol; int vol = m_dpv.vol;
int flags = 0; int flags = 0;
@ -533,7 +533,7 @@ void CAmbientGeneric::InitModulationParms( void )
// //
void CAmbientGeneric::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) void CAmbientGeneric::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{ {
char* szSoundFile = (char*)STRING( pev->message ); const char *szSoundFile = STRING( pev->message );
float fraction; float fraction;
if( useType != USE_TOGGLE ) if( useType != USE_TOGGLE )

4
dlls/stats.cpp

@ -48,7 +48,7 @@ float AmmoDamage( const char *pName )
return 0; return 0;
} }
void UpdateStatsFile( float dataTime, char *pMapname, float health, float ammo, int skillLevel ) void UpdateStatsFile( float dataTime, const char *pMapname, float health, float ammo, int skillLevel )
{ {
FILE *fp; FILE *fp;
@ -136,7 +136,7 @@ void UpdateStats( CBasePlayer *pPlayer )
} }
else if( ( gStats.nextOutputTime != 0 && gStats.nextOutputTime < gStats.gameTime ) || forceWrite ) else if( ( gStats.nextOutputTime != 0 && gStats.nextOutputTime < gStats.gameTime ) || forceWrite )
{ {
UpdateStatsFile( gStats.dataTime, (char *)STRING( gpGlobals->mapname ), health, ammo, (int)CVAR_GET_FLOAT( "skill" ) ); UpdateStatsFile( gStats.dataTime, STRING( gpGlobals->mapname ), health, ammo, (int)CVAR_GET_FLOAT( "skill" ) );
gStats.lastAmmo = ammo; gStats.lastAmmo = ammo;
gStats.lastHealth = health; gStats.lastHealth = health;

2
dlls/triggers.cpp

@ -1135,7 +1135,7 @@ void CBaseTrigger::ActivateMultiTrigger( CBaseEntity *pActivator )
} }
if( !FStringNull( pev->noise ) ) if( !FStringNull( pev->noise ) )
EMIT_SOUND( ENT( pev ), CHAN_VOICE, (char*)STRING( pev->noise ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM );
// don't trigger again until reset // don't trigger again until reset
// pev->takedamage = DAMAGE_NO; // pev->takedamage = DAMAGE_NO;

6
dlls/util.cpp

@ -1858,7 +1858,7 @@ void CSave::WriteString( const char *pname, const int *stringId, int count )
#if 0 #if 0
if( count != 1 ) if( count != 1 )
ALERT( at_error, "No string arrays!\n" ); ALERT( at_error, "No string arrays!\n" );
WriteString( pname, (char *)STRING( *stringId ) ); WriteString( pname, STRING( *stringId ) );
#endif #endif
size = 0; size = 0;
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
@ -2209,9 +2209,9 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
if( !FStringNull( string ) && m_precache ) if( !FStringNull( string ) && m_precache )
{ {
if( pTest->fieldType == FIELD_MODELNAME ) if( pTest->fieldType == FIELD_MODELNAME )
PRECACHE_MODEL( (char *)STRING( string ) ); PRECACHE_MODEL( STRING( string ) );
else if( pTest->fieldType == FIELD_SOUNDNAME ) else if( pTest->fieldType == FIELD_SOUNDNAME )
PRECACHE_SOUND( (char *)STRING( string ) ); PRECACHE_SOUND( STRING( string ) );
} }
} }
break; break;

2
dlls/util.h

@ -542,7 +542,7 @@ void EMIT_GROUPID_SUIT(edict_t *entity, int isentenceg);
void EMIT_GROUPNAME_SUIT(edict_t *entity, const char *groupname); void EMIT_GROUPNAME_SUIT(edict_t *entity, const char *groupname);
#define PRECACHE_SOUND_ARRAY( a ) \ #define PRECACHE_SOUND_ARRAY( a ) \
{ for (int i = 0; i < (int)ARRAYSIZE( a ); i++ ) PRECACHE_SOUND((char *) a [i]); } { for (int i = 0; i < (int)ARRAYSIZE( a ); i++ ) PRECACHE_SOUND( a[i] ); }
#define EMIT_SOUND_ARRAY_DYN( chan, array ) \ #define EMIT_SOUND_ARRAY_DYN( chan, array ) \
EMIT_SOUND_DYN ( ENT(pev), chan , array [ RANDOM_LONG(0,ARRAYSIZE( array )-1) ], 1.0, ATTN_NORM, 0, RANDOM_LONG(95,105) ); EMIT_SOUND_DYN ( ENT(pev), chan , array [ RANDOM_LONG(0,ARRAYSIZE( array )-1) ], 1.0, ATTN_NORM, 0, RANDOM_LONG(95,105) );

8
dlls/weapons.cpp

@ -367,7 +367,7 @@ void W_Precache( void )
g_sModelIndexBloodSpray = PRECACHE_MODEL( "sprites/bloodspray.spr" ); // initial blood g_sModelIndexBloodSpray = PRECACHE_MODEL( "sprites/bloodspray.spr" ); // initial blood
g_sModelIndexBloodDrop = PRECACHE_MODEL( "sprites/blood.spr" ); // splattered blood g_sModelIndexBloodDrop = PRECACHE_MODEL( "sprites/blood.spr" ); // splattered blood
g_sModelIndexLaser = PRECACHE_MODEL( (char *)g_pModelNameLaser ); g_sModelIndexLaser = PRECACHE_MODEL( g_pModelNameLaser );
g_sModelIndexLaserDot = PRECACHE_MODEL( "sprites/laserdot.spr" ); g_sModelIndexLaserDot = PRECACHE_MODEL( "sprites/laserdot.spr" );
// used by explosions // used by explosions
@ -535,7 +535,7 @@ CBaseEntity* CBasePlayerItem::Respawn( void )
{ {
// make a copy of this weapon that is invisible and inaccessible to players (no touch function). The weapon spawn/respawn code // make a copy of this weapon that is invisible and inaccessible to players (no touch function). The weapon spawn/respawn code
// will decide when to make the weapon visible and touchable. // will decide when to make the weapon visible and touchable.
CBaseEntity *pNewWeapon = CBaseEntity::Create( (char *)STRING( pev->classname ), g_pGameRules->VecWeaponRespawnSpot( this ), pev->angles, pev->owner ); CBaseEntity *pNewWeapon = CBaseEntity::Create( STRING( pev->classname ), g_pGameRules->VecWeaponRespawnSpot( this ), pev->angles, pev->owner );
if( pNewWeapon ) if( pNewWeapon )
{ {
@ -1297,7 +1297,7 @@ void CWeaponBox::Touch( CBaseEntity *pOther )
if( !FStringNull( m_rgiszAmmo[i] ) ) if( !FStringNull( m_rgiszAmmo[i] ) )
{ {
// there's some ammo of this type. // there's some ammo of this type.
pPlayer->GiveAmmo( m_rgAmmo[i], (char *)STRING( m_rgiszAmmo[i] ), MaxAmmoCarry( m_rgiszAmmo[i] ) ); pPlayer->GiveAmmo( m_rgAmmo[i], STRING( m_rgiszAmmo[i] ), MaxAmmoCarry( m_rgiszAmmo[i] ) );
//ALERT( at_console, "Gave %d rounds of %s\n", m_rgAmmo[i], STRING( m_rgiszAmmo[i] ) ); //ALERT( at_console, "Gave %d rounds of %s\n", m_rgAmmo[i], STRING( m_rgiszAmmo[i] ) );
@ -1407,7 +1407,7 @@ BOOL CWeaponBox::PackAmmo( int iszName, int iCount )
if( iMaxCarry != -1 && iCount > 0 ) if( iMaxCarry != -1 && iCount > 0 )
{ {
//ALERT( at_console, "Packed %d rounds of %s\n", iCount, STRING( iszName ) ); //ALERT( at_console, "Packed %d rounds of %s\n", iCount, STRING( iszName ) );
GiveAmmo( iCount, (char *)STRING( iszName ), iMaxCarry ); GiveAmmo( iCount, STRING( iszName ), iMaxCarry );
return TRUE; return TRUE;
} }

4
dlls/world.cpp

@ -592,7 +592,7 @@ void CWorld::Precache( void )
WorldGraph.InitGraph(); WorldGraph.InitGraph();
// make sure the .NOD file is newer than the .BSP file. // make sure the .NOD file is newer than the .BSP file.
if( !WorldGraph.CheckNODFile( ( char * )STRING( gpGlobals->mapname ) ) ) if( !WorldGraph.CheckNODFile( STRING( gpGlobals->mapname ) ) )
{ {
// NOD file is not present, or is older than the BSP file. // NOD file is not present, or is older than the BSP file.
WorldGraph.AllocNodes(); WorldGraph.AllocNodes();
@ -600,7 +600,7 @@ void CWorld::Precache( void )
else else
{ {
// Load the node graph for this level // Load the node graph for this level
if( !WorldGraph.FLoadGraph ( (char *)STRING( gpGlobals->mapname ) ) ) if( !WorldGraph.FLoadGraph( STRING( gpGlobals->mapname ) ) )
{ {
// couldn't load, so alloc and prepare to build a graph. // couldn't load, so alloc and prepare to build a graph.
ALERT( at_console, "*Error opening .NOD file\n" ); ALERT( at_console, "*Error opening .NOD file\n" );

2
dlls/xen.cpp

@ -527,7 +527,7 @@ const char *CXenSpore::pModelNames[] =
void CXenSpore::Precache( void ) void CXenSpore::Precache( void )
{ {
PRECACHE_MODEL( (char *)pModelNames[pev->skin] ); PRECACHE_MODEL( pModelNames[pev->skin] );
} }
void CXenSpore::Touch( CBaseEntity *pOther ) void CXenSpore::Touch( CBaseEntity *pOther )

12
dlls/zombie.cpp

@ -291,22 +291,22 @@ void CZombie::Precache()
PRECACHE_MODEL( "models/zombie.mdl" ); PRECACHE_MODEL( "models/zombie.mdl" );
for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackHitSounds[i] ); PRECACHE_SOUND( pAttackHitSounds[i] );
for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackMissSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackMissSounds[i] ); PRECACHE_SOUND( pAttackMissSounds[i] );
for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAttackSounds ); i++ )
PRECACHE_SOUND( (char *)pAttackSounds[i] ); PRECACHE_SOUND( pAttackSounds[i] );
for( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pIdleSounds ); i++ )
PRECACHE_SOUND( (char *)pIdleSounds[i] ); PRECACHE_SOUND( pIdleSounds[i] );
for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pAlertSounds ); i++ )
PRECACHE_SOUND( (char *)pAlertSounds[i] ); PRECACHE_SOUND( pAlertSounds[i] );
for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ ) for( i = 0; i < ARRAYSIZE( pPainSounds ); i++ )
PRECACHE_SOUND( (char *)pPainSounds[i] ); PRECACHE_SOUND( pPainSounds[i] );
} }
//========================================================= //=========================================================

Loading…
Cancel
Save