fixed laser snapping

This commit is contained in:
GreYFoX 2011-04-19 15:15:21 +02:00
parent a76759eeb5
commit 2fff744724

View file

@ -145,9 +145,9 @@ void CLaser::Snap(int SnappingClient)
CCharacter * OwnerChar = 0;
if(m_Owner >= 0)
OwnerChar = GameServer()->GetPlayerChar(m_Owner);
if(!SnappingChar || !OwnerChar)
if(!OwnerChar)
return;
if(SnappingChar->IsAlive() && OwnerChar->IsAlive() && SnappingChar->Team() != OwnerChar->Team())
if(SnappingChar && !SnappingChar->CanCollide(m_Owner))
return;
CNetObj_Laser *pObj = static_cast<CNetObj_Laser *>(Server()->SnapNewItem(NETOBJTYPE_LASER, m_ID, sizeof(CNetObj_Laser)));
if(!pObj)