Browse Source

Partially fix -Wswitch.

wantedhl
Night Owl 9 years ago
parent
commit
3a691b21a4
  1. 5
      dlls/agrunt.cpp
  2. 4
      dlls/barney.cpp
  3. 6
      dlls/bullsquid.cpp
  4. 11
      dlls/controller.cpp
  5. 13
      dlls/func_break.cpp
  6. 4
      dlls/hassassin.cpp
  7. 19
      dlls/hgrunt.cpp
  8. 9
      dlls/houndeye.cpp
  9. 7
      dlls/ichthyosaur.cpp
  10. 4
      dlls/islave.cpp
  11. 4
      dlls/monsterstate.cpp
  12. 6
      dlls/scientist.cpp
  13. 2
      dlls/squadmonster.cpp
  14. 2
      dlls/turret.cpp
  15. 2
      dlls/util.cpp

5
dlls/agrunt.cpp

@ -1081,7 +1081,7 @@ Schedule_t *CAGrunt :: GetSchedule ( void ) @@ -1081,7 +1081,7 @@ Schedule_t *CAGrunt :: GetSchedule ( void )
{
case MONSTERSTATE_COMBAT:
{
// dead enemy
// dead enemy
if ( HasConditions( bits_COND_ENEMY_DEAD ) )
{
// call base class, all code to handle dead enemies is centralized there.
@ -1118,6 +1118,9 @@ Schedule_t *CAGrunt :: GetSchedule ( void ) @@ -1118,6 +1118,9 @@ Schedule_t *CAGrunt :: GetSchedule ( void )
return GetScheduleOfType ( SCHED_STANDOFF );
}
break;
default:
break;
}
return CSquadMonster :: GetSchedule();

4
dlls/barney.cpp

@ -702,7 +702,7 @@ Schedule_t *CBarney :: GetSchedule ( void ) @@ -702,7 +702,7 @@ Schedule_t *CBarney :: GetSchedule ( void )
{
case MONSTERSTATE_COMBAT:
{
// dead enemy
// dead enemy
if ( HasConditions( bits_COND_ENEMY_DEAD ) )
{
// call base class, all code to handle dead enemies is centralized there.
@ -756,6 +756,8 @@ Schedule_t *CBarney :: GetSchedule ( void ) @@ -756,6 +756,8 @@ Schedule_t *CBarney :: GetSchedule ( void )
// try to say something about smells
TrySmellTalk();
break;
default:
break;
}
return CTalkMonster::GetSchedule();

6
dlls/bullsquid.cpp

@ -1060,7 +1060,7 @@ Schedule_t *CBullsquid :: GetSchedule( void ) @@ -1060,7 +1060,7 @@ Schedule_t *CBullsquid :: GetSchedule( void )
}
case MONSTERSTATE_COMBAT:
{
// dead enemy
// dead enemy
if ( HasConditions( bits_COND_ENEMY_DEAD ) )
{
// call base class, all code to handle dead enemies is centralized there.
@ -1116,6 +1116,8 @@ Schedule_t *CBullsquid :: GetSchedule( void ) @@ -1116,6 +1116,8 @@ Schedule_t *CBullsquid :: GetSchedule( void )
break;
}
default:
break;
}
return CBaseMonster :: GetSchedule();
@ -1266,6 +1268,8 @@ MONSTERSTATE CBullsquid :: GetIdealState ( void ) @@ -1266,6 +1268,8 @@ MONSTERSTATE CBullsquid :: GetIdealState ( void )
}
break;
}
default:
break;
}
m_IdealMonsterState = CBaseMonster :: GetIdealState();

11
dlls/controller.cpp

