mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:20:54 +01:00
21 lines
650 B
C++
21 lines
650 B
C++
|
|
#include <Structs/ActorData.h>
|
||
|
|
#include <TiltedCore/Serialization.hpp>
|
||
|
|
|
||
|
|
using TiltedPhoques::Serialization;
|
||
|
|
|
||
|
|
void ActorData::Serialize(TiltedPhoques::Buffer::Writer& aWriter) const noexcept
|
||
|
|
{
|
||
|
|
InitialActorValues.Serialize(aWriter);
|
||
|
|
InitialInventory.Serialize(aWriter);
|
||
|
|
Serialization::WriteBool(aWriter, IsDead);
|
||
|
|
Serialization::WriteBool(aWriter, IsWeaponDrawn);
|
||
|
|
}
|
||
|
|
|
||
|
|
void ActorData::Deserialize(TiltedPhoques::Buffer::Reader& aReader) noexcept
|
||
|
|
{
|
||
|
|
InitialActorValues.Deserialize(aReader);
|
||
|
|
InitialInventory.Deserialize(aReader);
|
||
|
|
IsDead = Serialization::ReadBool(aReader);
|
||
|
|
IsWeaponDrawn = Serialization::ReadBool(aReader);
|
||
|
|
}
|