[General] Set new BaseActor booleans in corresponding packets

pull/249/merge
David Cernat 8 years ago
parent 730df061b3
commit 1a699329e5

@ -15,7 +15,8 @@ namespace mwmp
BaseActor() BaseActor()
{ {
hasPositionData = false;
hasStatsDynamicData = false;
} }
std::string refId; std::string refId;

@ -41,6 +41,8 @@ void PacketActorPosition::Packet(RakNet::BitStream *bs, bool send)
RW(actor.position, send); RW(actor.position, send);
RW(actor.direction, send); RW(actor.direction, send);
actor.hasPositionData = true;
if (!send) if (!send)
{ {
actorList->baseActors.push_back(actor); actorList->baseActors.push_back(actor);

@ -43,6 +43,8 @@ void PacketActorStatsDynamic::Packet(RakNet::BitStream *bs, bool send)
RW(actor.creatureStats.mDynamic[1], send); // magic RW(actor.creatureStats.mDynamic[1], send); // magic
RW(actor.creatureStats.mDynamic[2], send); // fatigue RW(actor.creatureStats.mDynamic[2], send); // fatigue
actor.hasStatsDynamicData = true;
if (!send) if (!send)
{ {
actorList->baseActors.push_back(actor); actorList->baseActors.push_back(actor);

Loading…
Cancel
Save