Added Alive Check

This commit is contained in:
GreYFoXGTi 2010-11-14 12:08:21 +02:00
parent 3c1c045722
commit 4486a7abed
7 changed files with 8 additions and 8 deletions

View file

@ -66,8 +66,8 @@ void CDoor::Snap(int SnappingClient)
CCharacter * Char = GameServer()->GetPlayerChar(SnappingClient);
int Tick = (Server()->Tick()%Server()->TickSpeed())%11;
if (Char && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (!Tick)) return;
if(Char == 0) return;
if(Char->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (!Tick)) return;
if(Char->Team() == TEAM_SUPER)
{

View file

@ -124,7 +124,7 @@ void CDragger::Snap(int SnappingClient)
CCharacter * Char = GameServer()->GetPlayerChar(SnappingClient);
int Tick = (Server()->Tick()%Server()->TickSpeed())%11;
if (Char && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (!Tick)) return;
if (Char && Char->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (!Tick)) return;
if(Char && m_Target && Char->Team() != m_Target->Team()) return;
CNetObj_Laser *obj = static_cast<CNetObj_Laser *>(Server()->SnapNewItem(NETOBJTYPE_LASER, m_Id, sizeof(CNetObj_Laser)));

View file

@ -95,7 +95,7 @@ void CGun::Snap(int SnappingClient)
CCharacter * SnapChar = GameServer()->GetPlayerChar(SnappingClient);
int Tick = (Server()->Tick()%Server()->TickSpeed())%11;
if (SnapChar && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()] && (!Tick)) return;
if (SnapChar && SnapChar->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->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;

View file

@ -113,8 +113,8 @@ void CLight::Snap(int SnappingClient)
CCharacter * Char = GameServer()->GetPlayerChar(SnappingClient);
int Tick = (Server()->Tick()%Server()->TickSpeed())%6;
if (Char && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (Tick)) return;
if(Char == 0) return;
if(!Char) return;
if (Char->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[Char->Team()] && (Tick)) return;
if(Char->Team() == TEAM_SUPER)
{

View file

@ -155,7 +155,7 @@ void CPickup::Snap(int SnappingClient)
*/
CCharacter * SnapChar = GameServer()->GetPlayerChar(SnappingClient);
int Tick = (Server()->Tick()%Server()->TickSpeed())%11;
if (SnapChar && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()] && (!Tick)) return;
if (SnapChar && SnapChar->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()] && (!Tick)) return;
CNetObj_Pickup *pP = static_cast<CNetObj_Pickup *>(Server()->SnapNewItem(NETOBJTYPE_PICKUP, m_Id, sizeof(CNetObj_Pickup)));
pP->m_X = (int)m_Pos.x;
pP->m_Y = (int)m_Pos.y;

View file

@ -81,7 +81,7 @@ void CPlasma::Snap(int SnappingClient)
CCharacter* SnapChar = GameServer()->GetPlayerChar(SnappingClient);
int Tick = (Server()->Tick()%Server()->TickSpeed())%11;
if(!SnapChar) return;
if (!GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()] && (!Tick)) return;
if (SnapChar->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()] && (!Tick)) return;
if((SnapChar->Team() != m_ResponsibleTeam) && !SnapChar->GetPlayer()->m_IsUsingDDRaceClient) return;
CNetObj_Laser *pObj = static_cast<CNetObj_Laser *>(Server()->SnapNewItem(NETOBJTYPE_LASER, m_Id, sizeof(CNetObj_Laser)));
pObj->m_X = (int)m_Pos.x;

View file

@ -172,7 +172,7 @@ void CProjectile::Snap(int SnappingClient)
return;
CCharacter * SnapChar = GameServer()->GetPlayerChar(SnappingClient);
int Tick = (Server()->Tick()%Server()->TickSpeed())%6;
if (SnapChar && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()] && (Tick)) return;
if (SnapChar && SnapChar->m_Alive && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()] && (Tick)) return;
if
(