Don't pass unconnected clients into OnClientCommand (bug 3732, r=fyren).
This commit is contained in:
		
							parent
							
								
									0931c6a7e1
								
							
						
					
					
						commit
						359146f60b
					
				@ -741,9 +741,12 @@ void PlayerManager::OnClientCommand(edict_t *pEntity)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cell_t res2 = Pl_Continue;
 | 
						cell_t res2 = Pl_Continue;
 | 
				
			||||||
 | 
						if (pPlayer->IsInGame())
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
		m_clcommand->PushCell(client);
 | 
							m_clcommand->PushCell(client);
 | 
				
			||||||
		m_clcommand->PushCell(argcount);
 | 
							m_clcommand->PushCell(argcount);
 | 
				
			||||||
		m_clcommand->Execute(&res2, NULL);
 | 
							m_clcommand->Execute(&res2, NULL);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (res2 > res)
 | 
						if (res2 > res)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
				
			|||||||
@ -117,6 +117,9 @@ forward OnClientDisconnect_Post(client);
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * Called when a client is sending a command.
 | 
					 * Called when a client is sending a command.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 | 
					 * As of SourceMod 1.3, the client is guaranteed to be in-game.
 | 
				
			||||||
 | 
					 * Use command listeners (console.inc) for more advanced hooks.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 * @param client		Client index.
 | 
					 * @param client		Client index.
 | 
				
			||||||
 * @param args			Number of arguments.
 | 
					 * @param args			Number of arguments.
 | 
				
			||||||
 * @noreturn
 | 
					 * @noreturn
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user