Fix TE_* natives operating on incorrect data for some tempents (bug 6072, r=fyren).
This commit is contained in:
		
							parent
							
								
									d1ec331ada
								
							
						
					
					
						commit
						7ca786168f
					
				@ -118,16 +118,16 @@ int TempEntityInfo::_FindOffset(const char *name, int *size)
 | 
			
		||||
{
 | 
			
		||||
	int offset;
 | 
			
		||||
 | 
			
		||||
	SendProp *prop = g_pGameHelpers->FindInSendTable(m_Sc->GetName(), name);
 | 
			
		||||
	if (!prop)
 | 
			
		||||
	sm_sendprop_info_t info;
 | 
			
		||||
	if (!g_pGameHelpers->FindSendPropInfo(m_Sc->GetName(), name, &info))
 | 
			
		||||
	{
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	offset = prop->GetOffset();
 | 
			
		||||
	offset = info.actual_offset;
 | 
			
		||||
	if (size)
 | 
			
		||||
	{
 | 
			
		||||
		*size = prop->m_nBits;
 | 
			
		||||
		*size = info.prop->m_nBits;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return offset;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user