fixed free-view

This commit is contained in:
oy 2018-11-22 18:37:49 +01:00
parent 12307ae6b0
commit 556481078c
3 changed files with 5 additions and 4 deletions

View file

@ -41,7 +41,8 @@ void CCamera::OnRender()
m_Zoom = 1.0f;
// update camera center
if(m_pClient->m_Snap.m_SpecInfo.m_Active && !m_pClient->m_Snap.m_SpecInfo.m_UsePosition && m_pClient->m_Snap.m_pLocalInfo && !(m_pClient->m_Snap.m_pLocalInfo->m_PlayerFlags&PLAYERFLAG_DEAD))
if(m_pClient->m_Snap.m_SpecInfo.m_Active && !m_pClient->m_Snap.m_SpecInfo.m_UsePosition &&
(m_pClient->m_Snap.m_SpecInfo.m_SpecMode == SPEC_FREEVIEW || (m_pClient->m_Snap.m_pLocalInfo && !(m_pClient->m_Snap.m_pLocalInfo->m_PlayerFlags&PLAYERFLAG_DEAD))))
{
if(m_CamType != CAMTYPE_SPEC)
{

View file

@ -405,8 +405,8 @@ void CGameClient::UpdatePositions()
m_LocalCharacterPos = m_Snap.m_SpecInfo.m_Position;
m_Snap.m_SpecInfo.m_UsePosition = true;
}
else if(m_Snap.m_pSpectatorInfo && ((Client()->State() == IClient::STATE_DEMOPLAYBACK || m_Snap.m_SpecInfo.m_SpecMode != SPEC_FREEVIEW) ||
(m_Snap.m_pLocalInfo && (m_Snap.m_pLocalInfo->m_PlayerFlags&PLAYERFLAG_DEAD))))
else if(m_Snap.m_pSpectatorInfo && (Client()->State() == IClient::STATE_DEMOPLAYBACK || (m_Snap.m_SpecInfo.m_SpecMode != SPEC_FREEVIEW &&
m_Snap.m_pLocalInfo && (m_Snap.m_pLocalInfo->m_PlayerFlags&PLAYERFLAG_DEAD))))
{
if(m_Snap.m_pPrevSpectatorInfo)
m_Snap.m_SpecInfo.m_Position = mix(vec2(m_Snap.m_pPrevSpectatorInfo->m_X, m_Snap.m_pPrevSpectatorInfo->m_Y),

View file

@ -328,7 +328,7 @@ void CPlayer::KillCharacter(int Weapon)
void CPlayer::Respawn()
{
if(m_RespawnDisabled)
if(m_RespawnDisabled && m_Team != TEAM_SPECTATORS)
{
// enable spectate mode for dead players
m_DeadSpecMode = true;