mirror of
https://github.com/GTAmodding/re3.git
synced 2021-02-19 17:49:54 +01:00
fix UB and new renderer crashes
This commit is contained in:
parent
e5190481e4
commit
2e37001881
@ -1394,6 +1394,10 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
|
||||
void
|
||||
CRenderer::InsertEntityIntoList(CEntity *ent)
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
if (!ent->m_rwObject) return;
|
||||
#endif
|
||||
|
||||
#ifdef NEW_RENDERER
|
||||
// TODO: there are more flags being checked here
|
||||
if(gbNewRenderer && (ent->IsVehicle() || ent->IsPed()))
|
||||
|
@ -96,6 +96,10 @@ CVisibilityPlugins::InitAlphaEntityList(void)
|
||||
bool
|
||||
CVisibilityPlugins::InsertEntityIntoSortedList(CEntity *e, float dist)
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
if (!e->m_rwObject) return true;
|
||||
#endif
|
||||
|
||||
AlphaObjectInfo item;
|
||||
item.entity = e;
|
||||
item.sort = dist;
|
||||
|
Loading…
Reference in New Issue
Block a user