mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Reworked Character snap
Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
parent
badfdcb968
commit
dd500710b5
|
@ -1311,9 +1311,23 @@ void CCharacter::Snap(int SnappingClient)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CCharacter* SnapChar = GameServer()->GetPlayerChar(SnappingClient);
|
CCharacter* SnapChar = GameServer()->GetPlayerChar(SnappingClient);
|
||||||
if(!SnapChar
|
if
|
||||||
|| (!SnapChar->GetPlayer()->m_ShowOthers && SnapChar->Team() != Team() && Team() != TEAM_SUPER)
|
(
|
||||||
|| (GetPlayer()->m_Invisible && GetPlayer()->GetCID() != SnappingClient)) return;
|
SnapChar &&
|
||||||
|
!SnapChar->m_Super &&
|
||||||
|
(
|
||||||
|
!SnapChar->GetPlayer()->m_ShowOthers &&
|
||||||
|
GameServer()->m_apPlayers[SnappingClient]->GetTeam() != -1 &&
|
||||||
|
SnapChar->Team() != Team() &&
|
||||||
|
Team() != TEAM_SUPER
|
||||||
|
) ||
|
||||||
|
(
|
||||||
|
GetPlayer()->m_Invisible &&
|
||||||
|
GetPlayer()->GetCID() != SnappingClient &&
|
||||||
|
GameServer()->m_apPlayers[SnappingClient]->m_Authed < GetPlayer()->m_Authed
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return;
|
||||||
CNetObj_Character *Character = static_cast<CNetObj_Character *>(Server()->SnapNewItem(NETOBJTYPE_CHARACTER, m_pPlayer->GetCID(), sizeof(CNetObj_Character)));
|
CNetObj_Character *Character = static_cast<CNetObj_Character *>(Server()->SnapNewItem(NETOBJTYPE_CHARACTER, m_pPlayer->GetCID(), sizeof(CNetObj_Character)));
|
||||||
|
|
||||||
// write down the m_Core
|
// write down the m_Core
|
||||||
|
|
Loading…
Reference in a new issue