pet bouncers now bounce player upon pressing shift

This commit is contained in:
jadebenn
2023-12-28 17:49:37 -06:00
parent a4f0602218
commit 5f8f200bfc
4 changed files with 70 additions and 13 deletions

View File

@@ -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;