本文整理汇总了C++中LLMessageSystem::addU16Fast方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMessageSystem::addU16Fast方法的具体用法?C++ LLMessageSystem::addU16Fast怎么用?C++ LLMessageSystem::addU16Fast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMessageSystem
的用法示例。
在下文中一共展示了LLMessageSystem::addU16Fast方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendMapBlockRequest
// public
void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent, S32 layer)
{
//LL_INFOS("World Map") << "LLWorldMap::sendMapBlockRequest()" << ", min = (" << min_x << ", " << min_y << "), max = (" << max_x << ", " << max_y << "), nonexistent = " << return_nonexistent << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MapBlockRequest);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
U32 flags = layer;
flags |= (return_nonexistent ? 0x10000 : 0);
msg->addU32Fast(_PREHASH_Flags, flags);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim
msg->nextBlockFast(_PREHASH_PositionData);
msg->addU16Fast(_PREHASH_MinX, min_x);
msg->addU16Fast(_PREHASH_MinY, min_y);
msg->addU16Fast(_PREHASH_MaxX, max_x);
msg->addU16Fast(_PREHASH_MaxY, max_y);
gAgent.sendReliableMessage();
}
示例2: sendMapBlockRequest
// public
void LLWorldMap::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent)
{
S32 layer = mCurrentMap;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MapBlockRequest);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
U32 flags = layer;
flags |= (return_nonexistent ? 0x10000 : 0);
msg->addU32Fast(_PREHASH_Flags, flags);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim
msg->nextBlockFast(_PREHASH_PositionData);
msg->addU16Fast(_PREHASH_MinX, min_x);
msg->addU16Fast(_PREHASH_MinY, min_y);
msg->addU16Fast(_PREHASH_MaxX, max_x);
msg->addU16Fast(_PREHASH_MaxY, max_y);
gAgent.sendReliableMessage();
if (mRequestLandForSale)
{
msg->newMessageFast(_PREHASH_MapBlockRequest);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addU32Fast(_PREHASH_Flags, 2);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim
msg->nextBlockFast(_PREHASH_PositionData);
msg->addU16Fast(_PREHASH_MinX, min_x);
msg->addU16Fast(_PREHASH_MinY, min_y);
msg->addU16Fast(_PREHASH_MaxX, max_x);
msg->addU16Fast(_PREHASH_MaxY, max_y);
gAgent.sendReliableMessage();
}
}
示例3: send_extras
void ImportTracker::send_extras(LLSD& prim)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectExtraParams);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
LLPrimitive obj;
if (prim.has("flexible"))
{
LLFlexibleObjectData flexi;
flexi.fromLLSD(prim["flexible"]);
U8 tmp[MAX_OBJECT_PARAMS_SIZE];
LLDataPackerBinaryBuffer dpb(tmp, MAX_OBJECT_PARAMS_SIZE);
if (flexi.pack(dpb))
{
U32 datasize = (U32)dpb.getCurrentSize();
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger());
msg->addU16Fast(_PREHASH_ParamType, 0x10);
msg->addBOOLFast(_PREHASH_ParamInUse, true);
msg->addU32Fast(_PREHASH_ParamSize, datasize);
msg->addBinaryDataFast(_PREHASH_ParamData, tmp, datasize);
}
}
if (prim.has("light"))
{
LLLightParams light;
light.fromLLSD(prim["light"]);
U8 tmp[MAX_OBJECT_PARAMS_SIZE];
LLDataPackerBinaryBuffer dpb(tmp, MAX_OBJECT_PARAMS_SIZE);
if (light.pack(dpb))
{
U32 datasize = (U32)dpb.getCurrentSize();
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger());
msg->addU16Fast(_PREHASH_ParamType, 0x20);
msg->addBOOLFast(_PREHASH_ParamInUse, true);
msg->addU32Fast(_PREHASH_ParamSize, datasize);
msg->addBinaryDataFast(_PREHASH_ParamData, tmp, datasize);
}
}
if (prim.has("sculpt"))
{
LLSculptParams sculpt;
sculpt.fromLLSD(prim["sculpt"]);
U8 tmp[MAX_OBJECT_PARAMS_SIZE];
LLDataPackerBinaryBuffer dpb(tmp, MAX_OBJECT_PARAMS_SIZE);
if (sculpt.pack(dpb))
{
U32 datasize = (U32)dpb.getCurrentSize();
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger());
msg->addU16Fast(_PREHASH_ParamType, 0x30);
msg->addBOOLFast(_PREHASH_ParamInUse, true);
msg->addU32Fast(_PREHASH_ParamSize, datasize);
msg->addBinaryDataFast(_PREHASH_ParamData, tmp, datasize);
}
}
msg->sendReliable(gAgent.getRegion()->getHost());
}