mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Global KI message = ccr2allplayers
This commit is contained in:
@ -160,7 +160,7 @@ class pfKIMsg : public plMessage
|
|||||||
{
|
{
|
||||||
kPrivateMsg = 0x00000001,
|
kPrivateMsg = 0x00000001,
|
||||||
kAdminMsg = 0x00000002,
|
kAdminMsg = 0x00000002,
|
||||||
kDead = 0x00000004,
|
kGlobalMsg = 0x00000004,
|
||||||
kInterAgeMsg = 0x00000008,
|
kInterAgeMsg = 0x00000008,
|
||||||
kStatusMsg = 0x00000010,
|
kStatusMsg = 0x00000010,
|
||||||
kNeighborMsg = 0x00000020, // sending to all the neighbors
|
kNeighborMsg = 0x00000020, // sending to all the neighbors
|
||||||
|
@ -1122,11 +1122,14 @@ uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolis
|
|||||||
|
|
||||||
if (tolist.size() > 0)
|
if (tolist.size() > 0)
|
||||||
{
|
{
|
||||||
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
|
// this goes to everybody on the shard
|
||||||
|
if (flags & pfKIMsg::kGlobalMsg)
|
||||||
|
msg->SetAllBCastFlags(plMessage::kCCRSendToAllPlayers);
|
||||||
|
#endif
|
||||||
|
// allow inter-age routing of this msg
|
||||||
if (flags & pfKIMsg::kInterAgeMsg)
|
if (flags & pfKIMsg::kInterAgeMsg)
|
||||||
{
|
|
||||||
// allow inter-age routing of this msg
|
|
||||||
msg->SetBCastFlag( plMessage::kNetAllowInterAge );
|
msg->SetBCastFlag( plMessage::kNetAllowInterAge );
|
||||||
}
|
|
||||||
// add net rcvrs to msg
|
// add net rcvrs to msg
|
||||||
int i;
|
int i;
|
||||||
for ( i=0 ; i<tolist.size() ; i++ )
|
for ( i=0 ; i<tolist.size() ; i++ )
|
||||||
@ -1156,11 +1159,14 @@ uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolis
|
|||||||
|
|
||||||
if (tolist.size() > 0)
|
if (tolist.size() > 0)
|
||||||
{
|
{
|
||||||
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
|
// this goes to everybody on the shard
|
||||||
|
if (flags & pfKIMsg::kGlobalMsg)
|
||||||
|
msg->SetAllBCastFlags(plMessage::kCCRSendToAllPlayers);
|
||||||
|
#endif
|
||||||
|
// allow inter-age routing of this msg
|
||||||
if (flags & pfKIMsg::kInterAgeMsg)
|
if (flags & pfKIMsg::kInterAgeMsg)
|
||||||
{
|
|
||||||
// allow inter-age routing of this msg
|
|
||||||
msg->SetBCastFlag( plMessage::kNetAllowInterAge );
|
msg->SetBCastFlag( plMessage::kNetAllowInterAge );
|
||||||
}
|
|
||||||
// add net rcvrs to msg
|
// add net rcvrs to msg
|
||||||
for ( int i = 0 ; i < tolist.size() ; i++ )
|
for ( int i = 0 ; i < tolist.size() ; i++ )
|
||||||
{
|
{
|
||||||
|
@ -359,12 +359,9 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg)
|
|||||||
//
|
//
|
||||||
bool ccrSendToAllPlayers = false;
|
bool ccrSendToAllPlayers = false;
|
||||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
if ( AmCCR() )
|
ccrSendToAllPlayers = msg->HasBCastFlag( plMessage::kCCRSendToAllPlayers );
|
||||||
{
|
if ( ccrSendToAllPlayers )
|
||||||
ccrSendToAllPlayers = msg->HasBCastFlag( plMessage::kCCRSendToAllPlayers );
|
netMsgWrap->SetBit( plNetMessage::kRouteToAllPlayers );
|
||||||
if ( ccrSendToAllPlayers )
|
|
||||||
netMsgWrap->SetBit( plNetMessage::kRouteToAllPlayers );
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -382,13 +379,13 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg)
|
|||||||
if (msg->HasBCastFlag(plMessage::kNetSendUnreliable) &&
|
if (msg->HasBCastFlag(plMessage::kNetSendUnreliable) &&
|
||||||
!(synchedObj && (synchedObj->GetSynchFlags() & plSynchedObject::kSendReliably)) )
|
!(synchedObj && (synchedObj->GetSynchFlags() & plSynchedObject::kSendReliably)) )
|
||||||
netMsgWrap->SetBit(plNetMessage::kNeedsReliableSend, 0); // clear reliable net send bit
|
netMsgWrap->SetBit(plNetMessage::kNeedsReliableSend, 0); // clear reliable net send bit
|
||||||
|
|
||||||
#ifdef HS_DEBUGGING
|
#ifdef HS_DEBUGGING
|
||||||
int16_t type=*(int16_t*)netMsgWrap->StreamInfo()->GetStreamBuf();
|
int16_t type=*(int16_t*)netMsgWrap->StreamInfo()->GetStreamBuf();
|
||||||
hsAssert(type>=0 && type<plCreatableIndex::plNumClassIndices, "garbage type out");
|
hsAssert(type>=0 && type<plCreatableIndex::plNumClassIndices, "garbage type out");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
netMsgWrap->SetPlayerID(GetPlayerID());
|
netMsgWrap->SetPlayerID(GetPlayerID());
|
||||||
netMsgWrap->SetNetProtocol(kNetProtocolCli2Game);
|
netMsgWrap->SetNetProtocol(kNetProtocolCli2Game);
|
||||||
int ret = SendMsg(netMsgWrap);
|
int ret = SendMsg(netMsgWrap);
|
||||||
|
|
||||||
@ -403,7 +400,7 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
delete netMsgWrap;
|
delete netMsgWrap;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user