|
|
@ -221,7 +221,7 @@ void UTIL_BecomeSpectator( CBasePlayer *pPlayer ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//pPlayer->m_bDoneFirstSpawn = true;
|
|
|
|
//pPlayer->m_bDoneFirstSpawn = true;
|
|
|
|
pPlayer->pev->takedamage = DAMAGE_NO; |
|
|
|
pPlayer->pev->takedamage = DAMAGE_NO; |
|
|
|
pPlayer->pev->flags |= FL_SPECTATOR; |
|
|
|
//pPlayer->pev->flags |= FL_SPECTATOR;
|
|
|
|
pPlayer->pev->flags |= FL_NOTARGET; |
|
|
|
pPlayer->pev->flags |= FL_NOTARGET; |
|
|
|
pPlayer->pev->effects |= EF_NODRAW; |
|
|
|
pPlayer->pev->effects |= EF_NODRAW; |
|
|
|
pPlayer->pev->solid = SOLID_NOT; |
|
|
|
pPlayer->pev->solid = SOLID_NOT; |
|
|
@ -229,11 +229,15 @@ void UTIL_BecomeSpectator( CBasePlayer *pPlayer ) |
|
|
|
pPlayer->pev->modelindex = 0; |
|
|
|
pPlayer->pev->modelindex = 0; |
|
|
|
pPlayer->pev->health = 1; |
|
|
|
pPlayer->pev->health = 1; |
|
|
|
pPlayer->m_pGoalEnt = NULL; |
|
|
|
pPlayer->m_pGoalEnt = NULL; |
|
|
|
|
|
|
|
//pPlayer->StopObserver();
|
|
|
|
|
|
|
|
//while( !pPlayer->IsObserver() )
|
|
|
|
|
|
|
|
//pPlayer->StartObserver(pPlayer->pev->origin, pPlayer->pev->angles);
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UTIL_SpawnPlayer( CBasePlayer *pPlayer ) |
|
|
|
void UTIL_SpawnPlayer( CBasePlayer *pPlayer ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
//pPlayer->StopObserver();
|
|
|
|
pPlayer->gravgunmod_data.m_state = STATE_SPAWNED; |
|
|
|
pPlayer->gravgunmod_data.m_state = STATE_SPAWNED; |
|
|
|
pPlayer->m_iRespawnFrames = 0; |
|
|
|
pPlayer->m_iRespawnFrames = 0; |
|
|
|
pPlayer->pev->effects &= ~EF_NODRAW; |
|
|
|
pPlayer->pev->effects &= ~EF_NODRAW; |
|
|
@ -242,7 +246,7 @@ void UTIL_SpawnPlayer( CBasePlayer *pPlayer ) |
|
|
|
pPlayer->pev->flags &= ~FL_SPECTATOR; |
|
|
|
pPlayer->pev->flags &= ~FL_SPECTATOR; |
|
|
|
pPlayer->pev->movetype = MOVETYPE_WALK; |
|
|
|
pPlayer->pev->movetype = MOVETYPE_WALK; |
|
|
|
pPlayer->Spawn(); |
|
|
|
pPlayer->Spawn(); |
|
|
|
|
|
|
|
//pPlayer->StopObserver();
|
|
|
|
if( mp_coop.value ) |
|
|
|
if( mp_coop.value ) |
|
|
|
CLIENT_COMMAND( pPlayer->edict(), "touch_show _coopm*\n" ); |
|
|
|
CLIENT_COMMAND( pPlayer->edict(), "touch_show _coopm*\n" ); |
|
|
|
|
|
|
|
|
|
|
|