MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / SendRequestScriptHash

Method SendRequestScriptHash

CryGame/XServer.cpp:1142–1158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140}
1141
1142void CXServer::SendRequestScriptHash( EntityId Entity, const char *szPath, const char *szKey )
1143{
1144 CStream stm;
1145
1146 IBitStream *pBitStream = m_pGame->GetIBitStream();
1147
1148 uint32 dwServerStartHash=0; // todo change
1149
1150 pBitStream->WriteBitStream(stm,Entity,eEntityId); // e.g. INVALID_WID for globals, otherwise it's and entity
1151 pBitStream->WriteBitStream(stm,szPath,255,eASCIIText); // e.g. "cnt.myTable"
1152 pBitStream->WriteBitStream(stm,szKey,255,eASCIIText); // e.g. "luaFunc1" or ""
1153 pBitStream->WriteBitStream(stm,dwServerStartHash,eDoNotCompress); // start hash
1154
1155 BroadcastReliable(XSERVERMSG_REQUESTSCRIPTHASH,stm,true); // send in secondary channel to prevent stall
1156
1157 m_pGame->m_pLog->Log("RequestScriptHash '%s' '%s'",szPath,szKey);
1158}
1159
1160void CXServer::SetTeamScore(const char *sTeam,int score)
1161{

Callers

nothing calls this directly

Calls 3

GetIBitStreamMethod · 0.80
WriteBitStreamMethod · 0.45
LogMethod · 0.45

Tested by

no test coverage detected