Reworked Character snap

Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
GreYFoXGTi 2010-10-02 03:06:15 +02:00
parent badfdcb968
commit dd500710b5

View file

@ -1311,9 +1311,23 @@ void CCharacter::Snap(int SnappingClient)
return;
CCharacter* SnapChar = GameServer()->GetPlayerChar(SnappingClient);
if(!SnapChar
|| (!SnapChar->GetPlayer()->m_ShowOthers && SnapChar->Team() != Team() && Team() != TEAM_SUPER)
|| (GetPlayer()->m_Invisible && GetPlayer()->GetCID() != SnappingClient)) return;
if
(
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)));
// write down the m_Core