Browse Source

Global KI message = ccr2allplayers

Adam Johnson 12 years ago
parent
commit
f8dab46a03
  1. 2
      Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.h
  2. 18
      Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp
  3. 3
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp

2
Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.h

@ -160,7 +160,7 @@ class pfKIMsg : public plMessage
{
kPrivateMsg = 0x00000001,
kAdminMsg = 0x00000002,
kDead = 0x00000004,
kGlobalMsg = 0x00000004,
kInterAgeMsg = 0x00000008,
kStatusMsg = 0x00000010,
kNeighborMsg = 0x00000020, // sending to all the neighbors

18
Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp

@ -1122,11 +1122,14 @@ uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolis
if (tolist.size() > 0)
{
if (flags & pfKIMsg::kInterAgeMsg)
{
#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)
msg->SetBCastFlag( plMessage::kNetAllowInterAge );
}
// add net rcvrs to msg
int 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 (flags & pfKIMsg::kInterAgeMsg)
{
#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)
msg->SetBCastFlag( plMessage::kNetAllowInterAge );
}
// add net rcvrs to msg
for ( int i = 0 ; i < tolist.size() ; i++ )
{

3
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp

@ -359,12 +359,9 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg)
//
bool ccrSendToAllPlayers = false;
#ifndef PLASMA_EXTERNAL_RELEASE
if ( AmCCR() )
{
ccrSendToAllPlayers = msg->HasBCastFlag( plMessage::kCCRSendToAllPlayers );
if ( ccrSendToAllPlayers )
netMsgWrap->SetBit( plNetMessage::kRouteToAllPlayers );
}
#endif
//

Loading…
Cancel
Save