| 1240 | } |
| 1241 | |
| 1242 | void PlayerManager::OnClientCommandKeyValues_Post(edict_t *pEntity, KeyValues *pCommand) |
| 1243 | { |
| 1244 | if (!s_LastCCKVAllowed) |
| 1245 | { |
| 1246 | return; |
| 1247 | } |
| 1248 | |
| 1249 | int client = IndexOfEdict(pEntity); |
| 1250 | |
| 1251 | CPlayer *pPlayer = &m_Players[client]; |
| 1252 | |
| 1253 | if (!pPlayer->IsInGame()) |
| 1254 | { |
| 1255 | return; |
| 1256 | } |
| 1257 | |
| 1258 | KeyValueStack *pStk = new KeyValueStack; |
| 1259 | pStk->pBase = pCommand; |
| 1260 | pStk->pCurRoot.push(pStk->pBase); |
| 1261 | pStk->m_bDeleteOnDestroy = false; |
| 1262 | |
| 1263 | Handle_t hndl = handlesys->CreateHandle(g_KeyValueType, pStk, g_pCoreIdent, g_pCoreIdent, NULL); |
| 1264 | |
| 1265 | m_bInCCKVHook = true; |
| 1266 | m_clcommandkv_post->PushCell(client); |
| 1267 | m_clcommandkv_post->PushCell(hndl); |
| 1268 | m_clcommandkv_post->Execute(); |
| 1269 | m_bInCCKVHook = false; |
| 1270 | |
| 1271 | HandleSecurity sec(g_pCoreIdent, g_pCoreIdent); |
| 1272 | |
| 1273 | // Deletes pStk |
| 1274 | handlesys->FreeHandle(hndl, &sec); |
| 1275 | } |
| 1276 | #endif |
| 1277 | |
| 1278 | void PlayerManager::OnClientSettingsChanged(edict_t *pEntity) |
nothing calls this directly
no test coverage detected