mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-05 07:02:13 +00:00
pet bouncers now bounce player upon pressing shift
This commit is contained in:
@@ -3589,6 +3589,35 @@ void GameMessages::SendBouncerActiveStatus(LWOOBJID objectId, bool bActive, cons
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendRequestClientBounce(const LWOOBJID& objectId, const LWOOBJID& bounceTargetId, const NiPoint3& bounceTargetPos, const NiPoint3& bouncedObjLinVel, const LWOOBJID& requestSourceId, const bool bAllBounced, const bool bAllowClientOverload, const SystemAddress& sysAddr) {
|
||||
LOG_DEBUG("REQUEST CLIENT BOUNCE!");
|
||||
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectId);
|
||||
LOG_DEBUG("Object id: %llu", objectId);
|
||||
bitStream.Write(eGameMessageType::REQUEST_CLIENT_BOUNCE);
|
||||
|
||||
bitStream.Write(bounceTargetId);
|
||||
LOG_DEBUG("Bounce target id: %llu", bounceTargetId);
|
||||
bitStream.Write(bounceTargetPos.x);
|
||||
bitStream.Write(bounceTargetPos.y);
|
||||
bitStream.Write(bounceTargetPos.z);
|
||||
LOG_DEBUG("Bounce target pos on server: %f %f %f", bounceTargetPos.x, bounceTargetPos.y, bounceTargetPos.z);
|
||||
bitStream.Write(bouncedObjLinVel.x);
|
||||
bitStream.Write(bouncedObjLinVel.y);
|
||||
bitStream.Write(bouncedObjLinVel.z);
|
||||
LOG_DEBUG("Bounced object linear velocity: %f %f %f", bouncedObjLinVel.x, bouncedObjLinVel.y, bouncedObjLinVel.z);
|
||||
bitStream.Write(requestSourceId);
|
||||
LOG_DEBUG("Request source id: %llu", requestSourceId);
|
||||
|
||||
bitStream.Write(bAllBounced);
|
||||
bitStream.Write(bAllowClientOverload);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendSetPetName(LWOOBJID objectId, std::u16string name, LWOOBJID petDBID, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM;
|
||||
|
||||
Reference in New Issue
Block a user