@ -731,12 +731,6 @@ Schedule_t *CController :: GetSchedule ( void ) @@ -731,12 +731,6 @@ Schedule_t *CController :: GetSchedule ( void )
{
switch ( m_MonsterState )
{
case MONSTERSTATE_IDLE:
break;
case MONSTERSTATE_ALERT:
break;
case MONSTERSTATE_COMBAT:
{
Vector vecTmp = Intersect( Vector( 0, 0, 0 ), Vector( 100, 4, 7 ), Vector( 2, 10, -3 ), 20.0 );
@ -752,6 +746,11 @@ Schedule_t *CController :: GetSchedule ( void ) @@ -752,6 +746,11 @@ Schedule_t *CController :: GetSchedule ( void )
}
}
break;
case MONSTERSTATE_IDLE:
case MONSTERSTATE_ALERT:
break;
default:
break;
}
return CSquadMonster :: GetSchedule();

13
dlls/func_break.cpp

@ -338,6 +338,11 @@ void CBreakable::Precache( void ) @@ -338,6 +338,11 @@ void CBreakable::Precache( void )
PRECACHE_SOUND ("debris/bustceiling.wav");
break;
case matNone:
case matLastMaterial:
break;
default:
break;
}
MaterialSoundPrecache( m_Material );
if ( m_iszGibModel )
@ -515,6 +520,8 @@ void CBreakable::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vec @@ -515,6 +520,8 @@ void CBreakable::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vec
case matUnbreakableGlass:
UTIL_Ricochet( ptr->vecEndPos, RANDOM_FLOAT(0.5,1.5) );
break;
default:
break;
}
}
@ -664,6 +671,12 @@ void CBreakable::Die( void ) @@ -664,6 +671,12 @@ void CBreakable::Die( void )
case matCeilingTile:
EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "debris/bustceiling.wav", fvol, ATTN_NORM, 0, pitch);
break;
case matNone:
case matLastMaterial:
case matUnbreakableGlass:
break;
default:
break;
}

4
dlls/hassassin.cpp

@ -858,7 +858,7 @@ Schedule_t *CHAssassin :: GetSchedule ( void ) @@ -858,7 +858,7 @@ Schedule_t *CHAssassin :: GetSchedule ( void )
case MONSTERSTATE_COMBAT:
{
// dead enemy
// dead enemy
if ( HasConditions( bits_COND_ENEMY_DEAD ) )
{
// call base class, all code to handle dead enemies is centralized there.
@ -954,6 +954,8 @@ Schedule_t *CHAssassin :: GetSchedule ( void ) @@ -954,6 +954,8 @@ Schedule_t *CHAssassin :: GetSchedule ( void )
return GetScheduleOfType ( SCHED_ALERT_STAND );
}
break;
default:
break;
}
return CBaseMonster :: GetSchedule();

19
dlls/hgrunt.cpp

