Make sure hooks are entity hooks before removing.
This commit is contained in:
		
							parent
							
								
									fd8866a540
								
							
						
					
					
						commit
						d506ce912e
					
				| @ -75,7 +75,7 @@ void DHooksEntityListener::OnEntityDestroyed(CBaseEntity *pEntity) | |||||||
| 	for(int i = g_pHooks.length() -1; i >= 0; i--) | 	for(int i = g_pHooks.length() -1; i >= 0; i--) | ||||||
| 	{ | 	{ | ||||||
| 		DHooksManager *manager = g_pHooks.at(i); | 		DHooksManager *manager = g_pHooks.at(i); | ||||||
| 		if(manager->callback->entity == entity) | 		if(manager->callback->hookType == HookType_Entity && manager->callback->entity == entity) | ||||||
| 		{ | 		{ | ||||||
| 			if(g_pRemoveList.length() == 0) | 			if(g_pRemoveList.length() == 0) | ||||||
| 			{ | 			{ | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user