[General] Fix packet validation for ActorPackets sent by server scripts

This allows Lua scripts to send actor data again, which hadn't been possible anymore after 2ed1bfe
pull/249/merge
David Cernat 8 years ago
parent abaa26e32a
commit a84cf7c191

@ -62,9 +62,12 @@ bool ActorPacket::PacketHeader(RakNet::BitStream *bs, bool send)
RW(actorList->count, send); RW(actorList->count, send);
if (actorList->count > maxActors) if (actorList->count > maxActors)
{
actorList->isValid = false; actorList->isValid = false;
return false;
}
return actorList->isValid; return true;
} }

@ -66,6 +66,7 @@ bool WorldPacket::PacketHeader(RakNet::BitStream *bs, bool send)
RW(event->cell.mData, send, 1); RW(event->cell.mData, send, 1);
RW(event->cell.mName, send, 1); RW(event->cell.mName, send, 1);
} }
return true; return true;
} }

Loading…
Cancel
Save