@ -2035,14 +2035,14 @@ Schedule_t *CHGrunt :: GetSchedule( void ) @@ -2035,14 +2035,14 @@ Schedule_t *CHGrunt :: GetSchedule( void )
{
case MONSTERSTATE_COMBAT:
{
// dead enemy
// dead enemy
if ( HasConditions( bits_COND_ENEMY_DEAD ) )
{
// call base class, all code to handle dead enemies is centralized there.
return CBaseMonster :: GetSchedule();
}
// new enemy
// new enemy
if ( HasConditions(bits_COND_NEW_ENEMY) )
{
if ( InSquad() )
@ -2089,7 +2089,7 @@ Schedule_t *CHGrunt :: GetSchedule( void ) @@ -2089,7 +2089,7 @@ Schedule_t *CHGrunt :: GetSchedule( void )
}
}
}
// no ammo
// no ammo
else if ( HasConditions ( bits_COND_NO_AMMO_LOADED ) )
{
//!!!KELLY - this individual just realized he's out of bullet ammo.
@ -2098,7 +2098,7 @@ Schedule_t *CHGrunt :: GetSchedule( void ) @@ -2098,7 +2098,7 @@ Schedule_t *CHGrunt :: GetSchedule( void )
return GetScheduleOfType ( SCHED_GRUNT_COVER_AND_RELOAD );
}
// damaged just a little
// damaged just a little
else if ( HasConditions( bits_COND_LIGHT_DAMAGE ) )
{
// if hurt:
@ -2124,19 +2124,19 @@ Schedule_t *CHGrunt :: GetSchedule( void ) @@ -2124,19 +2124,19 @@ Schedule_t *CHGrunt :: GetSchedule( void )
return GetScheduleOfType( SCHED_SMALL_FLINCH );
}
}
// can kick
// can kick
else if ( HasConditions ( bits_COND_CAN_MELEE_ATTACK1 ) )
{
return GetScheduleOfType ( SCHED_MELEE_ATTACK1 );
}
// can grenade launch
// can grenade launch
else if ( FBitSet( pev->weapons, HGRUNT_GRENADELAUNCHER) && HasConditions ( bits_COND_CAN_RANGE_ATTACK2 ) && OccupySlot( bits_SLOTS_HGRUNT_GRENADE ) )
{
// shoot a grenade if you can
return GetScheduleOfType( SCHED_RANGE_ATTACK2 );
}
// can shoot
// can shoot
else if ( HasConditions ( bits_COND_CAN_RANGE_ATTACK1 ) )
{
if ( InSquad() )
@ -2167,7 +2167,7 @@ Schedule_t *CHGrunt :: GetSchedule( void ) @@ -2167,7 +2167,7 @@ Schedule_t *CHGrunt :: GetSchedule( void )
return GetScheduleOfType( SCHED_TAKE_COVER_FROM_ENEMY );
}
}
// can't see enemy
// can't see enemy
else if ( HasConditions( bits_COND_ENEMY_OCCLUDED ) )
{
if ( HasConditions( bits_COND_CAN_RANGE_ATTACK2 ) && OccupySlot( bits_SLOTS_HGRUNT_GRENADE ) )
@ -2212,6 +2212,9 @@ Schedule_t *CHGrunt :: GetSchedule( void ) @@ -2212,6 +2212,9 @@ Schedule_t *CHGrunt :: GetSchedule( void )
return GetScheduleOfType ( SCHED_GRUNT_ESTABLISH_LINE_OF_FIRE );
}
}
break;
default:
break;
}
// no special cases here, call the base class

9
dlls/houndeye.cpp

@ -219,14 +219,11 @@ void CHoundeye :: SetYawSpeed ( void ) @@ -219,14 +219,11 @@ void CHoundeye :: SetYawSpeed ( void )
ys = 60;
break;
case ACT_WALK:
ys = 90;
break;
case ACT_RUN:
ys = 90;
break;
case ACT_TURN_LEFT:
case ACT_TURN_RIGHT:
ys = 90;
break;
default:
break;
}
@ -1298,6 +1295,8 @@ Schedule_t *CHoundeye :: GetSchedule( void ) @@ -1298,6 +1295,8 @@ Schedule_t *CHoundeye :: GetSchedule( void )
}
break;
}
default:
break;
}
return CSquadMonster :: GetSchedule();

7
dlls/ichthyosaur.cpp

@ -534,11 +534,11 @@ Schedule_t* CIchthyosaur::GetSchedule() @@ -534,11 +534,11 @@ Schedule_t* CIchthyosaur::GetSchedule()
case MONSTERSTATE_IDLE:
m_flightSpeed = 80;
return GetScheduleOfType( SCHED_IDLE_WALK );
break;
case MONSTERSTATE_ALERT:
m_flightSpeed = 150;
return GetScheduleOfType( SCHED_IDLE_WALK );
break;
case MONSTERSTATE_COMBAT:
m_flMaxSpeed = 400;
// eat them
@ -561,6 +561,9 @@ Schedule_t* CIchthyosaur::GetSchedule() @@ -561,6 +561,9 @@ Schedule_t* CIchthyosaur::GetSchedule()
}
return GetScheduleOfType( SCHED_STANDOFF );
break;
default:
break;
}
return CFlyingMonster :: GetSchedule();

