diff --git a/src/engine/shared/snapshot.cpp b/src/engine/shared/snapshot.cpp index 839f2eee5..dd96310e8 100644 --- a/src/engine/shared/snapshot.cpp +++ b/src/engine/shared/snapshot.cpp @@ -562,6 +562,7 @@ int *CSnapshotBuilder::GetItemData(int Key) int CSnapshotBuilder::Finish(void *SpnapData) { + //dbg_msg("snap", "---------------------------"); // flattern and make the snapshot CSnapshot *pSnap = (CSnapshot *)SpnapData; int OffsetSize = sizeof(int)*m_NumItems; @@ -628,14 +629,18 @@ void *CSnapshotBuilder::NewItem(int Type, int ID, int Size) if(m_Sixup) { + //dbg_msg("snap", "intype=%d", Type); if(Type >= 0) Type = Obj_SixToSeven(Type); else Type *= -1; + //dbg_msg("snap", "outtype=%d", Type); if(Type < 0) return pObj; } + //dbg_msg("snap", "adding type='%d' id='%d' size='%d'", Type, ID, Size); + mem_zero(pObj, sizeof(CSnapshotItem) + Size); pObj->m_TypeAndID = (Type<<16)|ID; m_aOffsets[m_NumItems] = m_DataSize; diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index df008db5c..c04414527 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -1366,7 +1366,7 @@ void CGameClient::OnNewSnapshot() if(m_Snap.m_LocalClientID >= 0) { m_LocalIDs[g_Config.m_ClDummy] = m_Snap.m_LocalClientID; - + CSnapState::CCharacterInfo *c = &m_Snap.m_aCharacters[m_Snap.m_LocalClientID]; if(c->m_Active) { diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 775132301..d83249f61 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1223,6 +1223,19 @@ void CGameContext::OnClientConnected(int ClientID) Msg.m_pMessage = g_Config.m_SvMotd; Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, ClientID); + //send sixup settings + if(Server()->IsSixup(ClientID)) + { + protocol7::CNetMsg_Sv_ServerSettings Msg; + Msg.m_KickVote = g_Config.m_SvVoteKick; + Msg.m_KickMin = g_Config.m_SvVoteKickMin; + Msg.m_SpecVote = g_Config.m_SvVoteSpectate; + Msg.m_TeamLock = 0; + Msg.m_TeamBalance = 0; + Msg.m_PlayerSlots = g_Config.m_SvMaxClients - g_Config.m_SvSpectatorSlots; + Server()->SendPackMsg(&Msg, MSGFLAG_VITAL|MSGFLAG_NORECORD, ClientID); + } + Server()->ExpireServerInfo(); } @@ -1396,6 +1409,13 @@ void *CGameContext::PreProcessMsg(int *MsgID, CUnpacker *pUnpacker, int ClientID else pMsg->m_SpectatorID = SPEC_FREEVIEW; // Probably not needed } + else if(*MsgID == protocol7::NETMSGTYPE_CL_SETTEAM) + { + protocol7::CNetMsg_Cl_SetTeam *pMsg7 = (protocol7::CNetMsg_Cl_SetTeam *)pRawMsg; + ::CNetMsg_Cl_SetTeam *pMsg = (::CNetMsg_Cl_SetTeam *)s_aRawMsg; + + pMsg->m_Team = pMsg7->m_Team; + } *MsgID = Msg_SevenToSix(*MsgID);