mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-24 05:53:51 +00:00
8db396d10a
Adjust ClientScriptLocal so it refers to its previously handled integers as shorts.
22 lines
849 B
C++
22 lines
849 B
C++
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include "PacketClientScriptLocal.hpp"
|
|
|
|
using namespace mwmp;
|
|
|
|
PacketClientScriptLocal::PacketClientScriptLocal(RakNet::RakPeerInterface *peer) : ObjectPacket(peer)
|
|
{
|
|
packetID = ID_CLIENT_SCRIPT_LOCAL;
|
|
hasCellData = true;
|
|
}
|
|
|
|
void PacketClientScriptLocal::Object(BaseObject &baseObject, bool send)
|
|
{
|
|
ObjectPacket::Object(baseObject, send);
|
|
RW(baseObject.clientVariable.index, send);
|
|
RW(baseObject.clientVariable.variableType, send);
|
|
|
|
if (baseObject.clientVariable.variableType == mwmp::VARIABLE_TYPE::SHORT || baseObject.clientVariable.variableType == mwmp::VARIABLE_TYPE::LONG)
|
|
RW(baseObject.clientVariable.intValue, send);
|
|
else if (baseObject.clientVariable.variableType == mwmp::VARIABLE_TYPE::FLOAT)
|
|
RW(baseObject.clientVariable.floatValue, send);
|
|
}
|