mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:20:54 +01:00
17 lines
555 B
C++
17 lines
555 B
C++
|
|
#include <Messages/NotifyPlayerHealthUpdate.h>
|
||
|
|
#include <TiltedCore/Serialization.hpp>
|
||
|
|
|
||
|
|
void NotifyPlayerHealthUpdate::SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept
|
||
|
|
{
|
||
|
|
Serialization::WriteVarInt(aWriter, PlayerId);
|
||
|
|
Serialization::WriteFloat(aWriter, Percentage);
|
||
|
|
}
|
||
|
|
|
||
|
|
void NotifyPlayerHealthUpdate::DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept
|
||
|
|
{
|
||
|
|
ServerMessage::DeserializeRaw(aReader);
|
||
|
|
|
||
|
|
PlayerId = Serialization::ReadVarInt(aReader) & 0xFFFFFFFF;
|
||
|
|
Percentage = Serialization::ReadFloat(aReader);
|
||
|
|
}
|