| 200 | |
| 201 | #if SOURCE_ENGINE < SE_ORANGEBOX |
| 202 | static void ReplicateConVar(ConVar *pConVar) |
| 203 | { |
| 204 | int maxClients = g_Players.GetMaxClients(); |
| 205 | |
| 206 | char data[256]; |
| 207 | bf_write buffer(data, sizeof(data)); |
| 208 | |
| 209 | buffer.WriteUBitLong(NET_SETCONVAR, NETMSG_BITS); |
| 210 | buffer.WriteByte(1); |
| 211 | buffer.WriteString(pConVar->GetName()); |
| 212 | buffer.WriteString(pConVar->GetString()); |
| 213 | |
| 214 | for (int i = 1; i <= maxClients; i++) |
| 215 | { |
| 216 | CPlayer *pPlayer = g_Players.GetPlayerByIndex(i); |
| 217 | |
| 218 | if (pPlayer && pPlayer->IsInGame() && !pPlayer->IsFakeClient()) |
| 219 | { |
| 220 | if (INetChannel *netchan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(i))) |
| 221 | netchan->SendData(buffer); |
| 222 | } |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | static void NotifyConVar(ConVar *pConVar) |
| 227 | { |
no test coverage detected