Fix TE_* natives operating on incorrect data for some tempents (bug 6072, r=fyren).

This commit is contained in:
Nicholas Hastings 2014-03-08 19:46:49 -05:00
parent b3e2647dc4
commit b4156a19c3

View File

@ -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;