Browse Source

Add some spectator checks

gravgun
mittorn 6 years ago
parent
commit
9237d014ef
  1. 8
      dlls/multiplay_gamerules.cpp

8
dlls/multiplay_gamerules.cpp

@ -645,6 +645,9 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer ) @@ -645,6 +645,9 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer )
return;
}
if( pPlayer->pev->flags & FL_SPECTATOR )
return;
if( !mp_coop_changelevel.value )
pPlayer->gravgunmod_data.m_state = STATE_SPAWNED;
@ -660,6 +663,9 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer ) @@ -660,6 +663,9 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer )
addDefault = FALSE;
}
if( pPlayer->gravgunmod_data.m_state = STATE_SPAWNED )
return;
if( addDefault )
{
pPlayer->GiveNamedItem( "weapon_crowbar" );
@ -677,7 +683,9 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer ) @@ -677,7 +683,9 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer )
}
if(mp_coop.value)
{
g_WeaponList.GiveToPlayer(pPlayer);
}
}
//=========================================================

Loading…
Cancel
Save