Skip to content
Permalink
Browse files

Re-add dynamic ped ID allocating (#349)

This reverts commit 242684e.

Original PR can be found at #151.

Co-authored-by: lopezloo <lopez@multitheftauto.pl>
Co-authored-by: Neproify <Neproify@users.noreply.github.com>
Co-authored-by: Arran <arrantuna@hotmail.co.uk>
Co-authored-by: Qais Patankar <qaisjp@gmail.com>
  • Loading branch information...
4 people committed Sep 8, 2019
1 parent 3f0e9e4 commit 475544f1753ce1af24c4cdff7f0d0be48ede709b
@@ -1,6 +1,6 @@
/*****************************************************************************
*
* PROJECT: Multi Theft Auto v1.0
* PROJECT: Multi Theft Auto
* LICENSE: See LICENSE in the top level directory
*
* Multi Theft Auto is available from http://www.multitheftauto.com/
@@ -300,24 +300,18 @@ bool CGameSA::IsInForeground()
return *VAR_IsForegroundWindow;
}

CModelInfo* CGameSA::GetModelInfo(DWORD dwModelID)
CModelInfo* CGameSA::GetModelInfo(DWORD dwModelID, bool bCanBeInvalid)
{
DEBUG_TRACE("CModelInfo * CGameSA::GetModelInfo(DWORD dwModelID )");
DEBUG_TRACE("CModelInfo * CGameSA::GetModelInfo(DWORD dwModelID, bool bCanBeInvalid)");
if (dwModelID < MODELINFO_MAX)
{
if (ModelInfo[dwModelID].IsValid())
if (ModelInfo[dwModelID].IsValid() || bCanBeInvalid)
{
return &ModelInfo[dwModelID];
}
else
{
return NULL;
}
}
else
{
return NULL;
return nullptr;
}
return nullptr;
}

/**

0 comments on commit 475544f

Please sign in to comment.
You can’t perform that action at this time.