4
dlls/islave.cpp

@ -668,7 +668,7 @@ Schedule_t *CISlave :: GetSchedule( void ) @@ -668,7 +668,7 @@ Schedule_t *CISlave :: GetSchedule( void )
switch (m_MonsterState)
{
case MONSTERSTATE_COMBAT:
// dead enemy
// dead enemy
if ( HasConditions( bits_COND_ENEMY_DEAD ) )
{
// call base class, all code to handle dead enemies is centralized there.
@ -692,6 +692,8 @@ Schedule_t *CISlave :: GetSchedule( void ) @@ -692,6 +692,8 @@ Schedule_t *CISlave :: GetSchedule( void )
}
}
break;
default:
break;
}
return CSquadMonster::GetSchedule( );
}

4
dlls/monsterstate.cpp

@ -50,6 +50,8 @@ void CBaseMonster :: SetState ( MONSTERSTATE State ) @@ -50,6 +50,8 @@ void CBaseMonster :: SetState ( MONSTERSTATE State )
ALERT ( at_aiconsole, "Stripped\n" );
}
break;
default:
break;
}
m_MonsterState = State;
@ -227,6 +229,8 @@ MONSTERSTATE CBaseMonster :: GetIdealState ( void ) @@ -227,6 +229,8 @@ MONSTERSTATE CBaseMonster :: GetIdealState ( void )
case MONSTERSTATE_DEAD:
m_IdealMonsterState = MONSTERSTATE_DEAD;
break;
default:
break;
}
return m_IdealMonsterState;

6
dlls/scientist.cpp

@ -617,6 +617,8 @@ void CScientist :: SetYawSpeed ( void ) @@ -617,6 +617,8 @@ void CScientist :: SetYawSpeed ( void )
case ACT_TURN_RIGHT:
ys = 120;
break;
default:
break;
}
pev->yaw_speed = ys;
@ -996,6 +998,8 @@ Schedule_t *CScientist :: GetSchedule ( void ) @@ -996,6 +998,8 @@ Schedule_t *CScientist :: GetSchedule ( void )
return slScientistCover; // Run & Cower
break;
default:
break;
}
return CTalkMonster::GetSchedule();
@ -1058,6 +1062,8 @@ MONSTERSTATE CScientist :: GetIdealState ( void ) @@ -1058,6 +1062,8 @@ MONSTERSTATE CScientist :: GetIdealState ( void )
}
}
break;
default:
break;
}
return CTalkMonster::GetIdealState();

2
dlls/squadmonster.cpp

@ -533,6 +533,8 @@ MONSTERSTATE CSquadMonster :: GetIdealState ( void ) @@ -533,6 +533,8 @@ MONSTERSTATE CSquadMonster :: GetIdealState ( void )
SquadMakeEnemy ( m_hEnemy );
}
break;
default:
break;
}
return CBaseMonster :: GetIdealState();

2
dlls/turret.cpp

@ -813,6 +813,8 @@ void CBaseTurret::SetTurretAnim(TURRET_ANIM anim) @@ -813,6 +813,8 @@ void CBaseTurret::SetTurretAnim(TURRET_ANIM anim)
case TURRET_ANIM_DIE:
pev->framerate = 1.0;
break;
default:
break;
}
//ALERT(at_console, "Turret anim #%d\n", anim);
}

2
dlls/util.cpp

@ -2111,6 +2111,8 @@ int CSave :: WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *p @@ -2111,6 +2111,8 @@ int CSave :: WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *p
case FIELD_EHANDLE:
entityArray[j] = EntityIndex( (CBaseEntity *)(((EHANDLE *)pOutputData)[j]) );
break;
default:
break;
}
}
WriteInt( pTest->fieldName, entityArray, pTest->fieldSize );

Loading…
Cancel
Save