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

Loading…
Cancel
Save