Fixed TR_GetEntityIndex returning -1 for world ent hits (Logical entities bcompat break)
This commit is contained in:
parent
db97c2a5b1
commit
3cfc45c4e8
@ -965,6 +965,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
PreprocessorDefinitions="BINARY_NAME=\"$(TargetFileName)\""
|
||||||
|
AdditionalIncludeDirectories="..\..\..\public"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
|
@ -504,6 +504,11 @@ static cell_t smn_TRGetEntityIndex(IPluginContext *pContext, const cell_t *param
|
|||||||
return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
|
return pContext->ThrowNativeError("Invalid Handle %x (error %d)", params[1], err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tr->m_pEnt == NULL)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return gamehelpers->EntityToBCompatRef(tr->m_pEnt);
|
return gamehelpers->EntityToBCompatRef(tr->m_pEnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user