mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
CLight Flickering
This commit is contained in:
parent
f60817b5c0
commit
d49eb12120
|
@ -106,15 +106,17 @@ void CLight::Snap(int SnappingClient)
|
|||
if(NetworkClipped(SnappingClient,m_Pos) && NetworkClipped(SnappingClient,m_To))
|
||||
return;
|
||||
|
||||
CCharacter * Char = GameServer()->GetPlayerChar(SnappingClient);
|
||||
int Tick = (Server()->Tick()%Server()->TickSpeed())%6;
|
||||
if(!Char) return;
|
||||
if (Char->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (Tick)) return;
|
||||
|
||||
|
||||
CNetObj_Laser *pObj = static_cast<CNetObj_Laser *>(Server()->SnapNewItem(NETOBJTYPE_LASER, m_Id, sizeof(CNetObj_Laser)));
|
||||
pObj->m_X = (int)m_Pos.x;
|
||||
pObj->m_Y = (int)m_Pos.y;
|
||||
|
||||
CCharacter * Char = GameServer()->GetPlayerChar(SnappingClient);
|
||||
int Tick = (Server()->Tick()%Server()->TickSpeed())%6;
|
||||
if(!Char) return;
|
||||
if (Char->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (Tick)) return;
|
||||
|
||||
|
||||
if(Char->Team() == TEAM_SUPER)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue