//------------------------------------------------------------------------ bool CServerSynchedStorage::OnSetChannelMsgComplete(CClientSynchedStorage::CSetChannelMsg *pMsg, int channelId, uint32 fromSeq, bool ack) { CryAutoCriticalSection lock(m_mutex); if(ack) return true; else { // got a nack, so reque AddToChannelQueue(channelId, pMsg->key); return true; } }
//------------------------------------------------------------------------ void CServerSynchedStorage::FullSynch(int channelId, bool reset) { if (reset) ResetChannel(channelId); for (TStorage::iterator it=m_channelStorage.begin(); it!=m_channelStorage.end();++it) AddToChannelQueue(channelId, it->first); for (TStorage::iterator it=m_globalStorage.begin(); it!=m_globalStorage.end();++it) AddToGlobalQueueFor(channelId, it->first); for (TEntityStorageMap::const_iterator eit=m_entityStorage.begin(); eit!=m_entityStorage.end();++eit) { const TStorage &storage=eit->second; for (TStorage::const_iterator it=storage.begin();it!=storage.end();++it) AddToEntityQueueFor(channelId, eit->first, it->first); } }
//------------------------------------------------------------------------ void CServerSynchedStorage::OnChannelChanged(int channelId, TSynchedKey key, const TSynchedValue &value) { AddToChannelQueue(channelId, key); }