mirror of
https://github.com/fortressforever/fortressforever-2013.git
synced 2024-11-09 23:01:50 +00:00
Fixed some stuff for the background maps. The ff_sv_client and ff_sv_player code is a complete mess! If you use -allowdebug or -console in your startup line the background maps don't load, not sure where in the code this is set.
This commit is contained in:
parent
6f2933135b
commit
b2240d15dc
2 changed files with 21 additions and 12 deletions
|
@ -41,8 +41,14 @@ extern bool g_fGameOver;
|
|||
void FinishClientPutInServer( CFF_SV_Player *pPlayer )
|
||||
{
|
||||
pPlayer->InitialSpawn();
|
||||
pPlayer->Spawn();
|
||||
pPlayer->PickDefaultSpawnTeam();
|
||||
//pPlayer->Spawn(); // PickDefaultSpawnTeam() will call Spawn()
|
||||
|
||||
if( gpGlobals->eLoadType == MapLoad_Background )
|
||||
{
|
||||
pPlayer->m_Local.m_iHideHUD = HIDEHUD_ALL;
|
||||
return;
|
||||
}
|
||||
|
||||
char sName[128];
|
||||
Q_strncpy( sName, pPlayer->GetPlayerName(), sizeof( sName ) );
|
||||
|
|
|
@ -248,12 +248,16 @@ void CFF_SV_Player::GiveDefaultItems( void )
|
|||
|
||||
void CFF_SV_Player::PickDefaultSpawnTeam( void )
|
||||
{
|
||||
m_flNextModelChangeTime = 0.0f;
|
||||
m_flNextTeamChangeTime = 0.0f;
|
||||
|
||||
if ( GetTeamNumber() != FF_TEAM_UNASSIGNED )
|
||||
return;
|
||||
|
||||
// FF TODO: remove once team hud is in / or auto assign
|
||||
// temp hack assumes FF_TEAM_ONE is present
|
||||
ChangeTeam ( FF_TEAM_ONE );
|
||||
|
||||
if( gpGlobals->eLoadType == MapLoad_Background )
|
||||
ChangeTeam( FF_TEAM_UNASSIGNED );
|
||||
else
|
||||
ChangeTeam( FF_TEAM_UNASSIGNED );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -261,14 +265,9 @@ void CFF_SV_Player::PickDefaultSpawnTeam( void )
|
|||
//-----------------------------------------------------------------------------
|
||||
void CFF_SV_Player::Spawn(void)
|
||||
{
|
||||
m_flNextModelChangeTime = 0.0f;
|
||||
m_flNextTeamChangeTime = 0.0f;
|
||||
|
||||
PickDefaultSpawnTeam();
|
||||
|
||||
BaseClass::Spawn();
|
||||
|
||||
if ( !IsObserver() )
|
||||
if ( !IsObserver() && gpGlobals->eLoadType != MapLoad_Background )
|
||||
{
|
||||
pl.deadflag = false;
|
||||
RemoveSolidFlags( FSOLID_NOT_SOLID );
|
||||
|
@ -883,6 +882,10 @@ void CFF_SV_Player::ChangeTeam( int iTeam )
|
|||
{
|
||||
CommitSuicide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Spawn();
|
||||
}
|
||||
}
|
||||
|
||||
bool CFF_SV_Player::ClientCommand( const CCommand &args )
|
||||
|
@ -1510,7 +1513,7 @@ void CFF_SV_Player::PostChangeTeam( int iOldTeam, int iNewTeam )
|
|||
// reset state
|
||||
// spawn called
|
||||
|
||||
if ( iOldTeam == TEAM_SPECTATOR )
|
||||
if ( iOldTeam == FF_TEAM_SPECTATE )
|
||||
{
|
||||
StopObserverMode( );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue