mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
fixed free-view
This commit is contained in:
parent
12307ae6b0
commit
556481078c
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue